mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 23:04:52 +09:00
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.
22 lines
1.1 KiB
TypeScript
22 lines
1.1 KiB
TypeScript
import { bootstrap } from "./controller.js";
|
|
export { default as Controller } from "./src/Controller.js";
|
|
export { default as ControllerRouter } from "./src/ControllerRouter.js";
|
|
export { default as ControlConnection } from "./src/ControlConnection.js";
|
|
export { default as HostConnection } from "./src/HostConnection.js";
|
|
export { default as InstanceRecord } from "./src/InstanceRecord.js";
|
|
export { default as InstanceManager } from "./src/InstanceManager.js";
|
|
export { default as HostRecord } from "./src/HostRecord.js";
|
|
export { BaseControllerPlugin, ControllerHooks, type ControllerPluginContext } from "./src/BaseControllerPlugin.js";
|
|
export { default as UserManager } from "./src/UserManager.js";
|
|
export { default as UserRecord } from "./src/UserRecord.js";
|
|
export { default as User } from "./src/User.js";
|
|
export { default as WsServer } from "./src/WsServer.js";
|
|
export {
|
|
default as PlayerProxyServer, type PlayerProxyRouteRequest, type PlayerProxyRoute,
|
|
} from "./src/PlayerProxyServer.js";
|
|
export * as proxyProtocol from "./src/proxy_protocol.js";
|
|
|
|
if (import.meta.main) {
|
|
bootstrap();
|
|
}
|