-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
And also added to maybe go back to old http
- Loading branch information
Showing
14 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using MTGA.Utilities.Core; | ||
using System; | ||
using System.Reflection; | ||
|
||
namespace MTGA.Patches.Web | ||
{ | ||
// This should work to https to http -slejm | ||
public class TransportPrefixCtorPatch : ModulePatch | ||
{ | ||
protected override MethodBase GetTargetMethod() | ||
{ | ||
return typeof(TransportPrefix).GetConstructor(new Type[] { } ); | ||
} | ||
|
||
[PatchPostfix] | ||
private static bool PatchPostfix() | ||
{ | ||
TransportPrefix.TransportPrefixes.Clear(); | ||
TransportPrefix.TransportPrefixes.Add(ETransportProtocolType.HTTPS, "http://"); | ||
TransportPrefix.TransportPrefixes.Add(ETransportProtocolType.WSS, "ws://"); | ||
|
||
Logger.LogInfo("TransportPrefix Ctor Is Done!"); | ||
return false; | ||
} | ||
} | ||
|
||
public class TransportPrefixPatch : ModulePatch | ||
{ | ||
protected override MethodBase GetTargetMethod() | ||
{ | ||
return typeof(TransportPrefix).GetMethod("CreateFromLegacyParams", BindingFlags.Static | BindingFlags.Public); | ||
} | ||
|
||
[PatchPostfix] | ||
private static bool PatchPostfix(Request legacyParams) | ||
{ | ||
legacyParams.Url = legacyParams.Url.Replace("http://","https://"); // We always replace it to nothing if its runned successfully | ||
Logger.LogInfo("TransportPrefix Is Done!"); | ||
return true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
_TarkovReferences/bsg.componentace.compression.libs.zlib.dll
Binary file not shown.
Binary file not shown.