[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] enable TransProxy and DNSPort by default without root
commit fd45fa38f6ac4382a8c19f8a859ba76b709cd40e
Author: Nathan Freitas <nathan@xxxxxxxxxxx>
Date: Thu Jan 28 09:24:07 2016 -0500
enable TransProxy and DNSPort by default without root
- some users run their own iptables transproxy scripts with AFWall and need Orbot to have these ports open by default. There is no risk to enable them by default, so we'll them on for now, and think about how to better make this a user option in the future.
---
src/org/torproject/android/service/TorService.java | 28 ++++++++------------
1 file changed, 11 insertions(+), 17 deletions(-)
diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java
index 09c04ed..94e3317 100644
--- a/src/org/torproject/android/service/TorService.java
+++ b/src/org/torproject/android/service/TorService.java
@@ -637,26 +637,21 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
extraLines.append("SafeSocks 0").append('\n');
extraLines.append("TestSocks 0").append('\n');
extraLines.append("WarnUnsafeSocks 1").append('\n');
-
- if (Prefs.useTransparentProxying())
- {
- String transPort = prefs.getString("pref_transport", TorServiceConstants.TOR_TRANSPROXY_PORT_DEFAULT+"");
- String dnsPort = prefs.getString("pref_dnsport", TorServiceConstants.TOR_DNS_PORT_DEFAULT+"");
+ String transPort = prefs.getString("pref_transport", TorServiceConstants.TOR_TRANSPROXY_PORT_DEFAULT+"");
+ String dnsPort = prefs.getString("pref_dnsport", TorServiceConstants.TOR_DNS_PORT_DEFAULT+"");
- extraLines.append("TransPort ").append(transPort).append('\n');
- extraLines.append("DNSPort ").append(dnsPort).append("\n");
+ extraLines.append("TransPort ").append(transPort).append('\n');
+ extraLines.append("DNSPort ").append(dnsPort).append("\n");
- if (Prefs.transparentTethering())
- {
- extraLines.append("TransListenAddress 0.0.0.0").append('\n');
- extraLines.append("DNSListenAddress 0.0.0.0").append('\n');
- }
-
- extraLines.append("VirtualAddrNetwork 10.192.0.0/10").append('\n');
- extraLines.append("AutomapHostsOnResolve 1").append('\n');
-
+ if (Prefs.transparentTethering())
+ {
+ extraLines.append("TransListenAddress 0.0.0.0").append('\n');
+ extraLines.append("DNSListenAddress 0.0.0.0").append('\n');
}
+
+ extraLines.append("VirtualAddrNetwork 10.192.0.0/10").append('\n');
+ extraLines.append("AutomapHostsOnResolve 1").append('\n');
extraLines.append("DisableNetwork 0").append('\n');
@@ -830,7 +825,6 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
}
-
SharedPreferences prefs = TorServiceUtils.getSharedPrefs(getApplicationContext());
String transProxy = prefs.getString("pref_transport", TorServiceConstants.TOR_TRANSPROXY_PORT_DEFAULT+"");
String dnsPort = prefs.getString("pref_dnsport", TorServiceConstants.TOR_TRANSPROXY_PORT_DEFAULT+"");
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits