mirror of
https://github.com/MatsuriDayo/NekoBoxForAndroid.git
synced 2025-12-19 06:30:05 +08:00
fix
This commit is contained in:
parent
686a143b25
commit
a58cf2e251
@ -328,7 +328,7 @@ object RawUpdater : GroupUpdater() {
|
||||
"tls" -> bean.security =
|
||||
if (opt.value.toString() == "true") "tls" else ""
|
||||
|
||||
"servername" -> bean.host = opt.value.toString()
|
||||
"servername" -> bean.sni = opt.value.toString()
|
||||
|
||||
"skip-cert-verify" -> bean.allowInsecure =
|
||||
opt.value.toString() == "true"
|
||||
@ -409,9 +409,6 @@ object RawUpdater : GroupUpdater() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (bean.isTLS() && bean.sni.isNullOrBlank() && !bean.host.isNullOrBlank()) {
|
||||
bean.sni = bean.host
|
||||
}
|
||||
proxies.add(bean)
|
||||
}
|
||||
|
||||
@ -578,8 +575,14 @@ object RawUpdater : GroupUpdater() {
|
||||
proxies.forEach {
|
||||
it.initializeDefaultValues()
|
||||
if (it is StandardV2RayBean) {
|
||||
// 1. SNI
|
||||
if (it.isTLS() && it.sni.isNullOrBlank() && !it.host.isNullOrBlank() && !it.host.isIpAddress()) {
|
||||
it.sni = it.host
|
||||
}
|
||||
// 2. globalClientFingerprint
|
||||
if (!it.realityPubKey.isNullOrBlank() && it.utlsFingerprint.isNullOrBlank()) {
|
||||
it.utlsFingerprint = globalClientFingerprint
|
||||
if (it.utlsFingerprint.isNullOrBlank()) it.utlsFingerprint = "chrome"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ object PluginManager {
|
||||
// internal so
|
||||
if (info.applicationInfo == null) {
|
||||
try {
|
||||
initNativeInternal(pluginId)!!.let { return InitResult(it, info) }
|
||||
initNativeInternal(pluginId)?.let { return InitResult(it, info) }
|
||||
} catch (t: Throwable) {
|
||||
Logs.w("initNativeInternal failed", t)
|
||||
}
|
||||
@ -53,7 +53,7 @@ object PluginManager {
|
||||
}
|
||||
|
||||
try {
|
||||
initNativeFaster(info)!!.let { return InitResult(it, info) }
|
||||
initNativeFaster(info)?.let { return InitResult(it, info) }
|
||||
} catch (t: Throwable) {
|
||||
Logs.w("initNativeFaster failed", t)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user