1
Fork 0
mirror of https://github.com/redstrate/LauncherTweaks.git synced 2025-05-20 09:27:46 +00:00

Add an option to override the boot patch server

This commit is contained in:
Joshua Goins 2025-05-03 15:16:25 -04:00
parent fa23987ef7
commit 38c163a8e2
2 changed files with 9 additions and 0 deletions

View file

@ -11,6 +11,7 @@ pub struct Config {
#[serde(default = "Config::default_force_http")]
pub force_http: bool,
pub game_patch_server: Option<String>,
pub boot_patch_server: Option<String>,
}
impl Config {

View file

@ -29,6 +29,9 @@ const BOOT_FILENAME: &str = "ffxivboot64.exe";
/// Domain of the retail game patch server.
const RETAIL_GAME_PATCH_SERVER: &str = "patch-gamever.ffxiv.com";
/// Domain of the retail boot patch server.
const RETAIL_BOOT_PATCH_SERVER: &str = "patch-bootver.ffxiv.com";
fn overwrite_launcher_url() {
let config = get_config();
let Some(launcher_url) = config.launcher_url else {
@ -132,6 +135,10 @@ fn winhttpconnect_detour(
if original_server_name == RETAIL_GAME_PATCH_SERVER && config.game_patch_server.is_some() {
server_name = config.game_patch_server.unwrap();
} else if original_server_name == RETAIL_BOOT_PATCH_SERVER
&& config.boot_patch_server.is_some()
{
server_name = config.boot_patch_server.unwrap();
} else {
server_name = original_server_name;
}
@ -350,6 +357,7 @@ fn main() {
use_system_proxy();
disable_webview2_install();
disable_boot_version_check();
overwrite_patch_url();
force_http();
}
_ => {}