Skip to content

Instantly share code, notes, and snippets.

@Andrei-Pozolotin
Last active July 19, 2016 14:07
Show Gist options
  • Save Andrei-Pozolotin/0b65b5ab5813dca94886c1ebe9158a18 to your computer and use it in GitHub Desktop.
Save Andrei-Pozolotin/0b65b5ab5813dca94886c1ebe9158a18 to your computer and use it in GitHub Desktop.
see:
https://github.com/appc/acbuild/issues/235
#######################
pid_filename /home/proxy/squid/run/squid.pid
cache_dir aufs /home/proxy/squid/cache 100000 16 256
coredump_dir /home/proxy/squid/run
#######################
logfile_rotate 7
logformat custom %{%Y-%b-%d %H:%M:%S}tl %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
cache_log stdio:/home/proxy/squid/log/cache.log
access_log stdio:/home/proxy/squid/log/access.log custom
cache_store_log none
#######################
http_port 3128
http_port 3129 intercept
http_port 3130 \
ssl-bump \
generate-host-certificates=on \
dynamic_cert_mem_cache_size=4MB \
key=/home/proxy/squid/ca/proxy-key.pem \
cert=/home/proxy/squid/ca/proxy-cert.pem \
options=NO_SSLv2,NO_SSLv3,SINGLE_DH_USE
http_port 3131 intercept \
ssl-bump \
generate-host-certificates=on \
dynamic_cert_mem_cache_size=4MB \
key=/home/proxy/squid/ca/proxy-key.pem \
cert=/home/proxy/squid/ca/proxy-cert.pem \
options=NO_SSLv2,NO_SSLv3,SINGLE_DH_USE
ssl_bump stare all
ssl_bump bump all
sslcrtd_program /usr/lib/squid/ssl_crtd -s /home/proxy/squid/crtd -M 4MB
sslcrtd_children 5 startup=1 idle=1
#######################
acl ip_acl src 192.168.0.0/16
http_access allow ip_acl
http_access deny all
shutdown_lifetime 1 seconds
cache_mem 128 MB
via off
forwarded_for off
follow_x_forwarded_for deny all
request_header_access X-Forwarded-For deny all
maximum_object_size 2000 MB
dns_v4_first on
reply_header_max_size 256 KB
strip_query_terms off
#######################
acl oracle dstdomain .download.oracle.com
acl amazon_s3 dstdomain .s3.amazonaws.com
store_id_program /home/proxy/squid/config/store_id.sh
store_id_children 5 startup=1 idle=1 concurrency=0
store_id_access allow oracle
store_id_access allow amazon_s3
store_id_access deny all
#######################
#!/bin/sh
set -e
while IFS='\n'; read line; do
IFS=' '; set -- $line
line=$1
IFS='?'; set -- $line
line=$1
echo "OK store-id=$line"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment