This is a node.js app that solves a specific annoyance: playing games between two computers that cannot connect over P2P, even with hole-punching.
Text form
| Application | Device |
| game (client) | PC1 |
| tiny-tunnel (--guest) | |
| tiny-tunnel (--relay) | Relay |
| tiny-tunnel (--host) | PC2 |
| game (server) |
Install Haxe if you don't have it;
haxe build.hxml
This creates bin/tiny-tunnel.js
You'll need node.js installed. Any semi-recent version should do.
Open a command prompt / terminal in the bin directory
or copy tiny-tunnel.js wherever you'd like.
node tiny-tunnel.js --relay --host-port 9000 --guest-port 9001The port for the host player (the one hosting a game server) to connect to.
The port for the guest player (the one joining a game server) to connect to.
node tiny-tunnel.js --host --relay-ip 127.0.0.1 --relay-port 9000 --connect-port 7800The IP address of the relay.
The relay port to connect to (see --host-port above).
The port where a game server is hosted.
If the game server is hosted on another computer (e.g. a home server without internet access), you can use this.
Otherwise the app will attempt connect to a server on localhost / 127.0.0.1.
node tiny-tunnel.js --guest --relay-ip 127.0.0.1 --relay-port 9001 --server-port 7700The IP address of the relay.
The relay port to connect to (see --guest-port above).
The port to host a local server on.
When a game connects to this port, a local client will be created on the host's side to connect to the game server and data will be forwarded back and forth.
When the guest's local client disconnects or the host destroys the client, the local client on the other side will be destroyed.
Only TCP protocol is supported.
