Through The proxy
Overview:
WinHTTP:
netsh winhttp set proxy <URL:PORT> netsh winhttp import proxy source=ie netsh winhttp show proxy netsh winhttp reset proxy
SSH over HTTP:
Putty: Connection: Proxy: Proxy type: HTTP Proxy hostname: <URL> Port: <PORT> Session: Port: 80/443 TeraTerm:
sudo:
$ sudo -E <COMMAND>
Git:
HTTP: Set: $ git config --global http.proxy <URL:PORT> $ git config --global https.proxy <URL:PORT> $ git config --global https.proxy <http://ID:PW@ADDR:PORT> $ git config --global http.[URL].proxy <URL:PORT> Unset: $ git config --global --unset http.proxy Check: $ git config -l $ git config --get http.proxy for gitsubmodule: $ git config --global url."https://".insteadOf git:// file: ~/.gitconfig [http] proxy = <URL:PORT> [https] proxy = <URL:PORT> [url "https://"] insteadOf = git:// SSL Error: ~/.gitconfig [http] sslVerify = false SSH: C:\Documents and Settings\<USER>\.ssh\config ProxyCommand connect.exe -H <URL:PORT> %h %p # Win ProxyCommand nc -X connect -x <URL:PORT> %h %p # Mac
Docker:
Host: systemd: /etc/systemd/system/docker.service.d/http-proxy.conf [Service] Environment="HTTP_PROXY=http://<ADDR>:<PORT>/" "HTTPS_PROXY=https://<ADDR>:<PORT>/" "NO_PROXY=localhost,127.0.0.1,<ADDR>" $ sudo systemctl daemon-reload $ sudo systemctl restart docker $ systemctl show --property=Environment docker $ docker info Http Proxy: http://<ADDR>:<PORT>/ Https Proxy: https://<ADDR>:<PORT>/ No Proxy: localhost,127.0.0.1,<ADDR> env: Set: $ export HTTP_PROXY="http://<ADDR>:<PORT>/" $ export HTTPS_PROXY="https://<ADDR>:<PORT>/" $ export NO_PROXY="localhost,127.0.0.1,<ADDR>" Unset: $ unset HTTP_PROXY Check: $ env Container: docker run --env HTTP_PROXY=${HTTP_PROXY} -it centos:7 bash docker-compose.yml version: '2' services: centos: image: environment: - HTTP_PROXY=${HTTP_PROXY} Build: Dockerfile ARG HTTP_PROXY $ docker build --build-arg HTTP_PROXY=http://<ADDR>:<PORT>/ . $ docker build --build-arg HTTP_PROXY=${HTTP_PROXY} . docker-compose.yml version: '2' services: myimage: build: context: . args: - HTTP_PROXY=${HTTP_PROXY}
apt-get:
/etc/apt/apt.conf.d/02proxy Acquire::http::Proxy "http://<ADDR>:<PORT>"; Acquire::https::Proxy "https://<ADDR>:<PORT>"; Acquire::ftp::Proxy "ftp://<ADDR>:<PORT>"; Acquire::http::Proxy "http://<USER>:<PASS>@<ADDR>:<PORT>"; Acquire::https::Proxy "https://<USER>:<PASS>@<ADDR>:<PORT>"; Acquire::ftp::Proxy "ftp://<USER>:<PASS>@<ADDR>:<PORT>";
yum:
/etc/yum.conf [main] proxy=http://<ADDR>:<PORT> proxy_username=<USER> proxy_password=<PASS> cachedir=/var/cache/yum
gnome3:
$ gsettings set org.gnome.system.proxy mode 'manual' $ gsettings set org.gnome.system.proxy.http host 'host' $ gsettings set org.gnome.system.proxy.http port port $ gsettings set org.gnome.system.proxy.ftp host 'host' $ gsettings set org.gnome.system.proxy.ftp port port $ gsettings set org.gnome.system.proxy.https host 'host' $ gsettings set org.gnome.system.proxy.https port port $ gsettings set org.gnome.system.proxy ignore-hosts "['localhost', '127.0.0.0/8']"
wget:
/etc/wgetrc http_proxy=http://<ADDR>:PORT> https_proxy=http://<ADDR>:PORT> proxy_user=<USER> proxu_password=<PASS>
curl:
~/.curlrc proxy = "http://<ADDR>:PORT>" proxy_user = "<USER>:<PASS>"
pip:
$ pip install foo --proxy=http://<ADDR>:PORT>
npm:
$ npm config set proxy http://<ADDR>:PORT> $ npm config set https-proxy https://<ADDR>:PORT>
RubyGems:
HTTP_PROXY、~/.gemrc ~/.gemrc http_proxy: http://proxyserver:8080 gem installオプション $ gem install foo -r -p http://proxyserver:8080