Ticket #6733: socks-username-6733-torbutton-1.diff

File socks-username-6733-torbutton-1.diff, 993 bytes (added by ben, 7 years ago)

Test: Torbutton change to set username per connection

  • src/chrome/content/torbutton.js

    diff --git a/src/chrome/content/torbutton.js b/src/chrome/content/torbutton.js
    index 75fe7ab..5878383 100644
    a b observe : function(subject, topic, data) { 
    38943894      torbutton_check_progress(null, subject, 0, false);
    38953895  } else if (topic == "http-on-modify-request") {
    38963896      torbutton_eclog(3, 'Modify request: '+subject.name);
     3897      // BenB Test for #6733
     3898      if (subject instanceof Ci.nsIProxiedChannel) {
     3899        torbutton_eclog(3, "have SOCKS proxy channel");
     3900        var channel = subject.QueryInterface(Ci.nsIProxiedChannel);
     3901        var proxy = channel.proxyInfo;
     3902        torbutton_eclog(3, "have proxy info");
     3903        proxy.username = "abc";
     3904        proxy.password = "def";
     3905        torbutton_eclog(3, "SOCKS username set");
     3906      }
    38973907      if (m_tb_prefs.getBoolPref("extensions.torbutton.xfer_google_cookies")
    38983908            && subject instanceof Ci.nsIHttpChannel) {
    38993909        try {