Tag Archives: http_proxy

Setting proxies with http_proxy variable

Using proxies to access sites blocked by your organization is a common thing. Problem arises for people who loves to work in command-based environment and browse internet in terminal itself. This post solves their problem.

Linux and other Unix-based systems have environment variable http_proxy which is used by internet command line utilities like curl,wget,lynx etc. All you need is proxy server IP address (URL) and port values.

Setting up the http_proxy variable:

Fire up you shell and type in following

$ export http_proxy=http://server-ip:port/

$ export http_proxy=

$ export http_proxy=http://proxy-server.mycorp.com:3128/

If the proxy server requires a username and password then add these to the URL. For example, to include the username foo and the password bar:

$ export http_proxy=http://foo:bar@server-ip:port/

$ export http_proxy=http://foo:bar@

$ export http_proxy=http://USERNAME:PASSWORD@proxy-server.mycorp.com:3128/

Continue reading Setting proxies with http_proxy variable