Fix UDP forward
This commit is contained in:
+1
-1
Submodule kcptun/go updated: 3549a9d374...f3e7e7b69f
@@ -1,7 +1,7 @@
|
||||
<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 = {
|
||||
|
||||
val fd = startVpn()
|
||||
if (!sendFd(fd)) return false
|
||||
|
||||
if (profile.kcp) {
|
||||
startKcptunDaemon()
|
||||
}
|
||||
|
||||
startShadowsocksDaemon()
|
||||
|
||||
if (profile.udpdns && profile.kcp) {
|
||||
startShadowsocksUDPDaemon()
|
||||
}
|
||||
|
||||
if (!profile.udpdns) {
|
||||
startDnsDaemon()
|
||||
startDnsTunnel()
|
||||
}
|
||||
|
||||
startShadowsocksDaemon()
|
||||
|
||||
if (profile.udpdns) {
|
||||
startShadowsocksUDPDaemon()
|
||||
}
|
||||
|
||||
val fd = startVpn()
|
||||
val ret = sendFd(fd)
|
||||
|
||||
if (ret && profile.kcp) {
|
||||
startKcptunDaemon()
|
||||
}
|
||||
|
||||
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")
|
||||
|
||||
Reference in New Issue
Block a user