Commit 9d190fd5 authored by Mygod's avatar Mygod

TCP fast open support for ss-tunnel

parent dd33586f
......@@ -40,13 +40,15 @@ class TransproxyService : Service(), LocalDnsService.Interface {
super<LocalDnsService.Interface>.onStartCommand(intent, flags, startId)
private fun startDNSTunnel() {
data.processes.start(listOf(File(applicationInfo.nativeLibraryDir, Executable.SS_TUNNEL).absolutePath,
val cmd = arrayListOf(File(applicationInfo.nativeLibraryDir, Executable.SS_TUNNEL).absolutePath,
"-t", "10",
"-b", DataStore.listenAddress,
"-u",
"-l", DataStore.portLocalDns.toString(), // ss-tunnel listens on the same port as overture
"-L", data.profile!!.remoteDns.split(",").first().trim() + ":53",
"-c", data.shadowsocksConfigFile!!.absolutePath)) // config is already built by BaseService.Interface
"-c", data.shadowsocksConfigFile!!.absolutePath) // config is already built by BaseService.Interface
if (DataStore.tcpFastOpen) cmd += "--fast-open"
data.processes.start(cmd)
}
private fun startRedsocksDaemon() {
......
Subproject commit 307088ed4af0c54ac4dd55ff3bfda5133ae67d32
Subproject commit cd98427ebda19c8bf295651347039c542658464a
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment