Ticket #4453: 0001-Bug-4453-Set-SOCKS-port-and-host-only-with-recommend.patch

File 0001-Bug-4453-Set-SOCKS-port-and-host-only-with-recommend.patch, 1.7 KB (added by lunar, 8 years ago)

Possible fix against current master (7c94dc6f635)

  • src/chrome/content/torbutton.js

    From dc34a709516f91b23a76370e0a15755b6f0ce262 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <lunar@debian.org>
    Date: Fri, 11 Nov 2011 17:49:52 +0100
    Subject: [PATCH] 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 |    6 ++----
     1 files changed, 2 insertions(+), 4 deletions(-)
    
    diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
    index 966e574..cd89019 100644
    a b function torbutton_init_prefs() { 
    754754            torprefs.setIntPref('https_port', proxy_port);
    755755            torprefs.setIntPref('ftp_port', proxy_port);
    756756        }
     757        torprefs.setCharPref('socks_host', '127.0.0.1');
     758        torprefs.setIntPref('socks_port', 9050);
    757759    }
    758760
    759761    torbutton_log(1, 'http_port='+torprefs.getIntPref('http_port'));
    function torbutton_do_startup() 
    38913893          if (m_tb_tbb) {
    38923894              m_tb_prefs.setIntPref('network.proxy.socks_port', parseInt(environ.get("TOR_SOCKS_PORT")));
    38933895          }
    3894         } else {
    3895           m_tb_prefs.setIntPref('extensions.torbutton.socks_port', 9050);
    38963896        }
    38973897
    38983898        if (environ.exists("TOR_SOCKS_HOST")) {
    function torbutton_do_startup() 
    39003900          if (m_tb_tbb) {
    39013901              m_tb_prefs.setCharPref('network.proxy.socks', environ.get("TOR_SOCKS_HOST"));
    39023902          }
    3903         } else {
    3904           m_tb_prefs.setCharPref('extensions.torbutton.socks_host', '127.0.0.1');
    39053903        }
    39063904
    39073905        m_tb_prefs.setBoolPref("extensions.torbutton.startup", false);