draft: Squid
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"title": "Squid",
|
||||
"slug": "squid",
|
||||
"_updated_at": "2026-05-18 01:19:55"
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
# Squid
|
||||
|
||||
[Squid](http://www.squid-cache.org/) est un serveur proxy-cache permettant de centraliser et d'accélérer les requêtes HTTP, HTTPS et FTP sur un réseau local. Cette note rassemble les configurations clientes nécessaires pour utiliser un proxy Squid déployé à la maison.
|
||||
|
||||
## Configurer un client pour utiliser le proxy
|
||||
|
||||
### Paramètres système (tous les utilisateurs)
|
||||
|
||||
Pour déclarer le proxy au niveau système, créez ou modifiez le fichier `/etc/profile.d/proxy.sh`. Les variables y seront chargées au login de chaque utilisateur :
|
||||
|
||||
```bash
|
||||
MY_PROXY_URL="192.168.100.5:3128"
|
||||
|
||||
HTTP_PROXY=$MY_PROXY_URL
|
||||
#HTTPS_PROXY=$MY_PROXY_URL
|
||||
FTP_PROXY=$MY_PROXY_URL
|
||||
http_proxy=$MY_PROXY_URL
|
||||
#https_proxy=$MY_PROXY_URL
|
||||
ftp_proxy=$MY_PROXY_URL
|
||||
|
||||
export HTTP_PROXY HTTPS_PROXY FTP_PROXY http_proxy https_proxy ftp_proxy
|
||||
```
|
||||
|
||||
Pour appliquer immédiatement la configuration sans se reconnecter :
|
||||
|
||||
```bash
|
||||
source /etc/profile.d/proxy.sh
|
||||
```
|
||||
|
||||
### Configuration spécifique à wget
|
||||
|
||||
Certains utilitaires ignorent les variables d'environnement et utilisent leur propre fichier de configuration. C'est le cas de **wget**, dont les paramètres se trouvent dans `/etc/wgetrc` :
|
||||
|
||||
```
|
||||
#https_proxy = http://proxy.yoyodyne.com:18023/
|
||||
http_proxy = http://proxy.yoyodyne.com:18023/
|
||||
ftp_proxy = http://proxy.yoyodyne.com:18023/
|
||||
```
|
||||
|
||||
### Configuration spécifique à dnf
|
||||
|
||||
De même, le gestionnaire de paquets **dnf** se configure dans `/etc/dnf/dnf.conf` :
|
||||
|
||||
```
|
||||
proxy=http://192.168.100.5:3128/
|
||||
```
|
||||
|
||||
## Consulter les logs du serveur Squid
|
||||
|
||||
Pour suivre en temps réel les requêtes traitées par le proxy :
|
||||
|
||||
```bash
|
||||
tail -f /var/log/squid/access.log
|
||||
```
|
||||
|
||||
## Références
|
||||
|
||||
- [How to configure proxy server in CentOS/RHEL/Fedora](https://www.thegeekdiary.com/how-to-configure-proxy-server-in-centos-rhel-fedora/)
|
||||
- [How to install Squid caching proxy on Fedora 21](https://www.liquidweb.com/kb/how-to-install-squid-caching-proxy-on-fedora-21/)
|
||||
- [How to install and configure Squid Proxy on Fedora](https://kifarunix.com/how-to-install-and-configure-squid-proxy-on-fedora-29-fedora-28-centos-7/)
|
||||
- [Server World — Squid on Fedora 31](https://www.server-world.info/en/note?os=Fedora_31&p=squid&f=1)
|
||||
@@ -4177,3 +4177,8 @@
|
||||
{"ts":"2026-05-18 01:18:52","url":"/user","ref":"","ua":"Mozilla/5.0 (compatible; IbouBot/1.0; +bot@ibou.io; +https://ibou.io/iboubot.html)"}
|
||||
{"ts":"2026-05-18 01:19:02","url":"/feed-news","ref":"","ua":"Mozilla/5.0 (compatible; IbouBot/1.0; +bot@ibou.io; +https://ibou.io/iboubot.html)"}
|
||||
{"ts":"2026-05-18 01:19:12","url":"/feed-news","ref":"","ua":"Mozilla/5.0 (compatible; IbouBot/1.0; +bot@ibou.io; +https://ibou.io/iboubot.html)"}
|
||||
{"ts":"2026-05-18 01:19:22","url":"/feed-news","ref":"","ua":"Mozilla/5.0 (compatible; IbouBot/1.0; +bot@ibou.io; +https://ibou.io/iboubot.html)"}
|
||||
{"ts":"2026-05-18 01:19:32","url":"/discussion/informatique/linux/index","ref":"","ua":"Mozilla/5.0 (compatible; IbouBot/1.0; +bot@ibou.io; +https://ibou.io/iboubot.html)"}
|
||||
{"ts":"2026-05-18 01:19:39","url":"/informatique/linux/system/types-de-partitions/btfrs","ref":"","ua":"Mozilla/5.0 (Linux; Android 5.0) AppleWebKit/537.36 (KHTML, like Gecko) Mobile Safari/537.36 (compatible; Bytespider; spider-feedback@bytedance.com)"}
|
||||
{"ts":"2026-05-18 01:19:42","url":"/discussion/informatique/se/index","ref":"","ua":"Mozilla/5.0 (compatible; IbouBot/1.0; +bot@ibou.io; +https://ibou.io/iboubot.html)"}
|
||||
{"ts":"2026-05-18 01:19:52","url":"/discussion/informatique/serveur/index","ref":"","ua":"Mozilla/5.0 (compatible; IbouBot/1.0; +bot@ibou.io; +https://ibou.io/iboubot.html)"}
|
||||
|
||||
Reference in New Issue
Block a user