26

In a typical browser, when we set a proxy server, we can define a list of hostnames/IP addresses that are not to use the proxy server. How do we accomplish the same thing when using $http_proxy? I rely on setting $http_proxy to use the proxy server in Chromium on Linux but they're certain IP addresses on the intranet that I need to bypass the proxy settings for.

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
feicipet
  • 565
  • 1
  • 6
  • 13

2 Answers2

31

Try setting variable named no_proxy in following manner

$ export no_proxy=localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16

But if you do this in the command line, you will have to do it again each time you open a new terminal window. If you want those settings to be persistent, put this very command inside your .profile file under $HOME (read this answer if you want to understand better what this .profile file is).

Saurabh Barjatiya
  • 4,703
  • 2
  • 30
  • 34
3

A very helpful answer. I would add that if you're using curl/wget or other command line tool, you'd want to do:

export no_proxy=localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16

jmcdice
  • 31
  • 1