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