[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #6733 [Firefox Patch Issues]: Patch Firefox to allow addons to set SOCKS username+password per request
#6733: Patch Firefox to allow addons to set SOCKS username+password per request
-------------------------------------+-------------------------------------
Reporter: mikeperry | Owner: ben
Type: enhancement | Status: needs_information
Priority: major | Milestone:
Component: Firefox Patch | Version:
Issues | Keywords: interview, tbb-
Resolution: | linkability
Actual Points: | Parent ID: #3455
Points: |
-------------------------------------+-------------------------------------
Comment (by ben):
I wrote a test extension, to verify that the API is available at all, and
that we can access and change the information at all, after the channel
has been created. It may be too late to change the proxy info at that
point. Also, proxies connections might be cached. Both could potentially
be a show-stopper.
Seems that is indeed a problem, even earlier than I thought.
I wrote in comment:8
> So, you should be able to:
> var httpChannel = .....QueryInterface(Ci.nsIHttpChannel);
> assert(httpChannel instanceof Ci.nsIHttpChannel);
> assert(httpChannel instanceof Ci.nsIProxiedChannel);
> var proxy = httpChannel.proxyInfo;
Rather:
{{{
var req = new XMLHttpRequest();
// or Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
// .createInstance(Ci.nsIXMLHttpRequest);
req.open("GET", "http://www.torproject.org");
var channel = req.channel;
assert(channel instanceof Ci.nsIHttpChannel);
assert(channel instanceof Ci.nsIProxiedChannel);
var channel = channel.QueryInterface(Ci.nsIProxiedChannel);
assert(channel, "nsIProxiedChannel not found");
assert(channel.proxyInfo, "proxyInfo not found on nsIProxiedChannel");
var proxy = channel.proxyInfo;
}}}
But proxyInfo is null, I get "proxyInfo not found on nsIProxiedChannel".
I get this both in a stock Firefox with an HTTP proxy, and in Tor browser
with my changes. I didn't add the proxyInfo attribute, so this is
unrelated to my changes. So, I'll have to look more into the data flow of
the channel and proxy, to see when a proxyInfo is available.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6733#comment:32>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs