Skip to content

Instantly share code, notes, and snippets.

@marvin-marvin
Last active October 19, 2020 13:33
Show Gist options
  • Save marvin-marvin/24680a1331261b32522f9bde2aad19d9 to your computer and use it in GitHub Desktop.
Save marvin-marvin/24680a1331261b32522f9bde2aad19d9 to your computer and use it in GitHub Desktop.
proxy system wide
#Acquire::http::proxy "http://192.168.1.201:3128";
#Acquire::https::proxy "https://192.168.1.201:3128";
#Acquire::ftp::proxy "ftp://192.168.1.201:3128";
#proxy=http://192.168.1.201:3128
PROXY_ENABLED="no"
#HTTP_PROXY="http://192.168.1.201:3128"
#HTTPS_PROXY="http://192.168.1.201:3128"
#FTP_PROXY="http://192.168.1.201:3128"
#SOCKS_PROXY="http://192.168.1.201:3128"
#GOPHER_PROXY="http://192.168.1.201:3128"
# set proxy config via profie.d - should apply for all users
#
#export ftp_proxy=ftp://192.168.1.201:3128
#export http_proxy=http://192.168.1.201:3128
#export https_proxy=https://192.168.1.201:3128
#export socks_proxy=https://192.168.1.201:3128
# For curl
#export FTP_PROXY=ftp://192.168.1.201:3128
#export HTTP_PROXY=http://192.168.1.201:3128
#export HTTPS_PROXY=https://192.168.1.201:3128
#export SOCK_PROXY=https://192.168.1.201:3128
#
# define proxy system-wide ubuntu/debian
nano /etc/profile.d/proxy.sh
# set proxy config via profie.d - should apply for all users
#
export ftp_proxy=ftp://192.168.1.208:3128
export http_proxy=http://192.168.1.208:3128
export https_proxy=https://192.168.1.208:3128
export socks_proxy=https://192.168.1.208:3128
# For curl
export FTP_PROXY=ftp://192.168.1.208:3128
export HTTP_PROXY=http://192.168.1.208:3128
export HTTPS_PROXY=https://192.168.1.208:3128
export SOCK_PROXY=https://192.168.1.208:3128
#
chmod +x /etc/profile.d/proxy.sh
nano /etc/environment
export ftp_proxy=ftp://192.168.1.201:3128
export http_proxy=http://192.168.1.201:3128
export https_proxy=https://192.168.1.201:3128
export socks_proxy=https://192.168.1.201:3128
nano /etc/sysconfig/proxy
PROXY_ENABLED="yes"
HTTP_PROXY="http://192.168.1.201:3128"
FTP_PROXY="http://192.168.1.201:3128"
SOCKS_PROXY="http://192.168.1.201:3128"
GOPHER_PROXY="http://192.168.1.201:3128"
nano /etc/apt/apt.conf.d/99HttpProxy
Acquire::http::proxy "http://192.168.1.201:3128";
Acquire::https::proxy "https://192.168.1.201:3128";
Acquire::ftp::proxy "ftp://192.168.1.201:3128";
nano /etc/yum.conf
proxy=http://192.168.1.201:3128
nano ~/.wgetrc
use_proxy = on
ftp_proxy=ftp://192.168.1.208:3128
http_proxy=http://192.168.1.208:3128
https_proxy=https://192.168.1.208:3128
(copy to nano /etc/wgetrc)
nano ~/.curlrc
proxy=http://192.168.1.201:3128
mkdir /usr/share/ca-certificates/extra
cp Downloads/certificate.crt /usr/share/ca-certificates/extra/
dpkg-reconfigure ca-certificates
use_proxy = off
#ftp_proxy=ftp://192.168.1.201:3128
#http_proxy=http://192.168.1.201:3128
#https_proxy=https://192.168.1.201:3128
#proxy=http://192.168.1.201:3128
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment