You are here

Using 2nd profile to only change proxy

3 posts / 0 new
Last post
zogus
Offline
Last seen: 7 years 6 months ago
Joined: 2007-09-06 19:53
Using 2nd profile to only change proxy

I have just found the new 2nd profile app and it sounds great. I downloaded it to try as I use FF in 3 locations which need 3 different proxy settings and I thought this might be a nice quick way of starting up FF already set up for the location without having to edit the proxy each time.

What I found, thought, was that everything in the 2nd profile was "reset", i.e. no addons, bookmarks etc. Is there a way that I can easily get them synchronised so that I only need to change the proxy setting?

NathanJ79
NathanJ79's picture
Offline
Last seen: 4 years 10 months ago
Joined: 2007-07-31 15:07
Yes

Yes, and it's quite easy.

You just have to copy the profile folder from one to the other. Then you will have two identical profiles. Then just change the proxy settings in one. Rinse & repeat.

bgillis
bgillis's picture
Offline
Last seen: 4 years 4 months ago
Joined: 2007-05-11 04:25
There is an easier way to proceed

If you just need to have different proxy configurations depending on your location, there is an easier way to proceed. There is no need to duplicate your profile. You just have to use an automatic proxy configuration file.

Hereby you will find a sample file:

function FindProxyForURL(url, host){
  var no_proxy = "DIRECT";
  var my_enterprise_proxy = "PROXY 192.100.1.200:800";
  
  if (isPlainHostName(host) || localHostOrDomainIs(host, "127.0.0.1")) {
    return no_proxy;
  } else {
	
	if (shExpMatch(myIpAddress(), "192.100.1.*")) {
		if (isInNet(host, "192.100.1.0", "255.255.255.0")) {
			return no_proxy;
		} else {
			return my_enterprise_proxy;	
		}	
		
	} else {
		return no_proxy;  
	}	
  }
} 

Put that file "proxy.pac" in folder "%USB_DRIVE_LETTER%:/PortableApps/CommonFiles" and set the following url in Firefox settings (Advanced -> Network -> Settings -> Automatic proxy configuration URL) : "file:///%USB_DRIVE_LETTER%:/PortableApps/CommonFiles/proxy.pac"

This tip can also be used with Thunderbird and any other Mozilla applications Wink

Log in or register to post comments