[tor-commits] [torbutton/master] Bug #4453: Set SOCKS port and host only with recommended settings

mikeperry at torproject.org mikeperry at torproject.org
Tue Nov 29 01:35:18 UTC 2011


commit d80b5b93e31836cef95ba984ed04a05f268df66f
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Fri Nov 11 17:49:52 2011 +0100

    Bug #4453: Set SOCKS port and host only with recommended settings
    
    Both can always be overriden on startup using TOR_SOCKS_* environment
    variables.
---
 src/chrome/content/torbutton.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
index 6e076a9..4730048 100644
--- a/src/chrome/content/torbutton.js
+++ b/src/chrome/content/torbutton.js
@@ -3893,7 +3893,7 @@ function torbutton_do_startup()
           if (m_tb_tbb) {
               m_tb_prefs.setIntPref('network.proxy.socks_port', parseInt(environ.get("TOR_SOCKS_PORT")));
           }
-        } else {
+        } else if (m_tb_prefs.getCharPref('extensions.torbutton.settings_method') == 'recommended') {
           m_tb_prefs.setIntPref('extensions.torbutton.socks_port', 9050);
         }
 
@@ -3902,7 +3902,7 @@ function torbutton_do_startup()
           if (m_tb_tbb) {
               m_tb_prefs.setCharPref('network.proxy.socks', environ.get("TOR_SOCKS_HOST"));
           }
-        } else {
+        } else if (m_tb_prefs.getCharPref('extensions.torbutton.settings_method') == 'recommended') {
           m_tb_prefs.setCharPref('extensions.torbutton.socks_host', '127.0.0.1');
         }
 



More information about the tor-commits mailing list