Closed Bug 98821 Opened 23 years ago Closed 23 years ago

PAC: s.wong@auckland.ac.nz's file [SOCKS]

Categories

(Core :: Networking, defect)

x86
Linux
defect
Not set
blocker

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: s.wong, Unassigned)

References

()

Details

Attachments

(3 files, 1 obsolete file)

From Bugzilla Helper: User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.2.19 i686) BuildID: 2001080104 Mozilla 0.9.3 does not work with the PAC from the specified link. "Document Done" is displayed immediately at the bottom bar, without loading anything. Reproducible: Always Steps to Reproduce: 1. Put http://www.ec.auckland.ac.nz/proxy.pac in the Automatic proxy configuration. 2. Load any page. 3. The automatic proxy page is accessible only if you are already running a network authorisation program called "netaccount". Therefore, it would not be reproducible outside the my university. Here's the PAC: /* * This proxypac was brought to you by... * * ** P A C M A N ** * * ************** **************** * ************************ ************************ * ****************************** **************************** * ******************************** ******* ****** ******* * **************************** ******** ****** ****** * ********************** ******* ****** ******* * **************** ****************************** * ********************** ****************************** * **************************** ****************************** * ******************************** ****************************** * ****************************** ****************************** * ************************ ******** ******** ******** * ************** **** **** **** * * Computer Science Dept. Auckland University */ function FindProxyForURL( url, host ) { /* uni.proxy.pac */ if( url.indexOf( "www.pgsa.auckland.ac.nz" ) > -1 ) { return "SOCKS gate.ec.auckland.ac.nz:1080"; } if( url.indexOf( "burrowes.org" ) > -1 || url.indexOf( "cecil.edu" ) > -1 || url.indexOf( "auckland.ac.nz" ) > -1 || url.indexOf( "hmu.com" ) > -1 ) { return "DIRECT"; } if( isPlainHostName( host ) || host.substring( 0, 8 ) == "130.216." || host == "127.0.0.1" ) { return "DIRECT"; } if( url.indexOf( "winz.govt.nz" ) > -1 ) { { return "SOCKS gate.ec.auckland.ac.nz:1084"; } else if( url.indexOf( "http://" ) > -1 ) { return "PROXY gate.ec.auckland.ac.nz:8008"; } else { return "SOCKS gate.ec.auckland.ac.nz:1080"; } }
Looking through the PAC, the most likely problem is that mozilla doesn't support the SOCKS keyword properly yet. SOCKS is supported, but only through manual config -- the return value from a PAC file isn't handled properly. This is hopefully soon to change.
Status: UNCONFIRMED → NEW
Ever confirmed: true
there's a tentative dependency on bug 78176, since support for version-specific SOCKS values in PAC would preusmably fix basic support as well.
Depends on: 78176
QA Contact: benc → pacqa
Summary: automatic proxy configuration doesn't work → PAC: s.wong@auckland.ac.nz's file [SOCKS]
pac
Assignee: neeti → serge
We need a new bug on this. For one thing, I need a bug number for my functional test results: bug 105335.
reporter: do you build mozilla? If you do could you try applying the last patch listed in bug 105335 ? tingley: think you might be able to help the reporter with getting the patch/hack into his build?
Depends on: 105335
Reporter: do you have a recent build?
Reporter: do you have a recent build? If you do, could you use the component I'm about to attach and test if it works now? Please put it in the components directory.
Attached file PAC component (nsProxyAutoConfig.js) (obsolete) —
Attachment #55173 - Attachment description: PAC component → PAC component (nsProxyAutoConfig.js)
this doesn't depend on bug 78176
No longer depends on: 78176
I didn't build mozilla myself. I'm still using 0.9.4, though getting 0.9.5 won't be a problem. Will the patch make into the main tree so I can test it with a nightly built? Or do I have to get the mozilla source, patch and compile?
reporter: hmm... I must have missed your last post. Try downloading attachment 55173 [details] and save it as nsProxyAutoConfig.js in the components sub-directory in your mozilla directory. You might also want to backup the nsProxyAutoConfig.js that is already there just in case.
I forgot to mention that you can put it in any recent mozilla build (mozilla0.9.5 should work) and restart mozilla after replacing the file.
With attachment 55173 [details] installed, I got the error message "The connection was refused when attempting to contact bugzilla.mozilla.org." when assessing this page. (The original nsProxyAutoConfig.js just returns without doing anything). I tried the file with the linux 0.96 build.
Made a really stupid mistake. Could you try this attachment? Thanks!
Attachment #55173 - Attachment is obsolete: true
Attachment 60127 [details] gives the same behaviour as the one comes with 0.96, ie mozilla returns "document:done" without loading any pages.
is this for SOCKS proxy alone or for all proxies?
The university has 2 proxies. One is SOCKS with the automatic proxy configuration (PAC?). The other is http with the manual configuration. Mozilla has always work with the manual one, but never with the PAC. So the problem is with the SOCKS with PAC.
is the PAC file still the same as above?
yes
do you see anything displayed in the javascript console that might be related to this? from the above PAC there is one part that don't look quite right: if( url.indexOf( "winz.govt.nz" ) > -1 ) { { return "SOCKS gate.ec.auckland.ac.nz:1084"; }
Do you get something like this in the javascript console? Error: syntax error Source File: http://www.ec.auckland.ac.nz/proxy.pac Line: 260, Column: 8 Source Code: else if( url.indexOf( "http://" ) > -1 )
Nothing shows up in the javascript console. Do I have to do anything to make it show messages? Anyway, I've done a more thorough testing of the new nsProxyScript.js. 1. From the list of url on the PAC file, it loads the following fine www.pgsa.auckland.ac.nz www.burrowes.org www.cecil.edu www.auckland.ac.nz (and all the subaddresses) www.hmu.com 2. www.winz.govt.nz gives "The connection was refused when attempting to contact www.winz.govt.nz" 3. With anything else mozilla loads nothing. 4. However, mozilla loads both of the 2 secure sites I've tried - https://mail.zfree.co.nz/ https://www.nbnz.co.nz
Attached file Updated PAC.
Seems like the PAC I posted when originally report this bug somehow got an extra { under the line with winz.govt.nz
I've reloaded the original nsProxyAutoConfig.js and tested it with the same list of urls I used with the new one. Other than the one mark as DIRECT in PAC, nothing loads (including the https ones I tested). It seems with the new script, the SOCKS thing is half working: the first "if" with "SOCKS gate.ec.auckland.ac.nz:1080" works, but none of the other afterwards.
okay from your tests: this part works > if( url.indexOf( "www.pgsa.auckland.ac.nz" ) > -1 ) > { > return "SOCKS gate.ec.auckland.ac.nz:1080"; > } this part works too > if( url.indexOf( "burrowes.org" ) > -1 > || url.indexOf( "cecil.edu" ) > -1 > || url.indexOf( "auckland.ac.nz" ) > -1 > || url.indexOf( "hmu.com" ) > -1 ) > { > return "DIRECT"; > } this part was not tested (but I doubt it should have any problems: > if( isPlainHostName( host ) > || host.substring( 0, 8 ) == "130.216." > || host == "127.0.0.1" ) > { > return "DIRECT"; > } this part does not work: > if( url.indexOf( "winz.govt.nz" ) > -1 ) > { > return "SOCKS gate.ec.auckland.ac.nz:1084"; > } and this part does not work also: > else if( url.indexOf( "http://" ) > -1 ) > { > return "PROXY gate.ec.auckland.ac.nz:8008"; this part does works!! (why? secure sites https:// ): > } else { > return "SOCKS gate.ec.auckland.ac.nz:1080"; > } could you try visiting winz.govt.nz with manual proxy setting: SOCKS host: gate.ec.auckland.ac.nz port number: 1084 SOCKS v4 and www.mozilla.org with manual proxy setting: HTTP proxy gate.ec.auckland.ac.nz port number: 8008
1. SOCKS host: gate.ec.auckland.ac.nz port number: 1080 SOCKS v4 connection refused with www.pgsa.auckland.ac.nz (but works with PAC, wierd) 2. SOCKS host: gate.ec.auckland.ac.nz port number: 1084 SOCKS v4 connection refused with www.winz.govt.nz 3. HTTP proxy gate.ec.auckland.ac.nz port number: 8008 nothing is loaded with www.mozilla.org
s.wong@auckland.ac.nz: you mentioned that there is a manual http proxy setting that can be used, is that setting the same as: HTTP proxy gate.ec.auckland.ac.nz port number: 8008 As for these 2: 1. SOCKS host: gate.ec.auckland.ac.nz port number: 1080 SOCKS v4 connection refused with www.pgsa.auckland.ac.nz (but works with PAC, wierd) 2. SOCKS host: gate.ec.auckland.ac.nz port number: 1084 SOCKS v4 connection refused with www.winz.govt.nz Did you test with the manual http proxy setting set or without (should be tested without)? Can you test the PAC with NN4 ?
The manual http proxy is www-proxy.auckland.ac.nz:8080. It's for staff only. Everyone else have to use the PAC. > Did you test with the manual http proxy setting set or without (should be > tested without)? It's tested without. The only field present is the SOCKS one. > HTTP proxy gate.ec.auckland.ac.nz > port number: 8008 This doesn't work anyway. I tested it with the HTTP field as the only one filled in as well. > Can you test the PAC with NN4 ? I assume you mean netscape 4. It works the PAC. It's one of the supported browsers here. Actually netscape 3 works as well, but I gather that it share the codebase with version 4 anyway.
looks like we might need some packet captures. tingley: is there a chance that the networking code is refusing to connect to some port numbers?
1080 (SOCKS) is the only one of these ports that appears on the blocked port list, but that shouldn't be preventing the use of SOCKS outright (if it is, it would be a bug, but socks support would also be totally broken for almost everyone). If this were the case, adding user_pref("network.security.ports.banned.override", "1080") would fix the problem, but again this shouldn't be necessary. I've verified that the PAC is fine, but haven't done much beyond that.
I'm starting to think that the remaining problems here has nothing to do with PAC, after the patch in 105335 lands on the trunk someone familiar with proxies might need to take a look. s.wong@auckland.ac.nz : any chance of getting a packet capture ?
to default owner
Assignee: serge → new-network-bugs
The pac is now working perfectly with 0.9.9.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
REOPEN...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
to RESOLVED: WFM (per reporter comments). When I verify bug 105335, I'll verify this as well.
Status: REOPENED → RESOLVED
Closed: 23 years ago23 years ago
Keywords: verifyme
QA Contact: pacqa → benc
Resolution: --- → WORKSFORME
Attached file new pac file
This is the new PAC use in the university. It's just for your information as it looks like that you're going to verify the bug. It looks to me not that different from the old one, and shouldn't be the reason why mozilla started working. The only real difference is a plain return is used at the end of the file, instead of a else.
So both worked in Comm 4, but only the new one worked in Mozilla? I'll look at the two files and figure out if there is some syntactical aspect of this we don't understand.
VERIFIED: SOCKS directive works now, so this file should work. If a new file breaks, please file new bug for the file.
Status: RESOLVED → VERIFIED
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: