Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### DENY OR BLOCK EXTENSIONS
- acl blocklan src 192.168.1.101-192.168.1.150
- acl blockfiles urlpath_regex -i "/usr/local/etc/squid/blockExtensions.acl"
- deny_info ERR_BLOCKED_FILES blockfiles
- http_access deny blocklan blockfiles
- #########################################
- ## NEW SQUID.CONF, [email protected] ##
- ## REV BY: JOEDANGER 8/15/2014 ##
- #########################################
- # ==========================================================================
- # YOUTUBE ENCODING
- # ==========================================================================
- acl youtube url_regex -i youtube.*(ptracking|stream_204|player_204|gen_204) .*$
- acl youtube url_regex -i (youtube|googlevideo)\.com\/(get_video|videoplayback|videoplay).*$
- acl store_rewrite_list urlpath_regex \/(watch\?|get_video\?|videodownload\?|videoplayback.*id)
- acl store_rewrite_list urlpath_regex \/(get_video|videoplayback\?id|videoplayback.*id) \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|wmv|3gp|mp(4|3)|exe|msi|zip|on2|mar|swf)\?
- acl store_rewrite_list urlpath_regex (youtube|google).*(videoplayback|liveplay)
- acl store_rewrite_list urlpath_regex \/(get_video\?|videodownload\?|videoplayback.*id)
- acl dontrewrite url_regex redbot\.org (get_video|videoplayback\?id|videoplayback.*id).*begin\=[1-9][0-9]* \.php\?
- storeurl_access allow youtube
- #===========================================================================
- # Loading Patch Online Games 8-20-2014
- #===========================================================================
- acl DENYCACHE urlpath_regex \.(ini|ui|lst|inf|pak|ver|patch|md5|cfg|lst|list|rsc|log|conf|dbd|db)$
- acl DENYCACHE urlpath_regex (notice.html|afs.dat|dat.asp|patchinfo.xml|version.list|iepngfix.htc|updates.txt|patchlist.txt)
- acl DENYCACHE urlpath_regex (pointblank.css|login_form.css|form.css|noupdate.ui|ahn.ui|3n.mh)$
- acl DENYCACHE urlpath_regex (Loader|gamenotice|sources|captcha|notice|reset)
- no_cache deny DENYCACHE
- range_offset_limit 1 MB !DENYCACHE
- uri_whitespace strip
- # ==== Custom Option REWRITE ====
- acl speedtest url_regex ^http:\/\/.*\/speedtest\/.*
- acl store_rewrite_list urlpath_regex \.(mp2|mp3|mid|midi|mp[234]|wav|ram|ra|rm|au|3gp|m4r|m4a)\?
- acl store_rewrite_list urlpath_regex \.(mpg|mpeg|mp4|m4v|mov|avi|asf|wmv|wma|dat|flv|swf)\?
- acl store_rewrite_list urlpath_regex \.(jpeg|jpg|jpe|jp2|gif|tiff?|pcx|png|bmp|pic|ico)\?
- acl store_rewrite_list urlpath_regex \.(chm|dll|doc|docx|xls|xlsx|ppt|pptx|pps|ppsx|mdb|mdbx)\?
- acl store_rewrite_list urlpath_regex \.(txt|conf|cfm|psd|wmf|emf|vsd|pdf|rtf|odt)\?
- acl store_rewrite_list urlpath_regex \.(class|jar|exe|gz|bz|bz2|tar|tgz|zip|gzip|arj|ace|bin|cab|msi|rar)\?
- acl store_rewrite_list urlpath_regex \.(htm|html|mhtml|css|js)\?
- acl store_rewrite_list_web url_regex ^http:\/\/([A-Za-z-]+[0-9]+)*\.[A-Za-z]*\.[A-Za-z]*
- acl store_rewrite_list_web_CDN url_regex ^http:\/\/[a-z]+[0-9]\.google\.com doubleclick\.net
- acl store_rewrite_list_path urlpath_regex \.(mp2|mp3|mid|midi|mp[234]|wav|ram|ra|rm|au|3gp|m4r|m4a)$
- acl store_rewrite_list_path urlpath_regex \.(mpg|mpeg|mp4|m4v|mov|avi|asf|wmv|wma|dat|flv|swf)$
- acl store_rewrite_list_path urlpath_regex \.(jpeg|jpg|jpe|jp2|gif|tiff?|pcx|png|bmp|pic|ico)$
- acl store_rewrite_list_path urlpath_regex \.(chm|dll|doc|docx|xls|xlsx|ppt|pptx|pps|ppsx|mdb|mdbx)$
- acl store_rewrite_list_path urlpath_regex \.(txt|conf|cfm|psd|wmf|emf|vsd|pdf|rtf|odt)$
- acl store_rewrite_list_path urlpath_regex \.(class|jar|exe|gz|bz|bz2|tar|tgz|zip|gzip|arj|ace|bin|cab|msi|rar)$
- acl store_rewrite_list_path urlpath_regex \.(htm|html|mhtml|css|js)$
- acl getmethod method GET
- storeurl_access allow speedtest
- storeurl_access deny dontrewrite
- storeurl_access deny !getmethod
- storeurl_access allow store_rewrite_list
- storeurl_access allow store_rewrite_list_path
- storeurl_access allow store_rewrite_list_web_CDN
- storeurl_access allow store_rewrite_list_web store_rewrite_list_path
- storeurl_access deny all
- storeurl_rewrite_program /usr/local/etc/squid/storeurl.pl
- storeurl_rewrite_children 16
- storeurl_rewrite_concurrency 100
- ### SNMP , if you want to generate graphs for SQUID via MRTG
- acl snmppublic snmp_community public
- snmp_port 3401
- snmp_access allow snmppublic all
- snmp_access allow all
- cachemgr_passwd none config reconfigure
- ### work around for fragment videos of msn
- acl msnvideo url_regex QualityLevel.*Fragment
- http_access deny msnvideo
- ### SQUID/LUSCA TUNING
- max_stale 10 years
- include /usr/local/etc/squid/refresh.conf
- acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
- upgrade_http0.9 deny shoutcast
- acl apache rep_header Server ^Apache
- broken_vary_encoding allow apache
- reload_into_ims on
- strip_query_terms off
- deny_info TCP_RESET localnet
- negative_dns_ttl 1 second
- negative_ttl 0 second
- maximum_single_addr_tries 2
- retry_on_error on
- vary_ignore_expire on
- ipcache_size 4096
- fqdncache_size 1024
- pipeline_prefetch on #requires client persistent connections on
- high_page_fault_warning 50
- ### OTHER TUNING - NOT RELATED FROM ORIGINAL LUSCA REV-14850 BY CHUDY FERNANDEZ
- # store_dir_select_algorithm round-robin #Used only if you have more than 1 cache_dir
- memory_pools on
- half_closed_clients off
- n_aiops_threads 128
- ### ney2x tuning
- buffered_logs on
- # read_ahead_gap 32 KB
- cache_vary on
- ipcache_low 98
- ipcache_high 99
- client_persistent_connections on
- server_persistent_connections on
- load_check_stopen on
- load_check_stcreate on
- dns_retransmit_interval 2 seconds
- collapsed_forwarding on
- download_fastest_client_speed on
- detect_broken_pconn on
- # incoming_rate 20
- # blank_error_pages on
- pconn_timeout 30 seconds
- forward_timeout 30 seconds
- connect_timeout 30 seconds
- read_timeout 30 seconds
- request_timeout 30 seconds
- persistent_request_timeout 1 minute
- client_lifetime 20 hours
- ### ANONYMOUS PROXY
- forwarded_for transparent
- header_access From deny all
- header_access Server deny all
- header_access Link deny all
- header_access Via deny all
- header_access X-Forwarded-For deny all
- httpd_suppress_version_string on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement