added transparent proxying of port 443 via Tor TransPort and modifed browse check to https://check.torproject.org
svn:r21604
This commit is contained in:
parent
01bf3d0fd1
commit
7b5677227d
|
@ -10,7 +10,7 @@ public interface TorConstants {
|
|||
public final static int FILE_WRITE_BUFFER_SIZE = 2048;
|
||||
|
||||
//path to check Tor against
|
||||
public final static String URL_TOR_CHECK = "http://check.torproject.org";
|
||||
public final static String URL_TOR_CHECK = "https://check.torproject.org";
|
||||
|
||||
public final static int STATUS_UNAVAILABLE = -1;
|
||||
public final static int STATUS_REQUIRES_DEMAND = 0;
|
||||
|
@ -25,7 +25,7 @@ public interface TorConstants {
|
|||
|
||||
public final static String TORRC_DEFAULT =
|
||||
"SocksPort 9050\nSocksListenAddress 127.0.0.1\nSafeSocks 1\nDNSPort 5400\nLog notice stdout\nLog debug syslog\nDataDirectory /data/data/org.torproject.android/data\n"
|
||||
+ "ControlPort 9051\nCookieAuthentication 1\nRelayBandwidthRate 20 KBytes\nRelayBandwidthBurst 20 KBytes\n";
|
||||
+ "ControlPort 9051\nCookieAuthentication 1\nRelayBandwidthRate 20 KBytes\nRelayBandwidthBurst 20 KBytes\nAutomapHostsOnResolve 1\nTransPort 9040\n";
|
||||
|
||||
public final static String INTENT_TOR_SERVICE = "org.torproject.android.service.TOR_SERVICE";
|
||||
|
||||
|
|
|
@ -19,6 +19,8 @@ public final class TorRoot {
|
|||
|
||||
private final static String CMD_NAT_FLUSH = "iptables -t nat -F || exit\n";
|
||||
private final static String CMD_NAT_IPTABLES_80 = "iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to 127.0.0.1:8118 || exit\n";
|
||||
private final static String CMD_NAT_IPTABLES_443 = "iptables -t nat -A OUTPUT -p tcp --dport 443 -j DNAT --to 127.0.0.1:9040 || exit\n";
|
||||
|
||||
private final static String CMD_DNS_PROXYING = "iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to 127.0.0.1:5400 || exit\n";
|
||||
|
||||
public static boolean enableDNSProxying ()
|
||||
|
@ -61,7 +63,7 @@ public final class TorRoot {
|
|||
int code;
|
||||
|
||||
script.append(CMD_NAT_IPTABLES_80);
|
||||
|
||||
script.append(CMD_NAT_IPTABLES_443);
|
||||
/*
|
||||
int uid = android.os.Process.getUidForName("dhcp");
|
||||
if (uid != -1) script.append("iptables -A OUTPUT " + itfFilter + " -m owner --uid-owner " + uid + " -j ACCEPT || exit\n");
|
||||
|
|
Loading…
Reference in New Issue