keep SOCKS port as default 9050 (instead of 'auto')

This commit is contained in:
Nathan Freitas 2014-06-06 17:01:18 -04:00
parent 53637209ae
commit 451cfed0ac
4 changed files with 4 additions and 6 deletions

View File

@ -201,7 +201,7 @@ android:dialogTitle="@string/pref_proxy_password_dialog"
android:title="@string/pref_socks_title"
android:summary="@string/pref_socks_summary"
android:dialogTitle="@string/pref_socks_dialog"
android:defaultValue="auto"
android:defaultValue="9050"
/>
<CheckBoxPreference

View File

@ -19,7 +19,6 @@ import java.net.Socket;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.StringTokenizer;
import java.util.Timer;
@ -122,7 +121,6 @@ public class TorService extends Service implements TorServiceConstants, TorConst
public void logMessage(String msg)
{
if (ENABLE_DEBUG_LOG)
{
Log.d(TAG,msg);
sendCallbackLogMessage(msg);
@ -1702,7 +1700,7 @@ public class TorService extends Service implements TorServiceConstants, TorConst
SharedPreferences prefs = TorServiceUtils.getSharedPrefs(getApplicationContext());
String socksConfig = prefs.getString(TorConstants.PREF_SOCKS, "auto");
String socksConfig = prefs.getString(TorConstants.PREF_SOCKS, TorServiceConstants.PORT_SOCKS_DEFAULT);
enableSocks (socksConfig,false);

View File

@ -49,7 +49,7 @@ public interface TorServiceConstants {
public final static int PORT_HTTP = 8118; //just like Privoxy!
//Socks port client connects to, server is the Tor binary
public final static int PORT_SOCKS = 9050;
public final static String PORT_SOCKS_DEFAULT = "9050";
//what is says!
public final static String IP_LOCALHOST = "127.0.0.1";

View File

@ -711,7 +711,7 @@ public class TorTransProxy implements TorServiceConstants {
script.append(" -A ").append(srcChainName);
script.append(" -p tcp");
script.append(" -m tcp");
script.append(" --dport ").append(PORT_SOCKS);
script.append(" --dport ").append(PORT_SOCKS_DEFAULT);
script.append(" -j ACCEPT");
executeCommand (shell, script.toString());