Skip to content

Commit

Permalink
update libs
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Nov 17, 2023
1 parent 0d68bf9 commit 374e18c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
8 changes: 5 additions & 3 deletions core/src/main/java/com/github/shadowsocks/bg/SsrVpnService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ class SsrVpnService : VpnService(), LocalDnsService.Interface {
val tunFd = conn.getFd()
val tunMtu = VPN_MTU
val verbose = BuildConfig.DEBUG
val dnsOverTcp = !(DataStore.useOverTLS && profile.isOverTLS())

tunThread = Tun2proxyThread(proxyUrl, tunFd, tunMtu, verbose)
tunThread = Tun2proxyThread(proxyUrl, tunFd, tunMtu, verbose, dnsOverTcp)
tunThread?.isDaemon = true
tunThread?.start()
} else {
Expand Down Expand Up @@ -240,10 +241,11 @@ class SsrVpnService : VpnService(), LocalDnsService.Interface {
private val proxyUrl: String,
private val tunFd: Int,
private val tunMtu: Int,
private val verbose: Boolean
private val verbose: Boolean,
private val dnsOverTcp: Boolean
) : Thread() {
override fun run() {
Tun2proxy.run(proxyUrl, tunFd, tunMtu, verbose)
Tun2proxy.run(proxyUrl, tunFd, tunMtu, verbose, dnsOverTcp)
}

fun terminate() {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/com/github/shadowsocks/bg/Tun2proxy.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ object Tun2proxy {
}

@JvmStatic
external fun run(proxyUrl: String, tunFd: Int, tunMtu: Int, verbose: Boolean): Int
external fun run(proxyUrl: String, tunFd: Int, tunMtu: Int, verbose: Boolean, dnsOverTcp: Boolean): Int

@JvmStatic
external fun stop(): Int
Expand Down
1 change: 1 addition & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[workspace]
resolver = "2"
members = ["./overtls", "./tun2proxy"]
2 changes: 1 addition & 1 deletion rust/tun2proxy

0 comments on commit 374e18c

Please sign in to comment.