diff --git a/app/src/main/java/xfk233/GenshinProxy/MainHook.kt b/app/src/main/java/xfk233/GenshinProxy/MainHook.kt index 0ad8ced..a9474bb 100644 --- a/app/src/main/java/xfk233/GenshinProxy/MainHook.kt +++ b/app/src/main/java/xfk233/GenshinProxy/MainHook.kt @@ -97,8 +97,8 @@ class MainHook : IXposedHookLoadPackage, IXposedHookZygoteInit { forceUrl = sp.getBoolean("forceUrl", false) server = sp.getString("serverip", "") ?: "" proxyList = sp.getBoolean("ProxyList", false) + if (sp.getBoolean("KeepSSL", false)) sslHook(lpparam) } - sslHook(lpparam) hook() findMethod(Activity::class.java, true) { name == "onCreate" }.hookBefore { param -> activity = param.thisObject as Activity @@ -182,6 +182,16 @@ class MainHook : IXposedHookLoadPackage, IXposedHookZygoteInit { proxyList = b } }) + addView(Switch(activity).apply { + text = moduleRes.getString(R.string.KeepSSL) + isChecked = sp.getBoolean("KeepSSL", false) + setOnCheckedChangeListener { _, b -> + sp.edit().run { + putBoolean("KeepSSL", b) + apply() + } + } + }) }) }) setPositiveButton(moduleRes.getString(R.string.Back)) { _, _ -> diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 8da5460..282e577 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -10,8 +10,9 @@ 只代理列表内的地址 (需重启) 启用悬浮球工具 Hook 配置文件? (需重启) - 强制模式: 强制替换全部域名\n\n请输入服务器地址: + 强制模式: 强制替换全部域名\n请输入服务器地址: 返回 退出游戏 设置 + 跳过SSL证书检查(不稳定)(需重启) \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b924dc5..f955553 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -9,8 +9,9 @@ Only addresses in the proxy list (restart required) Enable tools Hook profile? (restart required) - Forced mode: Forced replacement of all domain names\n\nInput server address: + Forced mode: Forced replacement of all domain names\nInput server address: Back Exit games Settings + Skip SSL certificate check (instable) (restart required) \ No newline at end of file