Operating System - HP-UX
1834152 Members
2653 Online
110064 Solutions
New Discussion

Re: Server Mozilla auto-config for proxy-server

 
BSSG
Frequent Advisor

Server Mozilla auto-config for proxy-server

I've been trying to get a procedure worked out for configuring Mozilla proxy-server for all users on a server, and it doesn't seem to be working out for some mysterious reason unbeknownst to me.

After loading Mozilla 1.4, I go in as root and add a couple of lines to the /opt/mozilla/defaults/pref/all.js file that set the network.proxy.autoconfig_url and network.proxy.type parameters to the appropriate settings for our company. But when I then run Mozilla, the browser is unable to reach outside the company. If I go into the preferences dialog, it shows the correct settings for the auto-load of the proxy-server. Once I click on the "Reload" button, everything works fine and I can reach external web sites. However each time I launch the browser after login, I have to go through the Reload step again in order for the browser to recognize the proxy server.

Has anybody run into this problem and figured out a fix?

Thank you.

--
Bob
6 REPLIES 6
BSSG
Frequent Advisor

Re: Server Mozilla auto-config for proxy-server

P.S. This problem only occurs for a user account that has not already customized their proxy-server settings via the configuration dialog, and/or a conversion from the old N*tscape browser settings. (I usually test this out from a dummy account that has any of the .mozilla* and .netscape* stuff removed.)
Robert-Jan Goossens
Honored Contributor

Re: Server Mozilla auto-config for proxy-server

Hi Bob,

Check this bug,

http://bugzilla.mozilla.org/show_bug.cgi?id=205514

Regards,
Robert-Jan
Rick Beldin
HPE Pro

Re: Server Mozilla auto-config for proxy-server

Some of the Mozilla prefs are stored in jar files within the Mozilla/chrome directory tree. This isn't very well documented, but you can customize a site-wide installation in a variety of ways, such as the startup page, the proxies, and so on.

This link has some information:

http://mozdoc.burlco.org/bowels.html

I did some simple changes to a local Mozilla 1.4 installation on HP-UX:

Steps:

mkdir /someplace/
cp /opt/mozilla/chrome/US.jar /someplace/
cd /someplace
unzip US.jar
cd ./locale/navigator-region
vi region.properties

Change:

homePageDefault=
browser.startup.homepage=
startup.homepage_override_url=

to the values you want...

Then, cd to the root of the directory you unpacked stuff in.
ex /someplace/

jar c0vf US.jar locale

(jar is a zip-like utility used by Java. I used the one in /opt/Java1.4/bin/, but your java installation may be different. You can use a real zip/unzip to do this).

Now:

cd /opt/mozilla/chrome
mv US.jar US.jar.orig
mv /someplace/US.jar .
chmod 644 US.jar
chown bin:bin US.jar


I believe that the entries that you want to change are:

network.proxy.ftp
network.proxy.ftp_port
network.proxy.http_port
network.proxy.http
...

You can extract these from your prefs.js by using grep for proxy.
Necessary questions: Why? What? How? When?
BSSG
Frequent Advisor

Re: Server Mozilla auto-config for proxy-server

Well yes I'm already setting the home page by modifying the US.jar file, and that part works just fine thanks.

In response to your suggestion I tried adding in a couple of new lines to the locale/US/navigator-region/region.properties file, setting the 'network.proxy.autoconfig_url' and 'network.proxy.type' parameters. (I'm trying to use the automatic proxy type (network.proxy.type=2) rather than setting them manually as your suggested parameters would seem to do.)

Unfortunately it appears that these revisions were not utilized by the browser when it came up, and they didn't appear in the configuration dialog. (Whereas when I set them in the all.js file, they at least showed up in the dialog.) So it doesn't look like those parameters were being read by the browser, although it does use the home page settings correctly.

Thank you.

--
Bob
Rick Beldin
HPE Pro

Re: Server Mozilla auto-config for proxy-server

You are absolutely correct - you don't set the proxy stuff in the chrome, but in the /opt/mozilla/default/pref/all.js. I had lost my mind there for a moment.

I configured an HP-UX 11.11 system Mozilla 1.4 with a new all.js:

diff all.js all.js.orig
617,618c617,618
< pref("network.proxy.autoconfig_url", "http://autoproxy.hp.com/autoproxy/autoproxy");
< pref("network.proxy.type", 2);
---
> pref("network.proxy.autoconfig_url", "");
> pref("network.proxy.type", 0);

The diffs illustrate the difference between the original (all.js.orig) and the modified.

I created a new account and was immediately able to access the proxy server without reloading. I could tell because I could get through the company firewall to the default Mozilla start page.

Does the same thing happen for users who are manually configured to use the autoproxy? Or do all users who use the autoproxy have this problem?
Necessary questions: Why? What? How? When?
BSSG
Frequent Advisor

Re: Server Mozilla auto-config for proxy-server

Thank you Rick. It works fine for users who manually configure the auto-proxy server in Mozilla. It fails if the proxy is configured in the all.js file, but the settings _are_ properly set in the Mozilla configuration dialog and it works once I click the Reload button. Very strange that this worked for you but not for us. Our proxy is using a non-default port, and it is running a proxy.pac, but otherwise I don't see any difference.

I'm stumped.

--
Bob