Closed
Bug 98821
Opened 23 years ago
Closed 23 years ago
PAC: s.wong@auckland.ac.nz 's file [SOCKS]
Categories
(Core :: Networking, defect)
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";
}
}
Comment 1•23 years ago
|
||
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
Comment 2•23 years ago
|
||
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]
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? 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.
Attachment #55173 -
Attachment description: PAC component → PAC component (nsProxyAutoConfig.js)
Reporter | ||
Comment 10•23 years ago
|
||
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?
Comment 11•23 years ago
|
||
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.
Comment 12•23 years ago
|
||
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.
Reporter | ||
Comment 13•23 years ago
|
||
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.
Comment 14•23 years ago
|
||
Made a really stupid mistake. Could you try this attachment? Thanks!
Attachment #55173 -
Attachment is obsolete: true
Reporter | ||
Comment 15•23 years ago
|
||
Attachment 60127 [details] gives the same behaviour as the one comes with 0.96, ie mozilla
returns "document:done" without loading any pages.
Comment 16•23 years ago
|
||
is this for SOCKS proxy alone or for all proxies?
Reporter | ||
Comment 17•23 years ago
|
||
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.
Comment 18•23 years ago
|
||
is the PAC file still the same as above?
Reporter | ||
Comment 19•23 years ago
|
||
yes
Comment 20•23 years ago
|
||
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";
}
Comment 21•23 years ago
|
||
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 )
Reporter | ||
Comment 22•23 years ago
|
||
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
Reporter | ||
Comment 23•23 years ago
|
||
Seems like the PAC I posted when originally report this bug somehow got an
extra { under the line with winz.govt.nz
Reporter | ||
Comment 24•23 years ago
|
||
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.
Comment 25•23 years ago
|
||
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
Reporter | ||
Comment 26•23 years ago
|
||
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
Comment 27•23 years ago
|
||
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 ?
Reporter | ||
Comment 28•23 years ago
|
||
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.
Comment 29•23 years ago
|
||
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?
Comment 30•23 years ago
|
||
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.
Comment 31•23 years ago
|
||
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 ?
Reporter | ||
Comment 33•23 years ago
|
||
The pac is now working perfectly with 0.9.9.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 35•23 years ago
|
||
to RESOLVED: WFM (per reporter comments).
When I verify bug 105335, I'll verify this as well.
Status: REOPENED → RESOLVED
Closed: 23 years ago → 23 years ago
Keywords: verifyme
QA Contact: pacqa → benc
Resolution: --- → WORKSFORME
Reporter | ||
Comment 36•23 years ago
|
||
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.
Comment 37•23 years ago
|
||
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.
Comment 38•23 years ago
|
||
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.
Description
•