Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # SQUID CONFIGURATION SQUID VERSION-3.5.xx
- # HTTP | HTTPS SQUID PROXY SERVER
- acl all src
- acl SSL_ports port 443
- acl SSL_ports port 5353
- acl Safe_ports port 21
- acl Safe_ports port 22
- acl Safe_ports port 53
- acl Safe_ports port 70
- acl Safe_ports port 80
- acl Safe_ports port 210
- acl Safe_ports port 280
- acl Safe_ports port 1025-65535
- acl Safe_ports port 443
- acl Safe_ports port 488
- acl Safe_ports port 591
- acl Safe_ports port 777
- acl Safe_ports port 5353
- acl Safe_ports port 18901-18909
- acl Safe_ports port 1818
- acl Safe_ports port 39190
- acl Safe_ports port 40000-40010
- acl Safe_ports port 7777
- acl Safe_ports port 19101
- acl Safe_ports port 27780
- acl Safe_ports port 29000
- acl Safe_ports port 22100
- acl Safe_ports port 5121
- acl Safe_ports port 6000-6152
- acl Safe_ports port 2001
- acl Safe_ports port 9601-9602
- acl Safe_ports port 8085
- acl Safe_ports port 11011-11041
- acl Safe_ports port 13413
- acl Safe_ports port 19000
- acl Safe_ports port 5105
- acl Safe_ports port 10009
- acl Safe_ports port 12060-12070
- acl Safe_ports port 6000-6001
- acl Safe_ports port 29200
- acl Safe_ports port 10402
- acl Safe_ports port 9600
- acl Safe_ports port 15002
- acl Safe_ports port 16402-16502
- acl Safe_ports port 5126
- acl Safe_ports port 3010
- acl Safe_ports port 11031
- acl Safe_ports port 11440-11460
- acl Safe_ports port 11100-11125
- acl Safe_ports port 4300
- acl Safe_ports port 12011
- acl Safe_ports port 12110
- acl Safe_ports port 15001
- acl Safe_ports port 15002
- acl Safe_ports port 7341
- acl Safe_ports port 7451
- acl Safe_ports port 7808
- acl Safe_ports port 30000
- acl Safe_ports port 9001
- acl Safe_ports port 9030
- acl Safe_ports port 953
- acl Safe_ports port 42051-42052
- acl Safe_ports port 36567
- acl Safe_ports port 8001
- acl Safe_ports port 14000-14050
- acl Safe_ports port 27019
- acl Safe_ports port 28901-28920
- acl Safe_ports port 7201-7208
- acl Safe_ports port 17001-17002
- acl Safe_ports port 14300-14440
- acl Safe_ports port 15100-15150
- acl Safe_ports port 7770-7790
- acl Safe_ports port 16320-16340
- acl Safe_ports port 9000-9160
- acl Safe_ports port 7200
- acl Safe_ports port 7400
- acl Safe_ports port 7106
- acl Safe_ports port 7999
- acl Safe_ports port 47611
- acl Safe_ports port 36567
- acl Safe_ports port 10087
- acl Safe_ports port 27000-27050
- acl Safe_ports port 27014-27050
- acl Safe_ports port 4380
- acl Safe_ports port 3478
- acl Safe_ports port 4379
- acl Safe_ports port 8890
- acl Safe_ports port 9339
- acl Safe_ports port 8890
- acl Safe_ports port 7200-7210
- acl Safe_ports port 7450-7460
- acl Safe_ports port 8000
- acl Safe_ports port 64990-65010
- acl CONNECT method CONNECT
- # =======================================================================
- # Lock_resol 240-360
- # =======================================================================
- acl youtube_240 dstdomain .youtube.com
- request_header_access Accept-Encoding deny youtube_240
- loadable_modules /usr/local/lib/DSI_ecap_youtube.so
- ecap_enable on
- ecap_service ecapModifier respmod_precache \
- uri=ecap://dokter-squid.com/ecap yt_quality=small
- adaptation_access ecapModifier allow youtube_240
- adaptation_access ecapModifier deny all
- # =========================================================================
- # ACCESS RULES
- http_access deny !Safe_ports
- http_access deny CONNECT !SSL_ports
- http_access allow all
- http_reply_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_certs/squid.crt key=/etc/squid/ssl_certs/squid.key cipher=ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA:DHE-RSA-CAMELLIA128-SHA:AES128-SHA:RC4-SHA:HIGH:!aNULL:!MD5:!ADH
- http_port 3128
- http_port 3129 tproxy
- # CONNECTION HANDLING
- qos_flows local-hit=0x30
- collapsed_forwarding on
- balance_on_multiple_ip on
- detect_broken_pconn on
- client_persistent_connections off
- server_persistent_connections on
- # DNS OPTIONS
- #dns_packet_max 4096
- #dns_defnames on
- #dns_v4_first on
- dns_nameservers 172.16.0.1 192.168.1.254 8.8.8.8 8.8.4.4
- connect_retries 2
- negative_dns_ttl 1 second
- range_offset_limit 0
- quick_abort_min 0
- quick_abort_max 0
- quick_abort_pct 80
- ipcache_low 98
- ipcache_high 99
- ipcache_size 4096
- fqdncache_size 2048
- pipeline_prefetch 0
- # MISCELEANOUS
- memory_pools off
- reload_into_ims on
- max_filedescriptors 65536
- # CACHE MANAGEMENT
- cache_mem 512 MB
- maximum_object_size_in_memory 128 KB
- memory_replacement_policy heap GDSF
- cache_effective_group proxy
- cache_effective_user proxy
- cache_dir aufs /cache/cache 50000 16 256
- coredump_dir /cache/cache
- cache_mgr proxy-server
- visible_hostname proxy-server
- minimum_object_size 0 KB
- maximum_object_size 1 GB
- read_ahead_gap 64 KB
- cache_replacement_policy heap LFUDA
- store_dir_select_algorithm least-load
- cache_swap_low 90
- cache_swap_high 95
- # LOG FILE OPTIONS
- acl log method CONNECT
- logfile_daemon /usr/lib/squid/log_file_daemon
- access_log daemon:/var/log/squid/access.log !CONNECT
- cache_log /var/log/squid/cache.log
- cache_store_log /var/log/squid/store.log
- debug_options ALL,1 22,3
- cache_store_log none
- logfile_rotate 3
- pid_filename /var/run/squid.pid
- # FILTERING HTTPS
- acl 1 dstdomain .fbcdn.net .akamaihd.net .fbsbx.com
- #acl 2a dstdomain .mahadana.com .mql4.com .metaquotes.net
- acl 2 url_regex -i ^https?:\/\/attachment\.fbsbx\.com\/.*\?(id=[0-9]*).*
- acl 2 url_regex -i \.fbsbx\.com\/.*\/(.*\.(unity3d|pak|zip|exe|dll|jpg|png|gif|swf)/)$
- acl 2 url_regex -i ^https?:\/\/.*\.ytimg\.com(.*\.(webp|jpg|gif))
- acl 2 url_regex -i ^https?:\/\/([^\.]*)\.yimg\.com\/(.*)
- acl 2 url_regex -i ^https?:\/\/.*\.gstatic\.com\/images\?q=tbn\:(.*)
- acl 2 url_regex -i ^https?:\/\/.*\.reverbnation\.com\/.*\/(ec_stream_song|download_song_direct|stream_song)\/([0-9]*).*
- acl 2 url_regex -i ^https?:\/\/([a-z0-9.]*)(\.doubleclick\.net|\.quantserve\.com|.exoclick\.com|interclick.\com|\.googlesyndication\.com|\.auditude\.com|.visiblemeasures\.com|yieldmanager|cpxinteractive)(.*)
- acl 2 url_regex -i ^https?:\/\/(.*?)\/(ads)\?(.*?)
- acl 2 url_regex -i ^https?:\/\/.*steampowered\.com\/.*\/([0-9]+\/(.*))
- acl 3 url_regex -i ^https?:\/\/(.*?)\/speedtest\/.*\.(jpg|txt|png|gif|swf)\?.*
- acl 3 url_regex -i speedtest\/.*\.(jpg|txt|png|gif|swf)\?.*
- acl 4 url_regex -i reverbnation.*audio_player.*ec_stream_song.*$
- acl 5 url_regex -i utm.gif.*
- acl 6 url_regex -i c.android.clients.google.com.market.GetBinary.GetBinary.*
- 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\?.*
- acl loop_302 http_status 302
- acl loop_mime rep_mime_type text/html
- acl loop_mime rep_mime_type text/plain
- acl getmethod method GET
- store_miss deny store_url loop_302
- store_miss deny store_url loop_mime
- send_hit deny store_url loop_302
- send_hit deny store_url loop_mime
- ssl_bump splice localhost
- acl 9 at_step SslBump1
- acl 10 at_step SslBump2
- acl 11 at_step SslBump3
- ssl_bump peek 9 all
- ssl_bump stare 10 all
- ssl_bump splice 11 all
- sslcrtd_program /usr/lib/squid/ssl_crtd -s /etc/squid/ssl_db -M 4MB
- sslcrtd_children 16 startup=1 idle=1
- sslproxy_cert_error allow all
- always_direct allow all
- ssl_unclean_shutdown on
- # STORE ID
- 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 4
- store_id_access allow 5
- store_id_access allow 6
- store_id_access allow 7
- store_miss deny 7 8
- send_hit deny 7 8
- store_id_access deny all
- # TUNNING CACHE
- max_stale 1 years
- vary_ignore_expire on
- shutdown_lifetime 10 seconds
- include /etc/squid/refresh.conf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement