diff --git a/README.md b/README.md index b3f1f270..5e3df36f 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,17 @@ #### 客户端需要本地https代理和打破解补丁才能正常使用,详情请参考目前主流私服连接方法 +#### 可以使用新版补丁避免https代理,支持自定义密钥和连接任意地址的服务器,感谢[mhypbase](https://github.com/Jx2f/mhypbase) + +## 特性 + +* 原生的高可用集群架构,任意节点宕机不会影响到整个系统,可大量水平扩展,支撑千万级DAU不是梦 +* 玩家级无状态游戏服务器,无锁单线程模型,开发省时省力,完善的玩家数据交换机制(内存-缓存-数据库) + ,拒绝同步阻塞的数据库访问,掌控每一纳秒的CPU时间不是梦 +* 新颖的玩家在线跨服无缝迁移功能,以多人世界之名,反复横跳于多个服务器进程之间不是梦 +* 独创的网关服务器侧客户端协议代理转换功能,拒绝因协议号消息号混淆而带来代码改动的烦恼,不同协议版本客户端同时在线联机不是梦 +* 完整的密钥交换机制实现,安全性++,拒绝一个写死的随机数种子和XOR密钥文件用到天荒地老,搭建一个属于自己的别具一格的聊天渠道不是梦 + ## 编译和运行环境 * Go >= 1.18 diff --git a/docs/mhypbase.dll.hook b/docs/mhypbase.dll.hook new file mode 100644 index 00000000..c00126c4 Binary files /dev/null and b/docs/mhypbase.dll.hook differ diff --git a/docs/mhypbase.ini b/docs/mhypbase.ini new file mode 100644 index 00000000..32157dc4 --- /dev/null +++ b/docs/mhypbase.ini @@ -0,0 +1,215 @@ +[Basic] +;;;;;; enable console logger, enabled by default. +EnableConsole = true +;;;;;; drop server-side RCE packets, dropped by default. +DropRCEPacket = false +;;;;;; start of the type index for method addresses dumping, default is -1 (disabled). +; TypeIndexStart = -1 + + +[Value] +;;;;;; here you can customize your own channel config: +;;;;;; 1) replace your own dispatch url; +;;;;;; 2) disable the extra log reporters; +;;;;;; 3) disable the beta watermark. +ConfigChannel = {"ChannelName":"OSRELWin","PreDefines":"GAIA_ADDON_TOOLS;GAIA_MULTI_TERRAINS;CTS_GAIA_RELOCATE;HOTFIX_ENABLE;UNITY_RELEASE_BUILD;AMPLIFY_SHADER_EDITOR;ODIN_INSPECTOR;ODIN_INSPECTOR_3;UNITY_POST_PROCESSING_STACK_V2;PROBUILDER_FBX_ENABLED","DispatchConfigs":[{"DispatchUrls":["https://hk4e.flswld.com/query_region_list"]}],"BaseTextLang":"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15","BaseAudioLang":"Chinese,English(US),Korean,Japanese"} +;;;;;; here you can customize your own sdk base url: +ConfigBaseUrl = https://hk4e.flswld.com +;;;;;; replace your rsa public key, the default one is from grasscutter. +;;;;;; this key is used to 1) verify the signature of the dispatched data, and 2) encrypt your account password. +PublicRSAKey = xbbx2m1feHyrQ7jP+8mtDF/pyYLrJWKWAdEv3wZrOtjOZzeLGPzsmkcgncgoRhX4dT+1itSMR9j9m0/OwsH2UoF6U32LxCOQWQD1AMgIZjAkJeJvFTrtn8fMQ1701CkbaLTVIjRMlTw8kNXvNA/A9UatoiDmi4TFG6mrxTKZpIcTInvPEpkK2A7Qsp1E4skFK8jmysy7uRhMaYHtPTsBvxP0zn3lhKB3W+HTqpneewXWHjCDfL7Nbby91jbz5EKPZXWLuhXIvR1Cu4tiruorwXJxmXaP1HQZonytECNU/UOzP6GNLdq0eFDE4b04Wjp396551G99YiFP2nqHVJ5OMQ==AQAB +;;;;;; or, the password encryption key can be set separately. +; RSAEncryptKey = +;;;;;; it's not recommended to overwrite the private key, unless you know what you are doing. +;;;;;; if you want to use another rsa private key, uncomment the following line and replace it with your own. +; PrivateRSAKey = + + +[Offset] +;;;;;; client version is automatically detected by default. +;;;;;; or, you can specify the version manually. +; ClientVersion = Offset +;;;;;; if you manually specify the client version, you alse need to specify the offsets manually. +; il2cpp_string_new = 0x0 +il2cpp_string_new_Pattern = 40 53 48 83 EC 50 48 C7 44 24 20 FE FF FF FF 48 83 +; System__Text__EncodingHelper_GetDefaultEncoding = 0x0 +System__Text__EncodingHelper_GetDefaultEncoding_Pattern = 40 55 48 83 EC 40 48 8D 6C 24 20 48 C7 45 08 FE FF FF FF 8B 04 24 48 83 EC 10 8B 04 24 C7 +; System__Text__Encoding_GetBytes = 0x0 +System__Text__Encoding_GetBytes_Pattern = 48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 40 48 8B FA 48 8B F1 48 85 +; MiHoYo__SDK__SDKUtil_RSAEncrypt = 0x0 +MiHoYo__SDK__SDKUtil_RSAEncrypt_Pattern = 48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 48 8B F9 48 8B F2 48 8B 0D ? ? ? ? E8 ? ? ? ? 48 8B C8 48 8B D8 E8 ? ? ? ? 48 85 DB 74 7B +; MoleMole__MoleMoleSecurity_GetPublicRSAKey = 0x0 +MoleMole__MoleMoleSecurity_GetPublicRSAKey_Pattern = +48 BA 45 78 70 6F 6E 65 6E 74 48 89 90 ? ? ? ? 48 BA 3E 3C 2F 52 53 41 4B 65 +; MoleMole__MoleMoleSecurity_GetPrivateRSAKey = 0x0 +MoleMole__MoleMoleSecurity_GetPrivateRSAKey_Pattern = +2F 49 6E 76 65 72 73 65 +; MoleMole__ConfigUtil_LoadJSONStrConfig = 0x0 ; before 3.4.0 +MoleMole__ConfigUtil_LoadJSONStrConfig_Pattern = +; UnityEngine__JsonUtility_FromJson = 0x0 ; after 3.4.0 +UnityEngine__JsonUtility_FromJson_Pattern = +; MoleMole__Miscs_GetConfigChannel = 0x0 +MoleMole__Miscs_GetConfigChannel_Pattern = +; MoleMole__Miscs_LoadChannelConfigBlk = 0x0 +MoleMole__Miscs_LoadChannelConfigBlk_Pattern = +; MoleMole__FightModule_OnWindSeedClientNotify = 0x0 +MoleMole__FightModule_OnWindSeedClientNotify_Pattern = +; MoleMole__PlayerModule_OnWindSeedClientNotify = 0x0 +MoleMole__PlayerModule_OnWindSeedClientNotify_Pattern = +; MoleMole__PlayerModule_OnReciveLuaShell = 0x0 +MoleMole__PlayerModule_OnReciveLuaShell_Pattern = + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;; unless you know what you are doing, don't change the following values. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +[MD5ClientVersion] +a1db328df8d382d2c5cdb350947f53e1 = OSRELWin3.2.0 +639903877207463f8c6b08a73235c14e = CNRELWin3.2.0 +702671865eba6bd49db2da707cf4b4ef = OSRELWin3.3.0 +3dce9fa8a7874c70575d38c4f839c229 = CNRELWin3.3.0 +16fb0ca97fea983fc44f9aba476e3658 = OSRELWin3.4.0 +001606dd78070aed0803536a2752459a = CNRELWin3.4.0 +db4b2ba49753be4833c481e8b701f040 = OSRELWin3.5.0 +2a047c49ea9e6f817208dcc1cddc41fc = CNRELWin3.5.0 + + +[OSRELWin3.2.0] +il2cpp_string_new = 0x027D31D0 +System__Text__EncodingHelper_GetDefaultEncoding = 0x08E3AE50 +System__Text__Encoding_GetBytes = 0x08F706E0 +MiHoYo__SDK__SDKUtil_RSAEncrypt = 0x09448080 +MoleMole__MoleMoleSecurity_GetPublicRSAKey = 0x05C00F50 +MoleMole__MoleMoleSecurity_GetPrivateRSAKey = 0x05BFF4A0 +MoleMole__ConfigUtil_LoadJSONStrConfig = 0x062FF2A0 +UnityEngine__JsonUtility_FromJson = 0x09684F80 +MoleMole__Miscs_GetConfigChannel = 0x05113970 +MoleMole__Miscs_LoadChannelConfigBlk = 0x0511F850 +MoleMole__FightModule_OnWindSeedClientNotify = 0x039188F0 +MoleMole__PlayerModule_OnWindSeedClientNotify = 0x030E2AC0 +MoleMole__PlayerModule_OnReciveLuaShell = 0x0530B900 + + +[CNRELWin3.2.0] +il2cpp_string_new = 0x027CA270 +System__Text__EncodingHelper_GetDefaultEncoding = 0x08F23CA0 +System__Text__Encoding_GetBytes = 0x0905A330 +MiHoYo__SDK__SDKUtil_RSAEncrypt = 0x09539E70 +MoleMole__MoleMoleSecurity_GetPublicRSAKey = 0x05CBE500 +MoleMole__MoleMoleSecurity_GetPrivateRSAKey = 0x05CBC9F0 +MoleMole__ConfigUtil_LoadJSONStrConfig = 0x063CCFA0 +UnityEngine__JsonUtility_FromJson = 0x09778D20 +MoleMole__Miscs_GetConfigChannel = 0x051A6000 +MoleMole__Miscs_LoadChannelConfigBlk = 0x051B22D0 +MoleMole__FightModule_OnWindSeedClientNotify = 0x0394F590 +MoleMole__PlayerModule_OnWindSeedClientNotify = 0x030FB280 +MoleMole__PlayerModule_OnReciveLuaShell = 0x053A5CA0 + + +[OSRELWin3.3.0] +il2cpp_string_new = 0x028BBE80 +System__Text__EncodingHelper_GetDefaultEncoding = 0x0890F980 +System__Text__Encoding_GetBytes = 0x08A3F7F0 +MiHoYo__SDK__SDKUtil_RSAEncrypt = 0x08EB3A30 +MoleMole__MoleMoleSecurity_GetPublicRSAKey = 0x04750780 +MoleMole__MoleMoleSecurity_GetPrivateRSAKey = 0x047510F0 +MoleMole__ConfigUtil_LoadJSONStrConfig = 0x05978F20 +UnityEngine__JsonUtility_FromJson = 0x0 +MoleMole__Miscs_GetConfigChannel = 0x04C95570 +MoleMole__Miscs_LoadChannelConfigBlk = 0x04C9F840 +MoleMole__FightModule_OnWindSeedClientNotify = 0x030FDBF0 +MoleMole__PlayerModule_OnWindSeedClientNotify = 0x045B5880 +MoleMole__PlayerModule_OnReciveLuaShell = 0x02DB3A00 + + +[CNRELWin3.3.0] +il2cpp_string_new = 0x028BF7E0 +System__Text__EncodingHelper_GetDefaultEncoding = 0x08911D30 +System__Text__Encoding_GetBytes = 0x08A41E00 +MiHoYo__SDK__SDKUtil_RSAEncrypt = 0x08EB43F0 +MoleMole__MoleMoleSecurity_GetPublicRSAKey = 0x04755EF0 +MoleMole__MoleMoleSecurity_GetPrivateRSAKey = 0x04756860 +MoleMole__ConfigUtil_LoadJSONStrConfig = 0x0597CC20 +UnityEngine__JsonUtility_FromJson = 0x0 +MoleMole__Miscs_GetConfigChannel = 0x04C9B420 +MoleMole__Miscs_LoadChannelConfigBlk = 0x04CA56F0 +MoleMole__FightModule_OnWindSeedClientNotify = 0x03102500 +MoleMole__PlayerModule_OnWindSeedClientNotify = 0x045BB270 +MoleMole__PlayerModule_OnReciveLuaShell = 0x02DB84E0 + + +[OSRELWin3.4.0] +il2cpp_string_new = 0x02C74710 +System__Text__EncodingHelper_GetDefaultEncoding = 0x090E7820 +System__Text__Encoding_GetBytes = 0x09267C60 +MiHoYo__SDK__SDKUtil_RSAEncrypt = 0x096F7C30 +MoleMole__MoleMoleSecurity_GetPublicRSAKey = 0x04FAA4B0 +MoleMole__MoleMoleSecurity_GetPrivateRSAKey = 0x04FAA8A0 +UnityEngine__JsonUtility_FromJson = 0x099B4470 +MoleMole__Miscs_GetConfigChannel = 0x048787D0 +MoleMole__Miscs_LoadChannelConfigBlk = 0x0487CEE0 +MoleMole__FightModule_OnWindSeedClientNotify = 0x03DD93B0 +MoleMole__PlayerModule_OnWindSeedClientNotify = 0x04E8A4C0 +MoleMole__PlayerModule_OnReciveLuaShell = 0x04E77F50 + +; &reinterpret_cast(klass)[4] is a magic for klass->byval_arg +; &reinterpret_cast(method)[0] is a magic for method->methodPointer +il2cpp__vm__MetadataCache__GetTypeInfoFromTypeDefinitionIndex = 0x02C6A250 +il2cpp__vm__Type__GetName = 0x02C67050 +il2cpp__vm__Class__GetMethods = 0x02C1D960 +il2cpp__vm__Method__GetNameWithGenericTypes = 0x02C67CC0 + + +[CNRELWin3.4.0] +il2cpp_string_new = 0x02C76D30 +System__Text__EncodingHelper_GetDefaultEncoding = 0x090D20A0 +System__Text__Encoding_GetBytes = 0x09252750 +MiHoYo__SDK__SDKUtil_RSAEncrypt = 0x096E29C0 +MoleMole__MoleMoleSecurity_GetPublicRSAKey = 0x04FA03C0 +MoleMole__MoleMoleSecurity_GetPrivateRSAKey = 0x04FA07B0 +UnityEngine__JsonUtility_FromJson = 0x0999FCF0 +MoleMole__Miscs_GetConfigChannel = 0x04870100 +MoleMole__Miscs_LoadChannelConfigBlk = 0x048747E0 +MoleMole__FightModule_OnWindSeedClientNotify = 0x03DD4A10 +MoleMole__PlayerModule_OnWindSeedClientNotify = 0x04E801E0 +MoleMole__PlayerModule_OnReciveLuaShell = 0x04E6DC70 + + +[OSRELWin3.5.0] +il2cpp_string_new = 0x0099AD10 +System__Text__EncodingHelper_GetDefaultEncoding = 0x073384B0 +System__Text__Encoding_GetBytes = 0x074E32B0 +MiHoYo__SDK__SDKUtil_RSAEncrypt = 0x078CDEF0 +MoleMole__MoleMoleSecurity_GetPublicRSAKey = 0x028D8DE0 +MoleMole__MoleMoleSecurity_GetPrivateRSAKey = 0x028D92C0 +UnityEngine__JsonUtility_FromJson = 0x07BD5DB0 +MoleMole__Miscs_GetConfigChannel = 0x03BF85C0 +MoleMole__Miscs_LoadChannelConfigBlk = 0x03BFF820 +MoleMole__FightModule_OnWindSeedClientNotify = 0x00F42F10 +MoleMole__PlayerModule_OnWindSeedClientNotify = 0x019108D0 +MoleMole__PlayerModule_OnReciveLuaShell = 0x01913330 + +; &reinterpret_cast(klass)[26] is a magic for klass->byval_arg +; &reinterpret_cast(method)[1] is a magic for method->methodPointer +il2cpp__vm__MetadataCache__GetTypeInfoFromTypeDefinitionIndex = 0x009907A0 +il2cpp__vm__Type__GetName = 0x0098D5B0 +il2cpp__vm__Class__GetMethods = 0x00943800 +il2cpp__vm__Method__GetNameWithGenericTypes = 0x0098E220 + + +[CNRELWin3.5.0] +il2cpp_string_new = 0x00991B10 +System__Text__EncodingHelper_GetDefaultEncoding = 0x073F89C0 +System__Text__Encoding_GetBytes = 0x075A4FC0 +MiHoYo__SDK__SDKUtil_RSAEncrypt = 0x079922B0 +MoleMole__MoleMoleSecurity_GetPublicRSAKey = 0x0292FDB0 +MoleMole__MoleMoleSecurity_GetPrivateRSAKey = 0x029302A0 +UnityEngine__JsonUtility_FromJson = 0x07C9E600 +MoleMole__Miscs_GetConfigChannel = 0x03C86890 +MoleMole__Miscs_LoadChannelConfigBlk = 0x03C8DC10 +MoleMole__FightModule_OnWindSeedClientNotify = 0x00F465F0 +MoleMole__PlayerModule_OnWindSeedClientNotify = 0x01935210 +MoleMole__PlayerModule_OnReciveLuaShell = 0x01937CE0 + +il2cpp__vm__MetadataCache__GetTypeInfoFromTypeDefinitionIndex = 0x00987590 +il2cpp__vm__Type__GetName = 0x009843D0 +il2cpp__vm__Class__GetMethods = 0x00983AE0 +il2cpp__vm__Method__GetNameWithGenericTypes = 0x00985060