gopher needs to wrap the proxy channel

VERIFIED FIXED in mozilla0.9



18 years ago
18 years ago


(Reporter: benc, Assigned: bbaetz)



Firefox Tracking Flags

(Not tracked)



(2 attachments)



18 years ago
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

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.

Comment 1

18 years ago
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

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

Please cc me on any other gopher related bugs.

Comment 2

18 years ago
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.
Summary: Proxy preferences for gopher → gopher needs to wrap the proxy channel


18 years ago
Target Milestone: --- → mozilla0.9

Comment 3

18 years ago
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

I haven't tested on socks proxies, because I don't have one.

I also added some NSPR logging stuff.

Comment 4

18 years ago
Created attachment 28713 [details] [diff] [review]

Comment 5

18 years ago
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.

Comment 6

18 years ago
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.

Comment 7

18 years ago
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.

Comment 8

18 years ago
Created attachment 29094 [details] [diff] [review]
new patch - fixes load attributes as well

Comment 9

18 years ago
bbaetz: looks good sr=darin

Comment 11

18 years ago
fix checked in (by darin)
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 12

18 years ago
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).
You need to log in before you can comment on or make changes to this bug.