A port mapping tool by node.js which helps accessing a back server (in LAN, etc), via a front server having public ip(s) and a client server that could access the back server. Tested on Minecraft 1.7.2 server.
The project is published under GPLv2 License.
Principle introduce (Simplified Chinese)
- A front server has public ip(s)
- A client server that can access the back server (You can just use the back server)
- node.js runtime on both front and client server
- Edit settings in config.json .
- Upload files to both servers.
- Run
npm install
in port-mapper's folder on both servers. - Run server.js on the front server.
- Run client.js on the client server.
[Notice] You must do the step 4 first, or the client won't work correctly.
Settings should be defined in config.json
DO NOT delete config.example.json. We need it to make sure the config structure is the latest version and the tool can work properly.
{
"LOG_LEVEL" : "INFO", // The minimum level of log to be logged
"GATEWAY" : "", // The ip or domain of the front server
"SERVER_HOST" : "", // The ip or domain of the back server
"SERVER_PORT" : 80, // The port of service on the back server
"CONNECT_SIGN" : "", // Auth been the two server and avoid unexpected forward
"CONNECT_PORT" : 1201, // The port to connect with the front server
"TRANS_PORT" : 1202, // The port to trans to the front server
"PUBLIC_PORT" : 80, // The port you can access from internet
"PUBLIC_AUTH" : false // Authority client before mapping
// false - disabled
// true - enabled, generate a random code when back server connected
// "*" - enabled, use a specified code
}
List of contributors can be found at here.