Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## SQUID.CONF ##
- cache_mgr proxy
- visible_hostname proxy
- cache_mem 8 GB
- cache_swap_low 98
- cache_swap_high 99
- minimum_object_size 0 KB
- maximum_object_size 5 GB
- maximum_object_size_in_memory 32 KB
- ipcache_size 4096
- ipcache_low 98
- ipcache_high 99
- dns_defnames on
- dns_v4_first on
- memory_pools off
- reload_into_ims on
- vary_ignore_expire on
- max_filedescriptors 65536
- cache_replacement_policy heap LFUDA
- memory_replacement_policy heap GDSF
- cache_dir aufs /cache/cache 500000 58 256
- access_log /var/log/squid/access.log
- cache_log /var/log/squid/cache.log
- acl all src
- always_direct allow all
- ssl_bump server-first all
- #http_access deny !Safe_ports
- #http_access deny CONNECT !SSL_ports
- http_access allow all
- icp_access allow all
- # LISTENING PORT SQUID
- https_port 3127 tproxy ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/etc/squid/ssl_cert/myCA.pem
- https_port 3126 tproxy ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/etc/squid/ssl_cert/myCA.pem
- http_port 3128
- http_port 3129 tproxy
- http_port 3130 tproxy
- sslcrtd_program /usr/lib/squid/ssl_crtd -s /var/squid/ssl_db/certs/ -M 4MB
- sslcrtd_children 5
- # ========================================================================================================
- max_stale 1 years
- acl 1 dstdomain .apple.com
- acl 1 dstdomain .facebook.com .fbcdn.net .akamaihd.net .fbsbx.com
- acl 2 url_regex -i ^https?:\/\/(.*\.facebook\.com)\/([0-9]+.*)
- acl 2 url_regex -i ^http.*\.(fbcdn|akamaihd)\.net\/h(profile|photos).*[\d\w].*\/([\w]\d+x\d+\/.*\.[\d\w]{3}).*
- acl 2 url_regex -i ^http(.*)static(.*)(akamaihd|fbcdn).net\/rsrc.php\/(.*\/.*\/(.*).(js|css|png|gif))(\?(.*)|$)
- acl 2 url_regex -i ^https?:\/\/[a-zA-Z0-9\-\_\.\%]*(fbcdn|akamaihd)[a-zA-Z0-9\-\_\.\%]*net\/rsrc\.php\/(.*)
- acl 2 url_regex -i ^https?\:\/\/.*(profile|photo|creative).*\.ak\.fbcdn\.net\/((h|)(profile|photos)-ak-)(snc|ash|prn)[0-9]?(.*)
- acl 2 url_regex -i ^https?:\/\/attachment\.fbsbx\.com\/.*\?(id=[0-9]*).*
- acl 2 url_regex -i ^https?:\/\/.*(fbcdn|akamaihd)\.net\/.*\/(.*\.mp4)(.*)
- acl 2 url_regex -i ^https?:\/\/.*(profile|photo|creative)*.akamaihd\.net\/((h|)(profile|photos|ads)-ak-)(snc|ash|prn|frc[0-9])[0-9]?(.*)
- acl 2 url_regex -i ^https?\:\/\/video\.(.*)\.fbcdn\.net\/(.*?)\/([0-9_]+\.(mp4|flv|avi|mkv|m4v|mov|wmv|3gp|mpg|mpeg)?)(.*)
- acl 2 url_regex -i \.fbsbx\.com\/.*\/(.*\.(unity3d|pak|zip|exe|dll|jpg|png|gif|swf)/)$
- acl 3 url_regex -i ^https?:\/\/(.*?)\/speedtest\/.*\.(jpg|txt|png|gif|swf)\?.*
- acl 3 url_regex -i speedtest\/.*\.(jpg|txt|png|gif|swf)\?.*
- acl 7 url_regex -i youtube.*(ptracking|stream_204|player_204|gen_204).*$
- acl 7 url_regex -i \.c\.(youtube|google)\.com\/(get_video|videoplayback|videoplay).*$
- acl 7 url_regex -i (youtube|google).*\/videoplayback\?.*
- acl 8 http_status 302
- acl store_url url_regex -i (youtube|googlevideo|docs.google|video.google).*videoplayback\?.*
- store_miss deny store_url 7 8
- send_hit deny store_url 7 8
- store_id_program /usr/bin/perl /etc/squid/store-id.pl
- store_id_children 10 startup=5 idle=2 concurrency=10
- store_id_access allow 1
- store_id_access allow 2
- store_id_access allow 3
- store_id_access allow 7
- store_id_access deny all
- #YouTube
- refresh_pattern (audio|video)\/(webm|mp4) 129600 99% 129600 ignore-reload override-expire override-lastmod ignore-must-revalidate ignore-private ignore-no-store ignore-auth store-stale
- refresh_pattern -i (get_video\?|videoplayback\?|videodownload\?|\.mp4|\.webm|\.flv|((audio|video)\/(webm|mp4))) 241920 100% 241920 override-expire ignore-reload ignore-private ignore-no-store ignore-must-revalidate reload-into-ims ignore-auth store-stale
- refresh_pattern -i ^https?\:\/\/.*\.googlevideo\.com\/videoplayback.* 10080 99% 43200 override-lastmod override-expire ignore-reload reload-into-ims ignore-private reload-into-ims ignore-auth store-stale
- refresh_pattern -i \/speedtest\/.*\.(txt|jpg|png|swf) 0 99% 14400 override-expire ignore-reload ignore-private ignore-reload override-lastmod reload-into-ims
- refresh_pattern static\.(xx|ak)\.fbcdn\.net*\.(jpg|gif|png) 241920 99% 241920 ignore-reload override-expire ignore-no-store
- refresh_pattern ^https?\:\/\/profile\.ak\.fbcdn.net*\.(jpg|gif|png) 241920 99% 241920 ignore-reload override-expire ignore-no-store
- refresh_pattern (akamaihd|fbcdn)\.net 14400 99% 518400 ignore-no-store ignore-private ignore-reload ignore-must-revalidate store-stale
- refresh_pattern -i https?:\/\/.*\.xx\.fbcdn\.net\/.*\.(jpg|png) 43830 99% 259200 override-expire override-lastmod ignore-reload
- refresh_pattern -i ^https?\:\/\/video\.(.*)\.fbcdn\.net\/(.*?)\/([0-9_]+\.(mp4|flv|avi|mkv|m4v|mov|wmv|3gp|mpg|mpeg)?)(.*) 241920 99% 241920 ignore-no-store ignore-reload override-expire
- refresh_pattern -i \.(3gp|7z|ace|asx|bin|deb|divx|dvr-ms|ram|rpm|exe|inc|cab|qt) 10080 80% 10080 override-expire override-lastmod reload-into-ims
- refresh_pattern -i \.(rar|jar|gz|tgz|bz2|iso|m1v|m2(v|p)|mo(d|v)|arj|lha|lzh|zip|tar|iop|nzp|pak|mar|msp) 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload
- refresh_pattern -i \.(jp(e?g|e|2)|gif|pn[pg]|bm?|tiff?|ico|swf|dat|ad|txt|dll) 10080 80% 10080 override-expire override-lastmod reload-into-ims
- refresh_pattern -i \.(avi|ac4|mp(e?g|a|e|1|2|3|4)|mk(a|v)|ms(i|u|p)|og(x|v|a|g)|rm|r(a|p)m|snd|vob|webm) 10080 80% 10080 override-expire override-lastmod reload-into-ims
- refresh_pattern -i \.(pp(t?x)|s|t)|pdf|rtf|wax|wm(a|v)|wmx|wpl|cb(r|z|t)|xl(s?x)|do(c?x)|flv|x-flv) 10080 80% 10080 override-expire override-lastmod reload-into-ims
- refresh_pattern -i \.(3gp|7z|ace|asx|bin|deb|cup|dvr-ms|ram|rpm|exe|inc|cab|qt) 10080 100% 43800 override-expire override-lastmod ignore-reload ignore-no-store ignore-private ignore-auth ignore-must-revalidate store-stale
- refresh_pattern -i \.(rar|jar|gz|tgz|bz2|iso|m1v|m2(v|p)|mo(d|v)|arj|lha|lzh|zip|tar|pak|cup) 10080 100% 43800 override-expire override-lastmod ignore-reload ignore-no-store ignore-private ignore-auth ignore-must-revalidate store-stale
- refresh_pattern -i \.(avi|ac4|mp(e?g|a|e|1|2|3|4)|mk(a|v)|ms(i|u|p)|og(x|v|a|g)|rm|r(a|p)m|snd|vob) 10080 100% 43800 override-expire override-lastmod ignore-reload ignore-no-store ignore-private ignore-auth ignore-must-revalidate store-stale
- refresh_pattern -i \.(pp(t?x)|s|t)|pdf|rtf|wax|wm(a|v)|wmx|wpl|cb(r|z|t)|xl(s?x)|do(c?x)|flv|x-flv) 10080 100% 43800 override-expire override-lastmod ignore-reload ignore-no-store ignore-private ignore-auth ignore-must-revalidate store-stale
- refresh_pattern -i .(html|htm|css|js|xml)$ 1440 75% 40320
- refresh_pattern -i .index.(html|htm)$ 0 75% 43800
- refresh_pattern -i ^http.*squid\.internal.* 43200 100% 799000 override-expire override-lastmod ignore-reload ignore-no-store ignore-must-revalidate ignore-private ignore-auth
- #KEEP THESE LINES AT BOTTOM OF CONFIGURATION
- refresh_pattern ^ftp: 1440 20% 10080
- refresh_pattern ^gopher: 1440 0% 1440
- refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
- refresh_pattern . 0 0% 4320
- # local
- qos_flows local-hit=0x30
- #collapsed_forwarding on
- ## END SQUID.CONF ##
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement