Linux proxy

Date: 2017-03-09

Linux Replace ip in resolv.conf with domain name lookup

Edit: /etc/hosts, append:

10.199.111.20 proxy.lan

Edit: /etc/bash.bashrc, prepend:

proxy=http://proxy.lan:8080

export http_proxy=$proxy
export https_proxy=$proxy
export ftp_proxy=$proxy
export rsync_proxy=$proxy
export no_proxy="localhost,127.0.0.1,.local,.lan"

export HTTP_PROXY=$proxy
export HTTPS_PROXY=$proxy
export FTP_PROXY=$proxy
export RSYNC_PROXY=$proxy
export NO_PROXY="localhost,127.0.0.1,.local,.lan"

To preserve sudo environment variables:

Edit: /etc/sudoers, add somewhere:

Defaults env_keep += "ftp_proxy http_proxy https_proxy no_proxy"

Gsettings: (Gui applications)

gsettings set org.gnome.system.proxy.http host "proxy.lan"
gsettings set org.gnome.system.proxy.http port "8118"
gsettings set org.gnome.system.proxy ignore-hosts "['localhost', '127.0.0.0/8', '::1', '*.some.domain', '10.0.0.0/8']"

 

 

6750cookie-checkLinux proxy