File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 33using HarmonyLib ;
44using Manager ;
55using Manager . Operation ;
6+ using MelonLoader ;
67
78namespace AquaMai . Mods . Fix ;
89
910[ ConfigSection ( exampleHidden : true , defaultOn : true ) ]
1011public class FixCheckAuth
1112{
13+ [ ConfigEntry ]
14+ private static readonly bool allowHttpsUpgrade = true ;
15+
1216 [ HarmonyPostfix ]
1317 [ HarmonyPatch ( typeof ( OperationManager ) , "CheckAuth_Proc" ) ]
1418 private static void PostCheckAuthProc ( ref OperationData ____operationData )
1519 {
1620 if ( Auth . GameServerUri . StartsWith ( "http://" ) || Auth . GameServerUri . StartsWith ( "https://" ) )
1721 {
1822 ____operationData . ServerUri = Auth . GameServerUri ;
23+
24+ // Host is used only for "CheckServerHash" and it is disabled now
25+ // it originally contains server's tls cert hash
26+ // So this can be used to transfer ambiguous data
27+ // we use this to notify that we can upgrade the link to https
28+ // as if we originally pass a https link to game, games without CheckServerHash will reject the link because ssl pinning
29+ if ( Auth . GameServerHost == "_AquaMai_Upgrade_" )
30+ {
31+ ____operationData . ServerUri = Auth . GameServerUri . Replace ( "http://" , "https://" ) ;
32+ }
1933 }
2034 }
21- }
35+ }
You can’t perform that action at this time.
0 commit comments