Commit 4817539c authored by Max Lv's avatar Max Lv

Fix UDP forward

parent 03c85753
Subproject commit 3549a9d3740b5cd9d284cdad1d101bd14888cc85
Subproject commit f3e7e7b69f0fd0c22858d09b4dd3764ed703d140
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" package="com.github.shadowsocks"
android:versionCode="143"
android:versionName="3.0.1">
android:versionCode="144"
android:versionName="3.0.2">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
......
......@@ -182,25 +182,25 @@ class ShadowsocksVpnService extends VpnService with BaseService {
/** Called when the activity is first created. */
def handleConnection: Boolean = {
if (!profile.udpdns) {
startDnsDaemon()
startDnsTunnel()
val fd = startVpn()
if (!sendFd(fd)) return false
if (profile.kcp) {
startKcptunDaemon()
}
startShadowsocksDaemon()
if (profile.udpdns) {
if (profile.udpdns && profile.kcp) {
startShadowsocksUDPDaemon()
}
val fd = startVpn()
val ret = sendFd(fd)
if (ret && profile.kcp) {
startKcptunDaemon()
if (!profile.udpdns) {
startDnsDaemon()
startDnsTunnel()
}
ret
true
}
def startKcptunDaemon() {
......@@ -274,6 +274,8 @@ class ShadowsocksVpnService extends VpnService with BaseService {
if (profile.auth) cmd += "-A"
if (profile.udpdns && !profile.kcp) cmd += "-u"
if (profile.route != Route.ALL) {
cmd += "--acl"
cmd += (getApplicationInfo.dataDir + "/acl.list")
......
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