[tor-commits] [orbot/master] temporarily use udpgw-client to make DNS and UDP tunneling to work
n8fr8 at torproject.org
n8fr8 at torproject.org
Fri Nov 14 17:40:34 UTC 2014
commit 2d98a29d821f563f262e2efb71d47ecc9e88a823
Author: Nathan Freitas <nathan at freitas.net>
Date: Fri Oct 24 01:14:54 2014 -0400
temporarily use udpgw-client to make DNS and UDP tunneling to work
---
res/menu/main.xml | 8 +++++---
res/values/strings.xml | 1 +
src/org/torproject/android/vpn/OrbotVpnService.java | 14 +++-----------
3 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/res/menu/main.xml b/res/menu/main.xml
index 4d2ac1a..831897b 100644
--- a/res/menu/main.xml
+++ b/res/menu/main.xml
@@ -66,6 +66,11 @@
/>
+ <item android:id="@+id/menu_vpn"
+ android:title="@string/menu_vpn"
+ yourapp:showAsAction="never"/>
+
+
<item android:id="@+id/menu_exit"
android:title="@string/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"
android:title="Test Mode"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 7c3907b..6f93a83 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -301,4 +301,5 @@
<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="menu_vpn">Start VPN</string>
</resources>
diff --git a/src/org/torproject/android/vpn/OrbotVpnService.java b/src/org/torproject/android/vpn/OrbotVpnService.java
index 1d06723..525a50f 100644
--- a/src/org/torproject/android/vpn/OrbotVpnService.java
+++ b/src/org/torproject/android/vpn/OrbotVpnService.java
@@ -87,7 +87,7 @@ public class OrbotVpnService extends VpnService implements Handler.Callback {
mProxyServer.setVpnService(OrbotVpnService.this);
mProxyServer.start(mSocksProxyPort, 5, InetAddress.getLocalHost());
} 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.addRoute("0.0.0.0",0);
builder.addRoute("10.0.0.0",8);
- //builder.addDnsServer("10.0.0.2");
- builder.addDnsServer("127.0.0.1");
- // Close the old interface since the parameters have been changed.
- try {
- mInterface.close();
- } catch (Exception e) {
- // ignore
- }
+ builder.addDnsServer("8.8.8.8");
-
// Create a new interface using the builder and save the parameters.
mInterface = builder.setSession(mSessionName)
.setConfigureIntent(mConfigureIntent)
.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);
}
}
More information about the tor-commits
mailing list