Files
homeprod/docker/infrastructure/squid/squid.conf
vhaudiquet 26a89d0a25 squid: use IPv4 before v6
I still don't have a full v6 configuration, and it seems to be an issue with squid. Let's hope that this will fix it.
2025-11-04 11:23:00 +01:00

50 lines
2.0 KiB
SquidConf

acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN)
acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN)
acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines
acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN)
acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN)
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
# Caching
cache_dir aufs /var/spool/squid 40000 16 256
maximum_object_size 4 GB
## In-memory caching
cache_mem 256 MB
maximum_object_size_in_memory 5 MB
## Always refresh Packages and Release files
refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
refresh_pattern \/Release(|\.gpg)$ 0 0% 0 refresh-ims
refresh_pattern \/InRelease$ 0 0% 0 refresh-ims
refresh_pattern \/(Translation-.*)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims
## Handle meta-release and changelogs.ubuntu.com special
refresh_pattern changelogs.ubuntu.com\/.* 0 1% 1
## Archive files: cache them for 90 days
refresh_pattern deb$ 129600 100% 129600
refresh_pattern udeb$ 129600 100% 129600
refresh_pattern tar.gz$ 129600 100% 129600
refresh_pattern tar.xz$ 129600 100% 129600
refresh_pattern tar.bz2$ 129600 100% 129600
## Docker: cache for 24h (min) to 7 days (max)
refresh_pattern -i (/blobs/sha256) 1440 99% 10080 ignore-no-store ignore-private override-expire store-stale reload-into-ims
refresh_pattern -i (/images/sha256) 1440 99% 10080 ignore-no-store ignore-private override-expire store-stale reload-into-ims
refresh_pattern -i (/manifests/) 1440 99% 10080 ignore-no-store ignore-private override-expire store-stale reload-into-ims
## Default: cache everything for 0h (min) to 72h (max)
refresh_pattern . 0 20% 4320
http_port 3128
max_filedescriptors 1024
http_access allow localhost
http_access allow localnet
dns_v4_first on