Results 1 to 5 of 5

Thread: Firefox Proxy Settings Question

  1. #1
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default Firefox Proxy Settings Question

    I regularly have to change between different networks on my system One of which requires that I use the corporate proxy while the other requires no proxy at all.

    Is it possible to setup a local file which tells Firefox something along the lines of:

    If ip = 192.68.x.x no proxy if ip = 172.x.x.x then proxy using proxy.company.com:80

    By local file I mean I would specify Automatic Proxy Configuration URL in Firefox settings as file:\\\

    Any ideas?
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

  2. #2
    Moderator KMDave's Avatar
    Join Date
    Jan 2010
    Posts
    2,281

    Default

    A better link:

    ProxySwitcher Plugin.

    Not exactly what you are looking for but might help.
    Tiocfaidh ár lá

  3. #3
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default

    I did check that out but a lot of people seem to be claiming it has memory issues. I guess I'll keep hunting.
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

  4. #4
    Junior Member drpepperONE's Avatar
    Join Date
    Nov 2007
    Posts
    51

    Default

    Hi thorin you could adapt and modify the following script to your need:


    Code:
    #!/bin/sh
    # Setup proxy by etho IP Address, file name: sproxy.sh
    #
    #   Paolo Cavone, paolo at cavone.com
    MY_IP=`/sbin/ifconfig | grep -A 4 eth0 | awk '/inet/ { print $2 } ' | sed -e s/addr://`
    
    echo "MY_IP=$MY_IP"
    
    if [ $MY_IP  ==  "10.10.10.10" ]
    
    then
                    # Configurazione proxy su Mozilla
                    
                    sed 's/pref("network.proxy.type",0);/pref("network.proxy.type",1);/g' /usr/lib/mozilla-1.7/greprefs/all.js 
    
                    # Configurazione proxy su Firefox 
                    
                    sed 's/pref("network.proxy.type",0);/pref("network.proxy.type",1);/g' /firefox-installer/greprefs/all.js 
    
                    # Configurazione proxy su Konqueror
    
                    sed 's/ProxyType=0/ProxyType=1/g' $HOME/.kde/share/config/kioslaverc
     
                    # Configurazione Proxy sulla Variabile di ambiente HTTP_PROXY
                    # (per le applicazioni linux a linea di comando: lynx, wget and curl)
    
                    http_proxy=http://proxy.my_domain.it:8080/ 
    
                    HTTP_PROXY=$http_proxy
                   
                    export http_proxy HTTP_PROXY
    else 
    
                   # Connessione diretta ad Internet (senza proxy)
                   # Reset proxy Mozilla
     
                   sed 's/pref("network.proxy.type",1);/pref("network.proxy.type",0);/g' /usr/lib/mozilla-1.7/greprefs/all.js
     
                   # reset proxy Firefox 
    
                   sed 's/pref("network.proxy.type",1);/pref("network.proxy.type",0);/g' /firefox-installer/greprefs/all.js
    
                   # reset proxy Konqueror
     
                   sed 's/ProxyType=1/ProxyType=0/g' $HOME/.kde/share/config/kioslaverc
            
                   # reset Proxy Enviroment Variable (for Linux application: lynx, wget and curl)
     
                   http_proxy=
              
                   HTTP_PROXY=$http_proxy
               
                   export http_proxy HTTP_PROXY
    fi
    ##### EOF #######
    Use your Brain, don't be slave!!!!

  5. #5
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default

    Excellent, thanks doc!
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •