Skip to content

Instantly share code, notes, and snippets.

@kevinwuhoo
Created January 25, 2016 08:22
Show Gist options
  • Save kevinwuhoo/edef0b31219a641498e7 to your computer and use it in GitHub Desktop.
Save kevinwuhoo/edef0b31219a641498e7 to your computer and use it in GitHub Desktop.
# Fixes super slow proxy issue, specific to cheapo VPS used
# http://serverfault.com/a/612374
dns_v4_first on
# Disable Caching
# http://wiki.squid-cache.org/SquidFaq/ConfiguringSquid#Can_I_make_Squid_proxy_only.2C_without_caching_anything.3F
cache deny all
# Basic Auth
# http://stackoverflow.com/a/24877894
auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/passwords
auth_param basic realm proxy
acl authenticated proxy_auth REQUIRED
acl limitusercon maxconn 10000
http_access allow authenticated
# DigitalOcean Suggested Configuration
# https://www.digitalocean.com/community/tutorials/how-to-install-squid-proxy-on-ubuntu-12-10-x64
http_port 3128
via off
forwarded_for off
request_header_access Allow allow all
request_header_access Authorization allow all
request_header_access WWW-Authenticate allow all
request_header_access Proxy-Authorization allow all
request_header_access Proxy-Authenticate allow all
request_header_access Cache-Control allow all
request_header_access Content-Encoding allow all
request_header_access Content-Length allow all
request_header_access Content-Type allow all
request_header_access Date allow all
request_header_access Expires allow all
request_header_access Host allow all
request_header_access If-Modified-Since allow all
request_header_access Last-Modified allow all
request_header_access Location allow all
request_header_access Pragma allow all
request_header_access Accept allow all
request_header_access Accept-Charset allow all
request_header_access Accept-Encoding allow all
request_header_access Accept-Language allow all
request_header_access Content-Language allow all
request_header_access Mime-Version allow all
request_header_access Retry-After allow all
request_header_access Title allow all
request_header_access Connection allow all
request_header_access Proxy-Connection allow all
request_header_access User-Agent allow all
request_header_access Cookie allow all
request_header_access All deny all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment