Setting up proxy to ignore all local addresses [duplicate]

How are proxy settings set in the Ubuntu gnome environment.

These methods are not full proof and can break the configuration of the system. Making the network behave in an undesired way. Only do this if you understand how it affects different parts of the system.

You can set some of the proxy settings here. But for ignore hosts you will need to set that else where.

$ cat /etc/environment 
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
http_proxy="http://192.168.1.250:8080/"
ftp_proxy="ftp://192.168.1.250:8080/"
https_proxy="https://192.168.1.250:8080/"

The env command is related to the above file but many programs and system utilities make changes to the environment. More info can be found here, read this before making changes. https://help.ubuntu.com/community/EnvironmentVariables

$ env | grep proxy
http_proxy=http://192.168.1.250:8080/
ftp_proxy=ftp://192.168.1.250:8080/
all_proxy=socks://192.168.1.250:8080/
https_proxy=https://192.168.1.250:8080/
no_proxy=localhost,127.0.0.0,127.0.1.1,127.0.1.1,local.home

simply change this by

no_proxy=myhost_to_ignore,$no_proxy
export no_proxy

We need to add back the list of previously set no_proxy hence we add it back at the end of the line. This is only applicable to the terminal session that the command is run in and will not apply system wide read the community help documentation to make permanent changes.

To make changes in the gnome environment you can use the gconftool. Read the following guide before attempting to make changes.
http://library.gnome.org/admin/system-admin-guide/stable/gconf-0.html.en

Here are instructions on changing proxy settings using the gconftool
http://library.gnome.org/admin/system-admin-guide/stable/gconf-8.html.en#gconf-10

$ gconftool --recursive-list /system/http_proxy 
use_authentication = false
authentication_password = 
authentication_user = 
ignore_hosts =[localhost,127.0.0.0/8,127.0.1.1]
use_http_proxy = true
port = 8080
use_same_proxy = true
host = 192.168.1.250

The following file ~/.conf/system/http-proxy/%gconf.xml. Will be changed by the next command. I am unsure how to set a list type with gconftool. MY attempts ended up removing all the previous settings.

I am sure their is a better way to do this!!
Safe way to do it. get the current contents of the /system/http_proxy/ignore_hosts

gconftool -g  /system/http_proxy/ignore_hosts  

Next copy its contents into the next command and add the host you want to add.

gconftool  --type list --list-type string  -s /system/http_proxy/ignore_hosts '[localhost,127.0.0.0/8,myhost]'

Assuming you're using the default Ubuntu Gnome desktop: You need to add your local host addresses to the ignore list in the gnome proxy settings:

alt text


I have come across with this problem. in my case I have Ubuntu 14.04 and I found solution here

You can install dconf-editor and open dconf-editor -> system -> proxy by using this editor, than add your hosts to ignore-hosts on this window and that's all.