feat(fifa17-hook): redirect FIFA17 sockets from shared config
The fifa17 hook path installed no connection redirect (only a module-map dump), so FIFA17 relied entirely on Linux iptables DNAT / hosts (and had no Windows equivalent). Add an in-process, config-driven redirect for the fifa17 build: - openfut-common gains ResolvedServer::redirect_for_ea_port(): the single shared decision (EA source-port signature -> configured OpenFUT host+port, network byte order), reused by the hook so it and openfut.cfg agree by construction. Covers 443->https, 10041/42230->blaze_redirector, 42127->blaze_main. - connect_hook: redirect_if_ea now dispatches to a config-driven rewrite when armed (rewrites to the CONFIGURED, possibly remote, server -- not hardcoded 127.0.0.1), matching by EA source port so a hardcoded EA IP (159.153.51.20 redirector) and a DNS-resolved one both land on the server. Legacy loopback path retained only for the not-yet-retired FIFA23 build. - fifa17::install() reads openfut.cfg next to FIFA17.exe via openfut-common and installs connect + WSAConnect (IAT) + ConnectEx (shared redirect). Fail-safe: missing/invalid config installs NO redirect (traffic untouched), never a corrupt sockaddr. Tests: openfut-common redirect map/sockaddr/endian/remote-host/unknown-port. Cross-builds x86_64-pc-windows-gnu --features fifa17; clippy -D warnings clean. No Linux fallback removed (migration gate).
This commit is contained in:
@@ -39,6 +39,10 @@ windows-sys = { version = "0.59", features = [
|
||||
"Win32_System_Diagnostics_Debug",
|
||||
"Win32_System_Kernel",
|
||||
] }
|
||||
# Single source of truth for the OpenFUT redirect config (openfut.cfg schema,
|
||||
# EA-port -> OpenFUT-port map, WinSock byte-order helpers). Shared with the
|
||||
# launcher so the hook and openfut.cfg agree by construction.
|
||||
openfut-common = { path = "../openfut-common" }
|
||||
|
||||
[profile.release]
|
||||
opt-level = "s"
|
||||
|
||||
Reference in New Issue
Block a user