mirror of
https://github.com/djdevin/recnet-plugin.git
synced 2026-09-08 14:41:30 -07:00
add src
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using HarmonyLib;
|
||||
using Org.BouncyCastle.Crypto.Tls;
|
||||
|
||||
namespace CannedNet.Client.Patches;
|
||||
|
||||
public class FuckOffTLS
|
||||
{
|
||||
[HarmonyPatch(typeof(LegacyTlsAuthentication), "NotifyServerCertificate")]
|
||||
public class TlsPatch
|
||||
{
|
||||
private static bool Prefix()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user