Path for Firefox Proxy Auto confiuration script ?

Hey all , I’ve been using a very basic Auto Configuration script file (proxy.pac) file for a little over a year now , but something isn’t working with Firefox and OpenSuse 11.0

I have the .pac file saved in /home/user/bin/proxy.pac

This same file works great on my Windows machine and has also worked on previous linux machines. But not today.

I’ve tried :
**
file:///home/user/bin/proxy.pac
file://home/user/bin/proxy.pac
file:////home/user/bin/proxy.pac**

It’s my understanding that Firefox needs file://<path to file>

So am I correct in using the 3 slash format ?
**
file:///home/user/bin/proxy.pac**

I feel like I remember this issue a year ago when I first did this on SLED 10.3 Is there some quotes I’m missing or something else ?

facts:
No error, it just times out as if the proxy is not being set when reading the script.
Manual proxy works fine in firefox
IP address and Subnet match the proxy.pac requirements
Manual proxy is setup in Yast proxy settings and is working fine.

Any help would be much appreciated.

PAC files need to be served by a web server as the MIME type is application/ns-proxy-autoconfig (or something similar, too lazy to go check). Using a file might have worked in the past, I seem to recall I did it once, but Mozilla may have revoked that latitude now.

Would they have reworked that option only in the Linux Version ?

It definitely is still working in my windows Firefox. Both Suse and windows are using v3.0.4

Have you looked in the Javascript Error Console to see if there were any complaints about your JS (which is what the PAC file is really)?

Three slashes are required for file URLs. The reason is this:

file:// is the protocol
/home/user/proxy.pac is the resource.

Are you referring to the error log from within Firefox ? Ir the Java control panel and turn on the logging ?

There is also something else , which may or may not be related.

Even when the Proxy is set I am unable to get to some sites.

Gmail is unaccessible ( but can ping gmail.com and mail.google.com )

Google.com is

This site here (forums.opensuse.org)won’t allow me to login but will allow me to view it. and there seems to be nothing in /var/log/messages about it.

Looking through some of the settings , I noticed the “Network Proxy” option in the control center. It offers a script file option , but is currently set to " Use system proxy "

The issue with that is that the system Proxy in Yast does not offer the script option.

Does this mean that perhaps setting this Script path in the Control panel " Network Proxy " option , then it may make a difference ?

Nope that did no good , didn’t think it would but wanted to test just in case.

Tools > Error console

Why not post your proxy.pac? Maybe there’s a blatant Javascript error in it.

The YaST proxy setting is unrelated. It’s for setting a proxy for online updates, etc.

Ok yeah that’s where I was looking previously. Nothing whatsoever other than errors related to page scripting problems …

Here is the .pac script. Very Basic for our standard internal class B network.
**

function FindProxyForURL(url, host)

{

if (isInNet(myIpAddress(), “172.16.0.0”, “255.255.0.0”))

return “PROXY <editedforpublicdisplay>”;

else

return “DIRECT”;

}**

This is an exact copy of the same file I have been using in windows for sometime now and once was able to use with Linux (If I remember correctly )

Looks fine to me. No idea what’s wrong. Not important now, but if this is a non-portable machine, when would you ever use DIRECT? You would always use the proxy on your LAN right?

It’s a laptop and It goes back and fourth everyday

:wink:

Just wondered if it’s a proxy that requires windows authentication or something like that.

No it’s a Novell Bordermanager Proxy (Authentication disabled) that works with a manual setting in the Proxy fields, it just doesn’t seem to be reading the script at all.

Does the script name end in .pac? If it ends in something else the browser might be trying to download it instead of reading it. This doesn’t happen with PAC files served by a web server because the MIME type is sent along, but with a file:// resource, it has to guess from the filename.

Yeah it ends in .pac

As I said this is something I’ve been using for a year or two now, mainly in windows with Firefox , but at one point it worked with SLEd 10.3.

I feel like I saw somewhere that you could make it act like a URL by adding the path with the loopback address :

//127.0.0.1/home/user/bin/proxy.pac

I might try that today.

I don’t have a server to store it on , unless I can talk my boss into letting me store it on the same server as our Corporate .pac file. Which I doubt since it’s mainly for personal use.

That did no good.

Still at a loss here.

No errors in the error erro consol of firefox

I installed HTTPFOX and it shows nothing of relevance.

It just can’t seem to read the Proxy.pac file.

Has anyone been able to make this work in these versions ?

Firefox 3.0.4
OpenSuse 11.0

Sure, have it working fine at a site where a proxy is required to get out. Has always worked for me in Firefox.