From 2c5e03199a12ec8dabc2b3b3e8fdc9123b640cbe Mon Sep 17 00:00:00 2001 From: Austin Harms <43386423+austinharms@users.noreply.github.com> Date: Thu, 27 Aug 2026 17:40:01 +0000 Subject: [PATCH] Update SendRequestPatch.cs to support changing nameserver port --- Patches/SendRequestPatch.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Patches/SendRequestPatch.cs b/Patches/SendRequestPatch.cs index 5d6ec23..f60ab40 100644 --- a/Patches/SendRequestPatch.cs +++ b/Patches/SendRequestPatch.cs @@ -64,13 +64,13 @@ private static void Prefix(ref HTTPRequest request) var host = request.Uri.Host; if (host == OfficialNameServer) { - // Redirect the nameserver lookup to the custom server, swapping only the host. - var newHost = new System.Uri(Plugin.ServerHostname.Value).Host; - var builder = new Il2CppSystem.UriBuilder(request.Uri) { Host = newHost }; + // Redirect the nameserver lookup to the custom server. + var newUri = new System.Uri(Plugin.ServerHostname.Value); + var builder = new Il2CppSystem.UriBuilder(request.Uri) { Host = newUri.Host, Port = newUri.Port }; request.Uri = builder.Uri; if (debug) - Plugin.Log.LogInfo($"[HTTP] intercepted {host} -> {newHost}"); + Plugin.Log.LogInfo($"[HTTP] intercepted {host}:{request.Uri.Port} -> {newUri.Host}:{newUri.Port}"); } if (debug)