diff --git a/build.gradle b/build.gradle index eb82b6bc..68c27f97 100644 --- a/build.gradle +++ b/build.gradle @@ -6,8 +6,8 @@ ext { sdkVersion = 33 compileSdkVersion = 33 buildToolsVersion = '31.0.0' - versionCode = 530 - versionName = '5.3.0' + versionCode = 531 + versionName = '5.3.1' resConfigs = ['zh-rCN'] } diff --git a/core/src/main/java/com/github/shadowsocks/bg/OverTlsWrapper.kt b/core/src/main/java/com/github/shadowsocks/bg/OverTlsWrapper.kt index 2b1b619f..582756a3 100644 --- a/core/src/main/java/com/github/shadowsocks/bg/OverTlsWrapper.kt +++ b/core/src/main/java/com/github/shadowsocks/bg/OverTlsWrapper.kt @@ -8,7 +8,7 @@ object OverTlsWrapper { } @JvmStatic - external fun runClient(vpnService: VpnService, cofigPath: String, statPath: String, verbose: Boolean): Int + external fun runClient(vpnService: VpnService, cofigPath: String, statPath: String, verbosity: Int): Int @JvmStatic external fun stopClient(): Int diff --git a/core/src/main/java/com/github/shadowsocks/bg/ProxyInstance.kt b/core/src/main/java/com/github/shadowsocks/bg/ProxyInstance.kt index 3086f55b..b1807dcf 100644 --- a/core/src/main/java/com/github/shadowsocks/bg/ProxyInstance.kt +++ b/core/src/main/java/com/github/shadowsocks/bg/ProxyInstance.kt @@ -156,7 +156,8 @@ class ProxyInstance(val profile: Profile, private val route: String = profile.ro override fun run() { super.run() if (isOverTls) { - vpnService?.let { OverTlsWrapper.runClient(it, configPath(), statPath(), verbose()) } + val verbosity = if (verbose()) 5 else 3 + vpnService?.let { OverTlsWrapper.runClient(it, configPath(), statPath(), verbosity) } } else { cmd?.let { SsrClientWrapper.runSsrClient(it) } } diff --git a/core/src/main/java/com/github/shadowsocks/bg/SsrVpnService.kt b/core/src/main/java/com/github/shadowsocks/bg/SsrVpnService.kt index 17ae8c8d..b1130647 100644 --- a/core/src/main/java/com/github/shadowsocks/bg/SsrVpnService.kt +++ b/core/src/main/java/com/github/shadowsocks/bg/SsrVpnService.kt @@ -245,7 +245,9 @@ class SsrVpnService : VpnService(), LocalDnsService.Interface { private val dnsOverTcp: Boolean ) : Thread() { override fun run() { - Tun2proxy.run(proxyUrl, tunFd, tunMtu, verbose, dnsOverTcp) + val verbosity = if (verbose) 5 else 3 + val dnsStrategy = if (dnsOverTcp) 1 else 2 + Tun2proxy.run(proxyUrl, tunFd, tunMtu.toChar(), verbosity, dnsStrategy) } fun terminate() { diff --git a/core/src/main/java/com/github/shadowsocks/bg/Tun2proxy.kt b/core/src/main/java/com/github/shadowsocks/bg/Tun2proxy.kt index 41a17e60..d5364501 100644 --- a/core/src/main/java/com/github/shadowsocks/bg/Tun2proxy.kt +++ b/core/src/main/java/com/github/shadowsocks/bg/Tun2proxy.kt @@ -6,7 +6,7 @@ object Tun2proxy { } @JvmStatic - external fun run(proxyUrl: String, tunFd: Int, tunMtu: Int, verbose: Boolean, dnsOverTcp: Boolean): Int + external fun run(proxyUrl: String, tunFd: Int, tunMtu: Char, verbosity: Int, dnsStrategy: Int): Int @JvmStatic external fun stop(): Int diff --git a/rust/overtls b/rust/overtls index 38dbd353..142abb79 160000 --- a/rust/overtls +++ b/rust/overtls @@ -1 +1 @@ -Subproject commit 38dbd353b3d3cbf723da8fd551b3aecbca7cd3a5 +Subproject commit 142abb799014729a60862032f58f6d5f14d8c511 diff --git a/rust/tun2proxy b/rust/tun2proxy index 80673940..9f60eee2 160000 --- a/rust/tun2proxy +++ b/rust/tun2proxy @@ -1 +1 @@ -Subproject commit 806739400308ff37a81a385329c295f57176d12d +Subproject commit 9f60eee2e1db357c1683f06b756f121dbb356f5b