Skip to content

Instantly share code, notes, and snippets.

@srhb
Created February 7, 2024 09:06
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 srhb/cfb85687f9cb9ad961079960d7d10af8 to your computer and use it in GitHub Desktop.
Save srhb/cfb85687f9cb9ad961079960d7d10af8 to your computer and use it in GitHub Desktop.
let
pkgs = import <nixpkgs> { };
in
{
demo = pkgs.writeText "demo" ''
# And finally deny all other access to this proxy
http_access deny all
# Squid normally listens to port 3128
http_port foo
# Set outgoing address to service ip
tcp_outgoing_address bar
# Leave coredumps in the first cache dir
coredump_dir /var/cache/squid
#
# Add any of your own refresh_pattern entries above these.
#
'';
}
# And finally deny all other access to this proxy
http_access deny all
# Squid normally listens to port 3128
http_port foo
# Set outgoing address to service ip
tcp_outgoing_address bar
# Leave coredumps in the first cache dir
coredump_dir /var/cache/squid
#
# Add any of your own refresh_pattern entries above these.
#
# And finally deny all other access to this proxy
http_access deny all
# Squid normally listens to port 3128
http_port foo
# Set outgoing address to service ip
tcp_outgoing_address bar
# Leave coredumps in the first cache dir
coredump_dir /var/cache/squid
#
# Add any of your own refresh_pattern entries above these.
#
let
pkgs = import <nixpkgs> {};
in
{
demo = pkgs.writeText "demo" ''
# And finally deny all other access to this proxy
http_access deny all
# Squid normally listens to port 3128
http_port foo
# Set outgoing address to service ip
tcp_outgoing_address bar
# Leave coredumps in the first cache dir
coredump_dir /var/cache/squid
#
# Add any of your own refresh_pattern entries above these.
#
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment