Outils pour utilisateurs

Outils du site


tech:config_client_web_proxy

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
tech:config_client_web_proxy [2025/11/13 20:44] Jean-Baptistetech:config_client_web_proxy [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>Brouillon Réseau Web}}
 +
 +
 +# Config client web proxy
 +
 +## Générique
 +
 +Les variables `http_proxy` devrait toujours être en minuscule.
 +Idem pour toutes les variables ayant pour préfixe `http_` 
 +
 +Préférer `ALL_PROXY` en majuscule
 +
 +
 +
 +Source : https://everything.curl.dev/usingcurl/proxies/env.html
 +
 +Proxy HTTP
 +~~~bash
 +#export http_proxy=http://192.168.56.1:3128
 +#export https_proxy=http://192.168.56.1:3128
 +export ALL_PROXY=http://192.168.56.1:3128
 +export NO_PROXY=localhost,127.0.0.1,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,169.254.0.0/16,::1
 +~~~
 +
 +Proxy Socks
 +~~~bash
 +#export ALL_PROXY=socks://127.0.0.1:1080/
 +export ALL_PROXY=socks5h://127.0.0.1:1080
 +export NO_PROXY=localhost,127.0.0.0/8,::1
 +~~~
 +
 +Config permanent / persistent
 +
 +`/etc/environment`
 +~~~ini
 +#http_proxy=http://192.168.56.1:3128
 +#https_proxy=http://192.168.56.1:3128
 +ALL_PROXY=http://192.168.56.1:3128
 +NO_PROXY=localhost,127.0.0.1,localaddress,.localdomain.com,192.168.56.12
 +~~~
 +
 +Autre
 +~~~bash
 +export use_proxy = on
 +~~~
 +
 +
 +Curl
 +~~~bash
 +curl -x ` https://gnu.org
 +~~~
 +
 +
 +### Mot de passe
 +
 +Pour un proxy avec authentification
 +
 +~~~bash
 +export ALL_PROXY=http://Nom:MotDePasse@192.168.56.1:3128
 +~~~
 +
 +Si caractères spéciaux ou accentué vous devez encoder les caractères. Voir : 'URL encoding / Percent encoding' 
 +
 +
 +### Sudo
 +
 +Pour charger la conf de /etc/environment
 +~~~bash
 +sudo su
 +~~~
 +
 +`-E` 
 +
 +~~~
 +-E, --preserve-env
 +                 Indicates to the security policy that the user wishes to preserve their existing environment variables.  The security policy may return an error if the user does not have permission to preserve the environment.
 +~~~
 +
 +~~~bash
 +sudo -E -s
 +~~~
 +
 +Ou 
 +
 +`/etc/sudoers`
 +~~~
 +Defaults        env_reset
 +
 +Defaults        env_keep += "http_proxy"
 +Defaults        env_keep += "https_proxy"
 +~~~
 +
 +
 +
 +## RedHat
 +
 +
 +`/etc/yum.conf`
 +~~~ini
 +proxy=http://192.168.2.30:3128
 +~~~
 +
 +
 +## Debian
 +
 +Voir [[Proxy et apt-get]]
 +
 +## Docker
 +
 +Voir [[Notes - Docker - proxy]]
 +
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki