mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 07:24:53 +09:00
Make the player proxy follow the Factorio handshake and route by version
The proxy now parses the full message header, so confirms and fragmented ConnectionRequestReplyConfirm messages (which carry the mod list) are forwarded intact, with the server request id patched into the first fragment. It resends the connection request until the instance answers, starts over when a client reconnects from the same socket (as Factorio does after LuaPlayer::connect_to_server), answers pings from the server browser and tells clients the same 508 byte max packet size Factorio servers use. Routing is decided by the new playerProxyRoute controller hook, which is given the name and version of the player, then a dedicated port set with instance.player_proxy_port, the instance the player was last on (taken from the user's instance stats instead of a separate routing store), and controller.player_proxy_default_instance_id. The proxy is now off by default, as port 34197 is in the default host.factorio_port_range. Leftovers of the per-instance proxy on hosts are removed.
This commit is contained in:
13 files changed
+1334
-602
No files matched your search
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user