[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] fixes for transparent proxy tethering



commit 803620957a09ed873cd08cbff0b39df505037d4b
Author: Nathan Freitas <nathan@xxxxxxxxxxx>
Date:   Sat Aug 2 01:15:01 2014 -0400

    fixes for transparent proxy tethering
---
 .../android/service/TorResourceInstaller.java           |    5 -----
 src/org/torproject/android/service/TorService.java      |   15 ++++++++-------
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/org/torproject/android/service/TorResourceInstaller.java b/src/org/torproject/android/service/TorResourceInstaller.java
index 923e841..3c0563b 100644
--- a/src/org/torproject/android/service/TorResourceInstaller.java
+++ b/src/org/torproject/android/service/TorResourceInstaller.java
@@ -78,11 +78,6 @@ public class TorResourceInstaller implements TorServiceConstants {
 		shell.add(new SimpleCommand(COMMAND_RM_FORCE + outFile.getAbsolutePath())).waitForFinish();
 		streamToFile(is,outFile, false, false);
 		
-		is = context.getResources().openRawResource(R.raw.torrctether);		
-		outFile = new File(installFolder, TORRC_TETHER_KEY);
-		shell.add(new SimpleCommand(COMMAND_RM_FORCE + outFile.getAbsolutePath())).waitForFinish();
-		streamToFile(is, outFile, false, false);
-
 		is = context.getResources().openRawResource(R.raw.torpolipo);
 		outFile = new File(installFolder, POLIPOCONFIG_ASSET_KEY);
 		shell.add(new SimpleCommand(COMMAND_RM_FORCE + outFile.getAbsolutePath())).waitForFinish();
diff --git a/src/org/torproject/android/service/TorService.java b/src/org/torproject/android/service/TorService.java
index a147bae..dc67433 100644
--- a/src/org/torproject/android/service/TorService.java
+++ b/src/org/torproject/android/service/TorService.java
@@ -642,6 +642,14 @@ public class TorService extends Service implements TorServiceConstants, TorConst
  		String transPort = prefs.getString("pref_transport", TorServiceConstants.TOR_TRANSPROXY_PORT_DEFAULT+"");
  		String dnsPort = prefs.getString("pref_dnsport", TorServiceConstants.TOR_DNS_PORT_DEFAULT+"");
  		
+ 		
+ 		if (mTransProxyTethering)
+ 		{
+ 			extraLines.append("TransListenAddress 0.0.0.0").append('\n');
+ 			extraLines.append("DNSListenAddress 0.0.0.0").append('\n');
+ 			
+ 		}
+ 		
  		extraLines.append("RunAsDaemon 1").append('\n');
  		
  		extraLines.append("AvoidDiskWrites 1").append('\n');
@@ -850,13 +858,6 @@ public class TorService extends Service implements TorServiceConstants, TorConst
 		SharedPreferences prefs =TorServiceUtils.getSharedPrefs(getApplicationContext());
 
 		String torrcPath = new File(appBinHome, TORRC_ASSET_KEY).getCanonicalPath();
-		
-		boolean transProxyTethering = prefs.getBoolean("pref_transparent_tethering", false);
- 		
-		if (transProxyTethering)
-		{
-			torrcPath = new File(appBinHome, TORRC_TETHER_KEY).getCanonicalPath();
-		}
 
 		int torRetryWaitTimeMS = 1000;
 		



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits