Skip to content

Instantly share code, notes, and snippets.

@Anon-Exploiter
Created April 27, 2022 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Anon-Exploiter/c4e96ada91771bc9ee934cf1f297fad5 to your computer and use it in GitHub Desktop.
Save Anon-Exploiter/c4e96ada91771bc9ee934cf1f297fad5 to your computer and use it in GitHub Desktop.
Squid configuration file (for setting up proxy server)
# apt-get install squid apache2-utils
# htpasswd -c /etc/squid/.htpasswd user_name
# systemctl restart squid
acl CONNECT method CONNECT
# line 989: add follows for Basic auth
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/.htpasswd
auth_param basic children 5
auth_param basic realm Squid Basic Authentication
auth_param basic credentialsttl 55 hours
acl password proxy_auth REQUIRED
http_access allow password
# line 989: add (define ACL for internal)
acl all src all
# specify proxy port (default 3128)
http_port 31337
# line 5157: add follows
#request_header_access Referer deny all
#request_header_access X-Forwarded-For deny all
#request_header_access Via deny all
#request_header_access Cache-Control deny all
via off
forwarded_for off
follow_x_forwarded_for deny all
request_header_access X-Forwarded-For deny all
header_access X_Forwarded_For deny all
# line 5511: add hostname
visible_hostname abc
# forwarded_for on
# line 7625: add
#forwarded_for off
# cache off for all
cache deny all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment