Skip to content

pkodev/proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proxy Server for Tales of Pirates, Pirate King Online, Piratia game servers

The Proxy is a proxy server that is installed before GateServer and is used to filter incoming packets from the client. When using a proxy server no need to install additional filters (Gemini XFail, SQLGuard, FilterServer and others).

The main purpose of the Proxy is to block unwanted traffic before it reaches the application's server. Also included are tools to extend the control of the game server.

Features

  • Transmits only the packets used in the game (in which there is a signature required)
  • Splits a physical packet for logics and transmits only first packet
  • Validates the size of transmitted packets
  • Validates the ping-packets
  • Validates the username and mac-address of authorization packet
  • Validates the secret code
  • Validates the character name and motto
  • Validates the guild name, password and motto
  • Limits the bandwidth connection
  • Limits the number of transmitted packets per second
  • Limits the number of packets transmitted per second of the same type
  • Blocks the learn of skill more than one point
  • Blocks the learn of skill without skill book (Sit, Fairy body, Rebirth skills, Polliwog Self Explode, Cooking, Manufacturing, Crafting, Analyze)
  • Locking in real-time to the player by IP, Mac, username (login), character name
  • Has a web interface for viewing logs, locks players and change settings in real time
  • Only works with unencrypted connection
  • Lost the real IP address of the player, but provides the possibility of transmission to save in the DB

Requirements

Settings

You can install and run the Proxy on the same PC where the Game Server is running, or on any other PC.

For transmitting the real IP address of the player, Proxy must be running on the network interface with direct access to the Internet.

If you running Proxy on the same PC you need run GateServer on inner network interface and Proxy on outer network interface.

GateServer.cfg

[ToClient]
IP = 127.0.0.1
Port = 1973
CommEncrypt = 0

config.json

{
	"local": {
		"host": "77.88.99.55", // Public IP address of PC
		"port": 1973
	},
	"remote": {
		"host": "127.0.0.1",
		"port": 1973
	},
	"realip": true
}

If you running Proxy on the different PCs you need run GateServer on outer network interface and Proxy on outer network interface on another PC.

GateServer.cfg

[ToClient]
IP = 0.0.0.0
Port = 1973
CommEncrypt = 0

config.json

{
	"local": {
		"host": "0.0.0.0",
		"port": 1973
	},
	"remote": {
		"host": "77.88.99.55", // GateServer IP address
		"port": 1973
	},
	"realip": true
}

Set "realip": true in config.json for save real IP address of the player.

If you using FilterServer or another filter between GateServer and GameServer you can not save real ip address and you need set "realip": false in config.json

Real IP address of the player will be saved in AccountServer.account_login.last_login_mac as mac-address;ip-address, i.e. 00-00-00-00-00-00-00-00;127.0.0.1

Starting Proxy

Run node proxy.js with command line

Web control panel

You can access the web control panel at the address http://127.0.0.1:3000/ on the PC running Proxy.

About

Proxy Server for PKO Gate Server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published