use loopback address

This commit is contained in:
Nathan Freitas 2015-04-08 17:01:26 -04:00
parent e6fe25267f
commit 776b7af679
1 changed files with 2 additions and 4 deletions

View File

@ -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)
{