Skip to content

Instantly share code, notes, and snippets.

@frank4565
Last active February 20, 2022 14:12
Show Gist options
  • Save frank4565/7166648 to your computer and use it in GitHub Desktop.
Save frank4565/7166648 to your computer and use it in GitHub Desktop.
Squid configuration file for APN Proxy.
visible_hostname localhost
cache_mgr [email protected]
http_port 3128 transparent
icp_port 0
dns_nameservers 192.168.1.1
cache_effective_user git
cache_effective_group git
pid_filename /tmp/squid.pid
emulate_httpd_log on
#logformat log %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
cache_access_log /home/git/squid/log/access.log
cache_log none
cache_store_log none
cache_dir ufs /home/git/squid/cache/ 2048 16 256
cache_mem 16 MB
cache_swap_low 90
cache_swap_high 95
minimum_object_size 0 KB
maximum_object_size 4096 KB
cache_vary on
connect_timeout 1 minute
request_timeout 1 minutes
# acl
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_htpasswd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 142 hours
auth_param basic casesensitive off
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255
acl localnet src 192.168.1.0/255.255.255.0
acl APN_USERS proxy_auth REQUIRED
http_access allow localhost
http_access allow localnet
http_access allow APN_USERS
http_access deny all
broken_vary_encoding allow all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment