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.
This commit is contained in:
parent
b76a2504bb
commit
fd45fa38f6
|
@ -638,26 +638,21 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
|
||||||
extraLines.append("TestSocks 0").append('\n');
|
extraLines.append("TestSocks 0").append('\n');
|
||||||
extraLines.append("WarnUnsafeSocks 1").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+"");
|
||||||
|
|
||||||
|
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');
|
||||||
String transPort = prefs.getString("pref_transport", TorServiceConstants.TOR_TRANSPROXY_PORT_DEFAULT+"");
|
extraLines.append("DNSListenAddress 0.0.0.0").append('\n');
|
||||||
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");
|
|
||||||
|
|
||||||
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("VirtualAddrNetwork 10.192.0.0/10").append('\n');
|
||||||
|
extraLines.append("AutomapHostsOnResolve 1").append('\n');
|
||||||
|
|
||||||
extraLines.append("DisableNetwork 0").append('\n');
|
extraLines.append("DisableNetwork 0").append('\n');
|
||||||
|
|
||||||
if (Prefs.useDebugLogging())
|
if (Prefs.useDebugLogging())
|
||||||
|
@ -830,7 +825,6 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SharedPreferences prefs = TorServiceUtils.getSharedPrefs(getApplicationContext());
|
SharedPreferences prefs = TorServiceUtils.getSharedPrefs(getApplicationContext());
|
||||||
String transProxy = prefs.getString("pref_transport", TorServiceConstants.TOR_TRANSPROXY_PORT_DEFAULT+"");
|
String transProxy = prefs.getString("pref_transport", TorServiceConstants.TOR_TRANSPROXY_PORT_DEFAULT+"");
|
||||||
String dnsPort = prefs.getString("pref_dnsport", TorServiceConstants.TOR_TRANSPROXY_PORT_DEFAULT+"");
|
String dnsPort = prefs.getString("pref_dnsport", TorServiceConstants.TOR_TRANSPROXY_PORT_DEFAULT+"");
|
||||||
|
|
Loading…
Reference in New Issue