I have currently setup a ubuntu server (14.04 LTS) running on a VMware host to see if i can improve performance by running on a separate host. after sorting out webGL dependencies i can start the server ./server --allow-lan --headless --gamemode config --log-network-traffic ./netlog.txt but i cant seem to get the client to see or use it or monitor any (traffic from it via wireshark) is this because its only binding to localhost (127.0.0.1)? cat netlog.txt [0.0000] 1: socket(0) [0.0000] 1: bind(127.0.0.1:6543): Worked [0.0000] 1: listen(5) is there currently anyway to force binding to different specific address or any address (0.0.0.0) or is something else wrong? or is this just not possible at this point?
Basically when you start the server it's initialize state where it's only listen on local interface until local client (game creator) join it. Omce game creator join it state changed to "lobby", but by default lobby starting with those two parameters: hidden: true It's mean game would only accessible by one client. public: false It's mean if game only accessible for friend from list (doesn't work on LAN) or for everyone even if "hidden" set to false. You can make server start in lobby state adding this option: Code: --state lobby Unfortunately you'll also need to modify "/media/server-script/state/lobby.js" to make server listed on ports properly. So thing need to be done to make it work I see: Modify code default behavior so it's initialize properly with zero players connected. E.g on line ~1868 you'll need to remove this: Code: lobbyModel.creator = owner.id; lobbyModel.addPlayer(owner, { mod: true, creator: true }); bouncer.addPlayerToModlist(owner.id); Add some code that change settings on initialization to make server visible in LAN: Code: lobbyModel.changeSettings({ hidden: false, public: true }); Add some more code into "onConnect" that will mark first connected player as creator/mod: Code: if (!server.clients.length) { lobbyModel.creator = client.id; bouncer.addPlayerToModlist(client.id); } Unfortunately I didn't yet make it work properly. I'm make server get UPD packages from LAN after init, but likely I break something so it's didn't appear on game list on remote PC and didn't even loaded first local player properly. Though I suppose it's possible to bypass it, but I'll need to spend more time on learning how is this work.
I've had success with using ssh like this: ssh -L 0.0.0.0:53999:127.0.0.1:6543 -N user@127.0.0.1 after that I could connect to the server on the external IP of the machine and port 53999 playing worked fine, even with thousands of units. But if somebody figures out how to make it generally bind to the outside world, that would be nice.
Basically it's DO bind to 0.0.0.0 (all interfaces) once you joined the game. So if you run it on dedicated server and do same thing with port forwarding it's will listen for outside connections then. I see that "empty" and "lobby" state have to be modified somehow to make it work without player. As far as I get main problem here is fact that server get initial configuration of game (mode, players limit, etc) from client and if there no client it's just not init it.
following that concept i can get the client on my windows machine to connect the linux server using putty to map the windows local 6543 port to the linux localhost 6543 port if i start a single player skirmish it uses the linux server though i still get a server started on the windows machine it also seems to work for galactic war, though you have to restart it for each battle
To make the server bind directly to 0.0.0.0 I've had success with this command on my linux server for the new PTE build: ./server --headless --game-mode Config --allow-lan --server-name HumanResourcesLooksFun you can probably use whatever else server-name you might like