From a283bf8010efdfa8798a56cd314b01cbe06e5c2c Mon Sep 17 00:00:00 2001 From: Nate Brown Date: Mon, 3 May 2021 14:44:13 -0500 Subject: [PATCH] Remove setting dns as it seems to be unnecessary (#35) --- .../kotlin/net/defined/mobile_nebula/NebulaVpnService.kt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/android/app/src/main/kotlin/net/defined/mobile_nebula/NebulaVpnService.kt b/android/app/src/main/kotlin/net/defined/mobile_nebula/NebulaVpnService.kt index 2261c96..2c8a5ff 100644 --- a/android/app/src/main/kotlin/net/defined/mobile_nebula/NebulaVpnService.kt +++ b/android/app/src/main/kotlin/net/defined/mobile_nebula/NebulaVpnService.kt @@ -97,11 +97,6 @@ class NebulaVpnService : VpnService() { builder.addRoute(ipNet.network, ipNet.maskSize.toInt()) } - val cm = getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager - cm.allNetworks.forEach { network -> - cm.getLinkProperties(network).dnsServers.forEach { builder.addDnsServer(it) } - } - try { vpnInterface = builder.establish() nebula = mobileNebula.MobileNebula.newNebula(site!!.config, site!!.getKey(this), site!!.logFile, vpnInterface!!.fd.toLong())