feat: make hook redirect IP configurable from launcher

The DLL now reads openfut.cfg from its own directory on DLL_PROCESS_ATTACH
and uses the IP it contains as the redirect target instead of hardcoding
127.0.0.1. Falls back to 127.0.0.1 if the file is absent.

The launcher writes openfut.cfg alongside version.dll when deploying, and
the Setup tab exposes a "Redirect IP" field with an "Update" button that
rewrites openfut.cfg in-place without redeploying the DLL. Useful when
running the emulator on a different machine on the LAN.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-06-25 21:08:44 -07:00
parent 9b5da57f12
commit dfa2c9afc7
6 changed files with 114 additions and 13 deletions
+3
View File
@@ -15,6 +15,8 @@ pub struct LauncherConfig {
pub hook_dll_path: String,
/// FIFA 23 game folder inside the Proton prefix (where the DLL is deployed).
pub fifa_game_dir: String,
/// IP the hook DLL redirects EA hostnames to (written to openfut.cfg).
pub hook_redirect_ip: String,
}
impl Default for LauncherConfig {
@@ -54,6 +56,7 @@ impl Default for LauncherConfig {
.unwrap_or_default()
.to_string_lossy()
.into(),
hook_redirect_ip: "127.0.0.1".into(),
}
}
}