Closed Bug 87394 Opened 24 years ago Closed 19 years ago

ChatZilla doesn't support HTTP "CONNECT" proxy

Categories

(Other Applications Graveyard :: ChatZilla, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: miguelanxotero, Assigned: bugzilla-mozilla-20000923)

References

Details

(Whiteboard: [cz-0.9.75])

Attachments

(2 files, 2 obsolete files)

chatzilla doesn't have support for http proxy althought it is trivial using the HTTP/1.1 method CONNECT. New irc clients now support http proxy (like xchat version 1.7.x)
marking new. see also 71565 and bug 44844
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Chatzilla doesn't have support for http proxy → [RFE]Chatzilla doesn't have support for http proxy
They do that using irc via ssl, so chatzilla would have to support that first. See bug 56291, which won't happen for a while.
Has anyone tried this recently? Or is this a dup of the other proxy bugs? (which were just fixed)
I talked to bbaetz and it doesn't look like this will ever happen.
Remove myself from QA of 33 open Chatzilla bugs and change to default QA contact, since I have no way to verify these easily. Still no working Mozilla on my primary platform and it doesn't look like it will happen anytime soon. :(
QA Contact: mozilla → samuel
Summary: [RFE]Chatzilla doesn't have support for http proxy → Chatzilla doesn't have support for http proxy
I can take QA of this if you want. Are we talking about HTTP proxy or SSL (CONNECT://) proxy? (or both?) Each type of proxy support should be in a separate bug.
Product: Core → Other Applications
It seems like this is fairly simple. I managed to insert a handful of lines into the bc_connect function in connection-xpcom.js which let me connect via an HTTP proxy, based on this tutorial: http://www.codeproject.com/internet/httptunneling.asp You just need to open a connection to the proxy server, and then, once the input stream is open, pass it a CONNECT header with the host and port for the irc server you want to connect to. (The header I used looked like: "CONNECT host:port HTTP/1.1\n\n"). After that everything seemed to work fine, with no other changes to the code. (Although I didn't add any error checking for the connection attempt). I don't know the chatzilla code, but hopefully someone could use this info to fix this bug? :)
Tim, wow, and thanks for actually messing with the code to try things. :) One problem I can see is that currently we don't have *any* proxy code... we just ask Mozilla for a socket transport using protocol "irc", which causes it to use the "other protocol" proxy options, i.e. the SOCKS 4/5 ones. Thus we'd need to add some proxy code, and probably have to work out how to tell the socket transport service what proxy we wanted to use (to let us override the SOCKS 4/5 stuff). I guess the first iteration could simply be a "Use HTTP proxy" option, and let Moz do what it wants with SOCKS 4/5 stuff, but that's not ideal. Thanks for trying anyway, hopefully we'll get around to adding this.
There is more to this than hacking the protocol strings in irc. You need to implement code that optionally wraps any connection in the proxy specified in a pref. Ideally, you'd make this compatible w/ PAC as well.
QA Contact: samuel → benc
Summary: Chatzilla doesn't have support for http proxy → Chatzilla doesn't have support for https proxy
Why did you change the 'http' in the summary to 'https'? We don't support HTTP proxies and that was what I thought was wanted here... We are already 'compatible' with PAC, I believe. I just don't feel like testing it right now. :)
Corrected summary even more... (In reply to comment #10) > Why did you change the 'http' in the summary to 'https'? We don't support HTTP > proxies and that was what I thought was wanted here... "HTTP proxy" does not mean that HTTP is used for the proxy session, it means the proxy of classic HTTP requests (like GET http:, POST http:, etc.). Most proxy servers that proxy HTTP URLs also proxy gopher: and ftp:. Your idea of a proxy is best described as a URL proxy, because HTTP can be used for proxy transport of any URL. For the proxy of CONNECT requests (often described in browsers as "Secure" or "SSL proxy" or <very incorrectly in AOL IM> as "HTTPS", that is distinct from "HTTP proxy". http://www.packetgram.com/pktg/proxy/protocols.html > We are already 'compatible' with PAC, I believe. I just don't feel like testing > it right now. :) Do you support SOCKS? All PAC is is a javascript function that decides which proxy method to call.
Summary: Chatzilla doesn't have support for https proxy → Chatzilla doesn't have support for CONNECT ("Secure)" proxy
(In reply to comment #11) > "HTTP proxy" does not mean that HTTP is used for the proxy session, it means the > proxy of classic HTTP requests (like GET http:, POST http:, etc.). Most proxy > servers that proxy HTTP URLs also proxy gopher: and ftp:. I never said an IRC "HTTP proxy" used HTTP except as a pseudo-HTTP command to do the connect... however, it *is* called 'HTTP proxy' by all other clients I know of. > Your idea of a proxy is best described as a URL proxy, because HTTP can be used > for proxy transport of any URL. Except no-one calls it that. > For the proxy of CONNECT requests (often described in browsers as "Secure" or > "SSL proxy" or <very incorrectly in AOL IM> as "HTTPS", that is distinct from > "HTTP proxy". > > http://www.packetgram.com/pktg/proxy/protocols.html I've never seen 'HTTPS proxy' mentioned anywhere. > Do you support SOCKS? All PAC is is a javascript function that decides which > proxy method to call. We support SOCKS 5, definately. I don't know if Mozilla works with SOCKS 4 for this, but if you set a SOCKS 5 proxy in Mozilla or Firefox all IRC connections use it. I know what PAC is, thank you. I don't, however, know if Mozilla consults it for connections on random ports/protocols, or what it does with the results. It's clearly defined for, say, HTTP, but I've not tried with IRC. IIRC last time I tried it, no IRC connections worked because the proxy being suggested was only allowing HTTP connections to be proxied. I've not looked in detail, it's not my concern, anyway (we ask Moz for a socket from the transport service, it is free to proxy it however it wants, and that is how SOCKS 5 works).
Summary: Chatzilla doesn't have support for CONNECT ("Secure)" proxy → Chatzilla doesn't have support for CONNECT (HTTP/"Secure") proxy
I don't necessarily know the proper name for what I'm doing, but I can say that I got it working for me... I couldn't connect to IRC using chatzilla before, but I can now. :) If it will help make clear what I'm talking about, I can paste my ugly, hacked, code.
Tim, I think we all know what you're talking about, but just can't agree on the name of it. :) Please attach the code, thanks.
What is the relation between this bug and bug 44844 ? I have the feeling they are dupes, but that'd depend on what the 'correct' definition of the proxy would be, and since I know absolutely nothing about the subject, I'm not going to try and make any decisions about this. I'm just noting these bugs are *very* similar. Tim, I think we *would* all like to see your code attached to this bug, even if it'd just be as a sample. It would help a great deal :-).
Attached file Modified version of bc_connect, (obsolete) —
Oops, finals hit right after I made my last comment, causing me to forget about this. :) Attached is a modified version of bc_connect, located in chatzilla.jar\content\chatzilla\lib\js\connection-xpcom.js, line 120. It is hardcoded to use a particular proxy as an http tunnel. There are just two sections I added; The first sets the http proxy's hostname and port, and also constructs the header which will ask the proxy to work as a tunnel. The second section sends this header to the proxy right after the connection is made... and that's it, nothing else needs to be modified. (Although obviously this does zero error checking, and I only altered the code path which used necko interfaces.) Hope this can help. ^_^
OS: Linux → All
Summary: Chatzilla doesn't have support for CONNECT (HTTP/"Secure") proxy → ChatZilla doesn't support HTTP "CONNECT" proxy
Assignee: rginda → silver
QA Contact: benc → samuel
*** Bug 44844 has been marked as a duplicate of this bug. ***
Status: NEW → ASSIGNED
Attached patch Support proxy type overriding (obsolete) — Splinter Review
wheeeee! This patch does a number of fun things. 1. Cleans up the parameters to CBSConnection.connect. It now has all variable data passed via the "config" parameter object. 2. Removes entirely the "bind" and "tcp_flag" items, which are unused. 3. Adds support for forcing an HTTP or no proxy for the connection. Values other than "http" and "none" will behave as no value (i.e. auto). 4. Adds a pref, proxy.typeOverride, that can set this config option globally and per-network. This only applies to the server connection for now - no DCC connections will be affected (they will be proxied as they always have, via SOCKS, if set).
Attachment #178205 - Attachment is obsolete: true
No major differences, just a comment change. But this is now ready, I think. :)
Attachment #229871 - Attachment is obsolete: true
Attachment #230142 - Flags: review?(samuel)
Attachment #230142 - Flags: review?(samuel) → review+
Checked in --> FIXED.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.75]
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1b1) Gecko/20060801 SeaMonkey/1.1a] (nightly) (W98SE) [CZ-0.9.75] The fix causes [ Warning: variable uri hides argument Source File: chrome://chatzilla/content/lib/js/connection-xpcom.js Line: 187, Column: 12 Source Code: var uri = ios.newURI(uri, null, null); ]
SpiderMonkey really needs to fuck off and die sometimes.
Stopgap measures. Rubberstamp requested from Silver.
Attachment #231576 - Flags: review?(silver)
Attachment #231576 - Flags: review?(silver) → review+
Comment on attachment 231576 [details] [diff] [review] Stop Spidermonkey from complaining [Checkin: Comment 24] Checked in, fixed.
Attachment #231576 - Attachment is obsolete: true
Attachment #231576 - Flags: approval-seamonkey1.1a?
Attachment #231576 - Flags: approval-seamonkey1.1a? → approval-seamonkey1.1a+
shouldn't you use a https URL for checking whether to use CONNECT?
I specifically avoided it for two reasons: - Some parts of Necko do their own magic for proxied HTTPS, and wasn't going to risk is messing things up. - We want the HTTP proxy in case that is the only one set.
Whiteboard: [cz-0.9.75] → [checkin needed (1.8 branch): p.231576] [cz-0.9.75]
that doesn't really convince me (since if only HTTP is set, why do you need to use a proxy at all? note that this means that HTTPS doesn't use a proxy at all, and if it doesn't need one, why does CZ?) but anyway... this isn't my module, so your word counts :)
The user is the one that decides whether we need a proxy. If they decided they want the HTTP proxy they get the HTTP proxy. Note that *many* places are blocking IRC ports (6665-6669) but they wont be blocking HTTPS (443). (Unfortunately, Necko has no for us to let the user enter a specific proxy, so we have to borrow an existing one and HTTP is the best one.)
uh, you don't have to borrow anything if you don't want to. nothing stops you from constructing your own proxy info with nsIProtocolProxyService::newProxyInfo and passing that to the socket transport service. hm, except the fact that that's rather new. but, for CONNECT, that's irrelevant. you don't need any kind of proxy info for that.
James / Gijs / Neil: Could you do the missing checkin to the 1.8 branch ? Thanks.
At this point, that branch approval looks rather too stale to still use.
Whiteboard: [checkin needed (1.8 branch): p.231576] [cz-0.9.75] → [cz-0.9.75]
Attachment #230142 - Attachment description: Updated comment to match code → Updated comment to match code [Checkin: See comment 20]
Attachment #231576 - Attachment description: Stop Spidermonkey from complaining → Stop Spidermonkey from complaining [Checkin: Comment 24]
Attachment #231576 - Attachment is obsolete: false
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: