temporarily use udpgw-client to make DNS and UDP tunneling to work
This commit is contained in:
parent
f9e340b465
commit
2d98a29d82
|
@ -66,6 +66,11 @@
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<item android:id="@+id/menu_vpn"
|
||||||
|
android:title="@string/menu_vpn"
|
||||||
|
yourapp:showAsAction="never"/>
|
||||||
|
|
||||||
|
|
||||||
<item android:id="@+id/menu_exit"
|
<item android:id="@+id/menu_exit"
|
||||||
android:title="@string/menu_exit"
|
android:title="@string/menu_exit"
|
||||||
android:icon="@drawable/ic_menu_exit"
|
android:icon="@drawable/ic_menu_exit"
|
||||||
|
@ -73,9 +78,6 @@
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<item android:id="@+id/menu_vpn"
|
|
||||||
android:title="start VPN"
|
|
||||||
yourapp:showAsAction="never"/>
|
|
||||||
<!--
|
<!--
|
||||||
<item android:id="@+id/menu_diag"
|
<item android:id="@+id/menu_diag"
|
||||||
android:title="Test Mode"
|
android:title="Test Mode"
|
||||||
|
|
|
@ -301,4 +301,5 @@
|
||||||
<string name="you_do_not_have_root_access_enabled">You do not have ROOT access enabled</string>
|
<string name="you_do_not_have_root_access_enabled">You do not have ROOT access enabled</string>
|
||||||
<string name="you_may_need_to_stop_and_start_orbot_for_settings_change_to_be_enabled_">You may need to stop and start Orbot for settings change to be enabled.</string>
|
<string name="you_may_need_to_stop_and_start_orbot_for_settings_change_to_be_enabled_">You may need to stop and start Orbot for settings change to be enabled.</string>
|
||||||
|
|
||||||
|
<string name="menu_vpn">Start VPN</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -87,7 +87,7 @@ public class OrbotVpnService extends VpnService implements Handler.Callback {
|
||||||
mProxyServer.setVpnService(OrbotVpnService.this);
|
mProxyServer.setVpnService(OrbotVpnService.this);
|
||||||
mProxyServer.start(mSocksProxyPort, 5, InetAddress.getLocalHost());
|
mProxyServer.start(mSocksProxyPort, 5, InetAddress.getLocalHost());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
Log.d(TAG,"proxy server error: " + e.getLocalizedMessage(),e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -133,22 +133,14 @@ public class OrbotVpnService extends VpnService implements Handler.Callback {
|
||||||
builder.setSession("OrbotVPN");
|
builder.setSession("OrbotVPN");
|
||||||
builder.addRoute("0.0.0.0",0);
|
builder.addRoute("0.0.0.0",0);
|
||||||
builder.addRoute("10.0.0.0",8);
|
builder.addRoute("10.0.0.0",8);
|
||||||
//builder.addDnsServer("10.0.0.2");
|
builder.addDnsServer("8.8.8.8");
|
||||||
builder.addDnsServer("127.0.0.1");
|
|
||||||
// Close the old interface since the parameters have been changed.
|
|
||||||
try {
|
|
||||||
mInterface.close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
// ignore
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Create a new interface using the builder and save the parameters.
|
// Create a new interface using the builder and save the parameters.
|
||||||
mInterface = builder.setSession(mSessionName)
|
mInterface = builder.setSession(mSessionName)
|
||||||
.setConfigureIntent(mConfigureIntent)
|
.setConfigureIntent(mConfigureIntent)
|
||||||
.establish();
|
.establish();
|
||||||
|
|
||||||
Tun2Socks.Start(mInterface, 3000, "10.0.0.2", "255.255.255.0", "localhost:" + TorServiceConstants.PORT_SOCKS_DEFAULT, null, true);
|
Tun2Socks.Start(mInterface, 3000, "10.0.0.2", "255.255.255.0", "localhost:" + TorServiceConstants.PORT_SOCKS_DEFAULT, "50.116.51.157:7300", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue