Skip to content

Latest commit

 

History

History
67 lines (50 loc) · 2.92 KB

File metadata and controls

67 lines (50 loc) · 2.92 KB

Network Architecture, Socket Routing & Proxy Bridge Specification

Executive Overview

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.


🌐 Network Boundary Architecture

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
Loading

🔌 Port Mapping & Protocol Matrix

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

🛡️ SRE Network Circuit Breakers & Socket Sanitization

  1. Adapter Circuit Breaker: scripts/manage-network-health.ps1 prevents 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).

  2. Lingering Socket Sanitizer: scripts/manage-network-health.ps1 -SanitizeGamePorts detects and resets lingering TIME_WAIT or CLOSE_WAIT TCP sockets on game ports prior to server launch.

  3. Firewall Rule Automator: scripts/ensure-game-firewall.ps1 automatically verifies and creates persistent inbound firewall rules for game ports 9100–9500.