Forward DNS packet to dnsgw
This commit is contained in:
Submodule mobile/src/main/jni/badvpn updated: 057ed9f364...af4a5647ea
@@ -317,7 +317,7 @@ trait BaseService extends Service {
|
||||
|
||||
protected final def buildOvertureConfig(file: String): String = {
|
||||
val config = new JSONObject()
|
||||
.put("BindAddress", "0.0.0.0:" + (profile.localPort + 53))
|
||||
.put("BindAddress", "127.0.0.1:" + (profile.localPort + 53))
|
||||
.put("RedirectIPv6Record", true)
|
||||
.put("DomainBase64Decode", true)
|
||||
.put("HostsFile", "hosts")
|
||||
|
||||
@@ -143,7 +143,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
|
||||
|
||||
/** Called when the activity is first created. */
|
||||
def handleConnection() {
|
||||
|
||||
|
||||
startShadowsocksDaemon()
|
||||
|
||||
if (!profile.udpdns) {
|
||||
@@ -247,7 +247,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
|
||||
cmd += "--enable-udprelay"
|
||||
|
||||
if (!profile.udpdns)
|
||||
cmd += ("--dnsgw", "%s:%d".formatLocal(Locale.ENGLISH, PRIVATE_VLAN.formatLocal(Locale.ENGLISH, "1"),
|
||||
cmd += ("--dnsgw", "%s:%d".formatLocal(Locale.ENGLISH, "127.0.0.1",
|
||||
profile.localPort + 53))
|
||||
|
||||
tun2socksProcess = new GuardedProcess(cmd: _*).start(() => sendFd(fd))
|
||||
|
||||
Reference in New Issue
Block a user