use loopback address
This commit is contained in:
parent
e6fe25267f
commit
776b7af679
|
@ -205,23 +205,21 @@ public class OrbotVpnService extends VpnService implements Handler.Callback {
|
||||||
// (i.e., Farsi and Arabic).^M
|
// (i.e., Farsi and Arabic).^M
|
||||||
Locale.setDefault(new Locale("en"));
|
Locale.setDefault(new Locale("en"));
|
||||||
|
|
||||||
String localhost = InetAddress.getLocalHost().getHostAddress();
|
String localhost = "127.0.0.1";//InetAddress.getLocalHost().getHostAddress();
|
||||||
|
|
||||||
String vpnName = "OrbotVPN";
|
String vpnName = "OrbotVPN";
|
||||||
String virtualGateway = "10.0.0.1";
|
String virtualGateway = "10.0.0.1";
|
||||||
String virtualIP = "10.0.0.2";
|
String virtualIP = "10.0.0.2";
|
||||||
String virtualNetMask = "255.255.255.0";
|
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;
|
String localDNS = "10.0.0.1" + ':' + TorServiceConstants.TOR_DNS_PORT_DEFAULT;
|
||||||
|
|
||||||
|
|
||||||
Builder builder = new Builder();
|
Builder builder = new Builder();
|
||||||
|
|
||||||
builder.setMtu(VPN_MTU);
|
builder.setMtu(VPN_MTU);
|
||||||
builder.addAddress(virtualGateway,28);
|
builder.addAddress(virtualGateway,28);
|
||||||
builder.setSession(vpnName);
|
builder.setSession(vpnName);
|
||||||
builder.addRoute("0.0.0.0",0);
|
builder.addRoute("0.0.0.0",0);
|
||||||
// builder.addDnsServer("8.8.8.8");
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue