Last active
June 3, 2020 02:34
-
-
Save wildone/8deade1f1d75515d372c5ec87c671f61 to your computer and use it in GitHub Desktop.
Basic SQUID proxy config for running Squid in Docker with Local and Docker LAN allowed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: | |
# Basic SQUID proxy config for running Squid in Docker with Local and Docker LAN allowed | |
# | |
# Uage: | |
# docker run --name squid -d --restart=always --publish 3128:3128 --volume ${pwd}\squid.conf:/etc/squid/squid.conf sameersbn/squid | |
# | |
# TAG: acl | |
# Defining an Access List | |
acl SSL_ports port 443 | |
acl Safe_ports port 80 # http | |
acl Safe_ports port 21 # ftp | |
acl Safe_ports port 443 # https | |
acl Safe_ports port 70 # gopher | |
acl Safe_ports port 210 # wais | |
acl Safe_ports port 1025-65535 # unregistered ports | |
acl Safe_ports port 280 # http-mgmt | |
acl Safe_ports port 488 # gss-http | |
acl Safe_ports port 591 # filemaker | |
acl Safe_ports port 777 # multiling http | |
acl CONNECT method CONNECT | |
acl localhost src 127.0.0.1/32 | |
acl localnet src 192.168.0.0/16 | |
acl dockernet src 172.17.0.0/16 | |
# TAG: http_access | |
# Allowing or Denying access based on defined access lists | |
http_access deny !Safe_ports | |
http_access deny CONNECT !SSL_ports | |
http_access allow localhost manager | |
http_access deny manager | |
http_access allow localnet | |
http_access allow localhost | |
http_access allow dockernet | |
http_access deny all | |
# TAG: http_port | |
http_port 3128 | |
# TAG: coredump_dir | |
coredump_dir /var/spool/squid | |
# TAG: refresh_pattern | |
# usage: refresh_pattern [-i] regex min percent max [options] | |
refresh_pattern ^ftp: 1440 20% 10080 | |
refresh_pattern ^gopher: 1440 0% 1440 | |
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 | |
refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880 | |
refresh_pattern . 0 20% 4320 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment