Linux - Use Proxy Server To Access Internet at Shell Prompt

Set http_proxy shell variable
$ export http_proxy=http://server-ip:port/
$ export http_proxy=http://127.0.0.1:3128/
$ export http_proxy=http://proxy-server.mycorp.com:3128/

Setup proxy variable for all users?
# vi /etc/profile
Add the following information:
export http_proxy=http://proxy-server.mycorp.com:3128/

If password protected proxy server?
$ wget --proxy-user=USERNAME --proxy-password=PASSWORD http://path.to.domain.com/some.html

Lynx has following syntax:
$ lynx -pauth=USER:PASSWORD http://domain.com/path/html.file

Curl has following syntax:
$ curl --proxy-user user:password http://url.com/

Comments