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