Closed
Bug 105335
Opened 23 years ago
Closed 23 years ago
PAC: SOCKS directive ignored
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
VERIFIED
FIXED
People
(Reporter: benc, Assigned: tingley)
References
()
Details
(Keywords: testcase)
Attachments
(1 file, 8 obsolete files)
2.58 KB,
patch
|
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
bbaetz says this has been broken for some time, but I haven't bothered to write
a bug until now:
STEPS:
On just about any post 0.9.0 version of mozilla, PAC directives "DIRECT" and
"PROXY" worked, but "SOCKS" never has.
Comment 1•23 years ago
|
||
It not broken, it was just never checked in, because PAC was done before socks4
support was.
Its about 5 lines of code arround line 88 of nsProxyAutoConfig.js - basic, do
you want this?
Don't forget bug 78176.
Attachment #54125 -
Attachment is obsolete: true
Comment 6•23 years ago
|
||
Comment on attachment 54129 [details] [diff] [review]
patch (updated version of attachment 54125 [details] [diff] [review])
>- // TODO warn about SOCKS
>+ // we ignore everything else past the first proxy.
>+ // we could theoretically check isResolvable now and continue
>+ // parsing (see bug 84798). but for now...
>+ var hostport = /^(.....) ([^:]+)(:\d+)?/(proxy);
I'd prefer something which just grabbed the first word, rather than expecting 5 characters.
You should do some sort of error handling if you get an unparsable string, right? Or do we just use DIRECT?
Attachment #54129 -
Flags: needs-work+
currently we just do DIRECT (by not passing a type back). What sort of error
handling do you expect? A javascript error/warning/message?
Attachment #54129 -
Attachment is obsolete: true
Attachment #54109 -
Attachment is obsolete: true
Attachment #54892 -
Attachment is obsolete: true
Comment 10•23 years ago
|
||
improved the regexp a bit, made proxy type matching case insesitive and made
sure that we really ignore everything else past the first proxy.
Attachment #60129 -
Attachment is obsolete: true
Comment 11•23 years ago
|
||
tingley: mind taking another look?
Attachment #61024 -
Attachment is obsolete: true
Comment 12•23 years ago
|
||
I think this is ready for review
Note that if this is checked in bug 112969 will probably need a new testcase or
something.
Comment 13•23 years ago
|
||
Comment on attachment 61242 [details] [diff] [review]
patch (take 5) [includes fix for bug 91630]
>+ type.value = "http";
>+ }
>+ // besides http proxy all other proxy types need a port number
>+ else if(typehostport[3] != null) {
>+ port.value = typehostport[3].substr(1);
Are we not defaulting to 1080 for socks?
r=bbaetz in any event - do what ns4 did.
Attachment #61242 -
Flags: review+
Comment 14•23 years ago
|
||
okay I tested PAC with nn4 and it turns out that SOCKS proxy defaults to port
1080
so here is take 6 (hopefully the last one)
Attachment #61242 -
Attachment is obsolete: true
Comment 15•23 years ago
|
||
the latest attachment is not a patch :P
Comment 16•23 years ago
|
||
Ooooopsssss sorry about that. Here is the patch
Attachment #61413 -
Attachment is obsolete: true
Attachment #61492 -
Attachment description: 61413: patch (take 6) [includes fix for bug 91630] → patch (take 6) [includes fix for bug 91630] (the real thing)
Comment 17•23 years ago
|
||
Comment on attachment 61492 [details] [diff] [review]
patch (take 6) [includes fix for bug 91630] (the real thing)
sr=darin
Attachment #61492 -
Flags: superreview+
Comment 18•23 years ago
|
||
assigning to tingley to get patch in after trunk opens
Assignee: serge → tingley
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 19•23 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 20•23 years ago
|
||
+verifyme
I've added a sample PAC file. You need to download this file and modify it for
your test environment, b/c the SOCKS server mentioned does not exist anymore.
Reporter | ||
Comment 21•23 years ago
|
||
VERIFIED: linux 2002-04-09-08 (pre branch)
Actually, you only need to map the hostname in your /etc/hosts to make the file
work if you want to try it yourself.
After realizing that Linux uses the TCP option for timestamps, was able to use
snoop on my server to verify the version number is 04.
# snoop -i pac -p 4 -x 66
4 0.00000 h-10-169-111-116.nscp.aoltw.net -> carbuncle SOCKS C port=1233
0: 0401 0051 3fc9 391d 4d4f 5a00 ...Q?.9.MOZ.
I'll verify the other platforms some other time.
Status: RESOLVED → VERIFIED
QA Contact: pacqa → benc
Reporter | ||
Comment 22•23 years ago
|
||
uh, this didn't work in the 0.9.4 branch right?
You need to log in
before you can comment on or make changes to this bug.
Description
•