JoySword Online implements a defense-in-depth networking architecture that handles process socket coordination, IP loopback isolation, non-elevated proxy bridging, firewall management, and edge tunnel routing.
flowchart TD
subgraph Client ["Client & Edge Boundary"]
ElectronClient[Electron Desktop Launcher (Start-Client-Windows.ps1)]
CloudflareEdge[Cloudflare Edge Tunnel (cloudflared)]
end
subgraph ProxyBridge ["Low-Latency Application Proxy (socket_proxy.py)"]
TCPProxy[Port 9100 TCP Proxy Daemon - Non-Elevated]
end
subgraph ServerCluster ["Server Executable Cluster"]
Center[CenterServer.exe - Port 9100]
Login[LoginServer.exe - Port 9200]
Game[GameServer.exe - Port 9300 & 9201/9301/9401]
Channel[ChannelServer.exe - Port 9400]
Global[GlobalServer.exe - Port 9500]
end
subgraph NetworkGuards ["SRE Network Safeguards"]
CircuitBreaker[Adapter Circuit Breaker (manage-network-health.ps1)]
FirewallManager[Windows Firewall Manager (ensure-game-firewall.ps1)]
SocketSanitizer[Lingering Socket Sanitizer (-SanitizeGamePorts)]
end
ElectronClient --> TCPProxy
ElectronClient --> Login
CloudflareEdge --> Channel
TCPProxy --> Center
ServerCluster --> NetworkGuards
| Port Number | Protocol | Server Component | Purpose | Firewall Scope |
|---|---|---|---|---|
9100 |
TCP | CenterServer / TCP Proxy | Inter-process coordination & routing bridge | Local / Inbound |
9200 |
TCP | LoginServer | User authentication & ticket issuance | Public Inbound |
9300 |
TCP/UDP | GameServer (Primary) | Dungeon stages, combat packets, zone transition | Public Inbound |
9201, 9301, 9401 |
TCP/UDP | GameServer (Secondary) | Field zone mob spawns & secondary player channels | Public Inbound |
9400 |
TCP | ChannelServer | Town hubs, chat channels, village lobbies | Public Inbound |
9500 |
TCP | GlobalServer | Global billing transaction router | Local / Inbound |
-
Adapter Circuit Breaker:
scripts/manage-network-health.ps1prevents loopback IP alias registration (159.203.165.171) on DHCP-enabled physical internet adapters (Ethernet), binding exclusively to safe virtual adapters (vEthernet (WSL), VirtualBox, Microsoft KM-TEST Loopback). -
Lingering Socket Sanitizer:
scripts/manage-network-health.ps1 -SanitizeGamePortsdetects and resets lingeringTIME_WAITorCLOSE_WAITTCP sockets on game ports prior to server launch. -
Firewall Rule Automator:
scripts/ensure-game-firewall.ps1automatically verifies and creates persistent inbound firewall rules for game ports 9100–9500.