Configurations d’un proxy

Raspbian

Dans le fichier /etc/environment ajouter :

export http_proxy="http://proxy.wdt.nc:3128"
export https_proxy="http://proxy.wdt.nc:3128"
export ftp_proxy="ftp://proxy.wdt.nc:3128"
export no_proxy="localhost,127.0.0.1,wdt.nc"

Pour que vos commandes via sudo garde ces paramètres, dans le fichier /etc/sudoers ajoutez à la fin :

Defaults env_keep = "http_proxy https_proxy ftp_proxy no_proxy"

Pour que le système de package APT utilise le proxy, créer un fichier 10proxy dans /etc/apt/apt.conf.d/ :

Acquire::http::proxy "http://proxy.wdt.nc:3128"; 
Acquire::https::proxy "http://proxy.wdt.nc:3128";
Acquire::ftp::proxy "http://proxy.wdt.nc:3128";

Pour GIT, il faut utiliser ces commandes :

git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080
git config --global https.proxy https://proxyuser:proxypwd@proxy.server.com:8080

Source : https://blog.jolos.fr/2016/01/raspbian-et-proxy/

Tester une requête web via proxy

Source : https://stackoverflow.com/questions/9445489/performing-http-requests-with-curl-using-proxy

curl -x http://proxy.wdt.nc:3128 http://isi.nc

Docker

Source : https://docs.docker.com/config/daemon/systemd/#httphttps-proxy

sudo systemctl edit docker.service

[Service]
Environment="HTTP_PROXY=http://proxy.wdt.nc:3128/" "HTTPS_PROXY=http://proxy.wdt.nc:3128/" "NO_PROXY=localhost,127.0.0.1,wdt.nc"