commit 776b7af679b4559630c544684b17346e9299df7f Author: Nathan Freitas nathan@freitas.net Date: Wed Apr 8 17:01:26 2015 -0400
use loopback address --- src/org/torproject/android/vpn/OrbotVpnService.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/org/torproject/android/vpn/OrbotVpnService.java b/src/org/torproject/android/vpn/OrbotVpnService.java index f2a0e96..ee9acc2 100644 --- a/src/org/torproject/android/vpn/OrbotVpnService.java +++ b/src/org/torproject/android/vpn/OrbotVpnService.java @@ -205,23 +205,21 @@ public class OrbotVpnService extends VpnService implements Handler.Callback { // (i.e., Farsi and Arabic).^M Locale.setDefault(new Locale("en")); - String localhost = InetAddress.getLocalHost().getHostAddress(); + String localhost = "127.0.0.1";//InetAddress.getLocalHost().getHostAddress(); String vpnName = "OrbotVPN"; String virtualGateway = "10.0.0.1"; String virtualIP = "10.0.0.2"; String virtualNetMask = "255.255.255.0"; - String localSocks = localhost + ':' + TorServiceConstants.PORT_SOCKS_DEFAULT;//+ "127.0.0.1" + String localSocks = localhost + ':' + TorServiceConstants.PORT_SOCKS_DEFAULT; String localDNS = "10.0.0.1" + ':' + TorServiceConstants.TOR_DNS_PORT_DEFAULT; - Builder builder = new Builder(); builder.setMtu(VPN_MTU); builder.addAddress(virtualGateway,28); builder.setSession(vpnName); builder.addRoute("0.0.0.0",0); - // builder.addDnsServer("8.8.8.8"); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {