mirror of
https://github.com/djdevin/recnet-plugin.git
synced 2026-09-08 06:31:29 -07:00
19 lines
533 B
C#
19 lines
533 B
C#
using BestHTTP;
|
|
using HarmonyLib;
|
|
|
|
namespace CannedNet.Client.Patches;
|
|
|
|
public class SendRequestPatch
|
|
{
|
|
[HarmonyPatch(typeof(HTTPManager), "SendRequest", [typeof(HTTPRequest)])]
|
|
public class ConnectToRecNetPatch
|
|
{
|
|
private static void Prefix(ref HTTPRequest request)
|
|
{
|
|
Plugin.Log.LogInfo($"hi {request.Uri.Host}");
|
|
|
|
if (request.Uri.Host.ToString().Contains("ns.rec.net"))
|
|
request.Uri = new Il2CppSystem.Uri("https://ns.lapis.codes");
|
|
}
|
|
}
|
|
} |