Remove galvanic authentication support

... that server is being rewritten
This commit is contained in:
2025-08-10 21:53:58 -04:00
parent 48ca74d2db
commit 1c51b37a7c
6 changed files with 34 additions and 309 deletions

View File

@@ -64,30 +64,6 @@ namespace undead_universal_patch_il2cpp.Patches
if (newUri.ToString().Contains("ns.rec.net")) newUri = new Il2CppSystem.Uri(NameserverConfig.NewUrl.Value);
if (GalvanicConfig.Enabled.Value)
{
string[] applyHeader = [
"/cachedlogin/forplatformid",
"/account/create",
"/connect/token"
];
foreach (string header in applyHeader)
{
if (newUri.PathAndQuery.Contains(header))
{
// refresh the token if it expired
// this is somewhat inefficient, but we don't hook into many requests (see above) so it should be fine
GalvanicWebAuth.TokenExpiry();
Type httpRequestType = request.GetType();
MethodInfo addHeaderMethod = httpRequestType.GetMethod("AddHeader");
addHeaderMethod.Invoke(request, ["GalvanicAuth", GalvanicWebAuth.Token]);
break;
}
}
}
if (GenericConfig.LogAllRequests.Value) Plugin.Log.LogInfo($"BestHTTP_Unob request a-URL: {newUri.ToString()}");
uriProperty.SetValue(request, NameserverConfig.Rewrite.Value ? newUri : uriInstance, null);
}