Now that gopher works, proxy support has a couple requirements. Based on what I've reverse engineered and tested: 1- Add gopher to preferences UI - some comments in bug 49934 say this is done. I need to look at a recent build. 2- Hook gopher into the underlying prefs - also sounds done. 3- Add support for reading the SOCKS preference if manual proxy is selected by "Gopher Proxy" preference is empty. Gopher probably needs to be have similarly to other proxy-able protocols. I've tried to summarize this behavior here: Netscape 6: Proxy support http://www.packetgram.com/pktg/docs/nscp/ns6/ns6proxy.html 4- Define how this will work with proxy auth, PAC, and the "no proxy"... For testing, someone could look at this generic proxy test, and re-write it to be protocol specific. http://www.packetgram.com/pktg/proxy/genericproxytest.html
The last time I had access to a proxy was in Dec last year, and it worked then. I basically copied stuff from the other code - I haven't tested SOCKS. The one issue is that the gopher port doesn't have an accesskey. This is because we've run out of letters :) mpt mentioned a pref-window rewrite, and sketched out some ideas - I don't know if there is a bug filed. The bugs depending on 49334 are also sort of gopher related, although one of them was a code-level cleanup/speedup for the dirviewer which I was just putting off til later, and may not be worth it with waterson's <outliner> rewrite of directory.xul. Theres also an issue that the proxies need to be done slightly differently. This is next on my list (see a reference in the gopher search bug - I'll handle them together). Please cc me on any other gopher related bugs.
I'm working on fixing up the proxy channel to be wrapped by the nsGopherChannel. This bug may as well do to track it. I should have a patch in a couple of hours. I can't test socks though.
I'm about to attach a patch which works for me, modulo the current newcache proxy bugs. I'd appreciate someone else looking at it - I spent several (for large values of several) hours working out why I crashed just after I ended up in ::Cancel, in some cases. Then I removed the mListener = 0 line. It seems to work, but I'm not sure how much I'd trust it. gdb giving internal errors half the time didn't help matters. I haven't tested on socks proxies, because I don't have one. I also added some NSPR logging stuff.
I might be able to give you external SOCKS access soon. Lean on me when you are ready to test. Also let me know if you access to gopher proxy over HTTP is working for you.
I'm ready to test :) Proxy over HTTP (with SQUID) works fine. I cna probably set up a socks proxy as well locally, I suppose.
bbaetz: patch looks good, but i have a few comments: 1) consider putting nsIRequest ahead of nsIProxy in your implementation of nsGopherChannel::QueryInterface (it's more likely to be queried) 2) make the brace style uniform... please!! 3) remove or #ifdef DEBUG_bbaetz all printf's from your code. they will cause problems for embedders. besides, this is what PR_LOG is for. 4) are you sure you want nsCAutoString's as member variables. even if the proxy host is null, you will be consuming 64 bytes of memory. i think you really want nsCString instead. sr=darin once you fix these.
bbaetz: looks good sr=darin
fix checked in (by darin)
VERIFIED: Mozilla 0.9 all plats. The proxy view always goes to html, where non-proxy uses the tree viewer. Gopher did not proxy auth, but I think that is related to ftp-proxy auth being broken in this build (bug 52615).