Advertisement
ney2x

include.conf

Aug 25th, 2014
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 5.96 KB | None | 0 0
  1. ### DENY OR BLOCK EXTENSIONS
  2. acl blocklan src 192.168.1.101-192.168.1.150
  3. acl blockfiles urlpath_regex -i "/usr/local/etc/squid/blockExtensions.acl"
  4. deny_info ERR_BLOCKED_FILES blockfiles
  5. http_access deny blocklan blockfiles
  6.  
  7. #########################################
  8. ## NEW SQUID.CONF, [email protected]  ##
  9. ## REV BY: JOEDANGER  8/15/2014        ##
  10. #########################################
  11.  
  12. # ==========================================================================
  13. # YOUTUBE ENCODING
  14. # ==========================================================================
  15. acl youtube url_regex -i youtube.*(ptracking|stream_204|player_204|gen_204) .*$
  16. acl youtube url_regex -i (youtube|googlevideo)\.com\/(get_video|videoplayback|videoplay).*$
  17. acl store_rewrite_list urlpath_regex \/(watch\?|get_video\?|videodownload\?|videoplayback.*id)
  18. 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)\?
  19. acl store_rewrite_list urlpath_regex (youtube|google).*(videoplayback|liveplay)
  20. acl store_rewrite_list urlpath_regex \/(get_video\?|videodownload\?|videoplayback.*id)
  21. acl dontrewrite url_regex redbot\.org (get_video|videoplayback\?id|videoplayback.*id).*begin\=[1-9][0-9]* \.php\?
  22. storeurl_access allow youtube
  23.  
  24. #===========================================================================
  25. #    Loading Patch Online Games 8-20-2014
  26. #===========================================================================
  27. acl DENYCACHE urlpath_regex \.(ini|ui|lst|inf|pak|ver|patch|md5|cfg|lst|list|rsc|log|conf|dbd|db)$
  28. acl DENYCACHE urlpath_regex (notice.html|afs.dat|dat.asp|patchinfo.xml|version.list|iepngfix.htc|updates.txt|patchlist.txt)
  29. acl DENYCACHE urlpath_regex (pointblank.css|login_form.css|form.css|noupdate.ui|ahn.ui|3n.mh)$
  30. acl DENYCACHE urlpath_regex (Loader|gamenotice|sources|captcha|notice|reset)
  31. no_cache deny DENYCACHE
  32.  
  33. range_offset_limit 1 MB !DENYCACHE
  34. uri_whitespace strip
  35.  
  36. # ==== Custom Option REWRITE ====
  37. acl speedtest url_regex ^http:\/\/.*\/speedtest\/.*
  38. acl store_rewrite_list urlpath_regex \.(mp2|mp3|mid|midi|mp[234]|wav|ram|ra|rm|au|3gp|m4r|m4a)\?
  39. acl store_rewrite_list urlpath_regex \.(mpg|mpeg|mp4|m4v|mov|avi|asf|wmv|wma|dat|flv|swf)\?
  40. acl store_rewrite_list urlpath_regex \.(jpeg|jpg|jpe|jp2|gif|tiff?|pcx|png|bmp|pic|ico)\?
  41. acl store_rewrite_list urlpath_regex \.(chm|dll|doc|docx|xls|xlsx|ppt|pptx|pps|ppsx|mdb|mdbx)\?
  42. acl store_rewrite_list urlpath_regex \.(txt|conf|cfm|psd|wmf|emf|vsd|pdf|rtf|odt)\?
  43. acl store_rewrite_list urlpath_regex \.(class|jar|exe|gz|bz|bz2|tar|tgz|zip|gzip|arj|ace|bin|cab|msi|rar)\?
  44. acl store_rewrite_list urlpath_regex \.(htm|html|mhtml|css|js)\?
  45.  
  46. acl store_rewrite_list_web url_regex ^http:\/\/([A-Za-z-]+[0-9]+)*\.[A-Za-z]*\.[A-Za-z]*
  47. acl store_rewrite_list_web_CDN url_regex ^http:\/\/[a-z]+[0-9]\.google\.com doubleclick\.net
  48.  
  49. acl store_rewrite_list_path urlpath_regex \.(mp2|mp3|mid|midi|mp[234]|wav|ram|ra|rm|au|3gp|m4r|m4a)$
  50. acl store_rewrite_list_path urlpath_regex \.(mpg|mpeg|mp4|m4v|mov|avi|asf|wmv|wma|dat|flv|swf)$
  51. acl store_rewrite_list_path urlpath_regex \.(jpeg|jpg|jpe|jp2|gif|tiff?|pcx|png|bmp|pic|ico)$
  52. acl store_rewrite_list_path urlpath_regex \.(chm|dll|doc|docx|xls|xlsx|ppt|pptx|pps|ppsx|mdb|mdbx)$
  53. acl store_rewrite_list_path urlpath_regex \.(txt|conf|cfm|psd|wmf|emf|vsd|pdf|rtf|odt)$
  54. acl store_rewrite_list_path urlpath_regex \.(class|jar|exe|gz|bz|bz2|tar|tgz|zip|gzip|arj|ace|bin|cab|msi|rar)$
  55. acl store_rewrite_list_path urlpath_regex \.(htm|html|mhtml|css|js)$
  56.  
  57. acl getmethod method GET
  58.  
  59. storeurl_access allow speedtest
  60. storeurl_access deny dontrewrite
  61. storeurl_access deny !getmethod
  62. storeurl_access allow store_rewrite_list
  63. storeurl_access allow store_rewrite_list_path
  64. storeurl_access allow store_rewrite_list_web_CDN
  65. storeurl_access allow store_rewrite_list_web store_rewrite_list_path
  66.  
  67. storeurl_access deny all
  68.  
  69. storeurl_rewrite_program /usr/local/etc/squid/storeurl.pl
  70. storeurl_rewrite_children 16
  71. storeurl_rewrite_concurrency 100
  72.  
  73. ### SNMP , if you want to generate graphs for SQUID via MRTG
  74. acl snmppublic snmp_community public
  75. snmp_port 3401
  76. snmp_access allow snmppublic all
  77. snmp_access allow all
  78.  
  79. cachemgr_passwd none config reconfigure
  80.  
  81. ### work around for fragment videos of msn
  82. acl msnvideo url_regex QualityLevel.*Fragment
  83. http_access deny msnvideo
  84.  
  85. ### SQUID/LUSCA TUNING
  86. max_stale 10 years
  87.  
  88. include /usr/local/etc/squid/refresh.conf
  89.  
  90. acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
  91. upgrade_http0.9 deny shoutcast
  92. acl apache rep_header Server ^Apache
  93. broken_vary_encoding allow apache
  94.  
  95. reload_into_ims on
  96.  
  97. strip_query_terms off
  98. deny_info TCP_RESET localnet
  99. negative_dns_ttl 1 second
  100. negative_ttl 0 second
  101. maximum_single_addr_tries 2
  102. retry_on_error on
  103. vary_ignore_expire on
  104. ipcache_size 4096
  105. fqdncache_size 1024
  106. pipeline_prefetch on #requires client persistent connections on
  107.  
  108. high_page_fault_warning 50
  109.  
  110. ### OTHER TUNING - NOT RELATED FROM ORIGINAL LUSCA REV-14850 BY CHUDY FERNANDEZ
  111.  
  112. # store_dir_select_algorithm round-robin #Used only if you have more than 1 cache_dir
  113.  
  114. memory_pools on
  115. half_closed_clients off
  116.  
  117. n_aiops_threads 128
  118.  
  119. ### ney2x tuning
  120. buffered_logs on
  121. # read_ahead_gap 32 KB
  122. cache_vary on
  123. ipcache_low 98
  124. ipcache_high 99
  125. client_persistent_connections on
  126. server_persistent_connections on
  127. load_check_stopen on
  128. load_check_stcreate on
  129.  
  130. dns_retransmit_interval 2 seconds
  131. collapsed_forwarding on
  132. download_fastest_client_speed on
  133. detect_broken_pconn on
  134. # incoming_rate 20
  135. # blank_error_pages on
  136. pconn_timeout 30 seconds
  137. forward_timeout 30 seconds
  138. connect_timeout 30 seconds
  139. read_timeout 30 seconds
  140. request_timeout 30 seconds
  141. persistent_request_timeout 1 minute
  142. client_lifetime 20 hours
  143.  
  144. ### ANONYMOUS PROXY
  145. forwarded_for transparent
  146. header_access From deny all
  147. header_access Server deny all
  148. header_access Link deny all
  149. header_access Via deny all
  150. header_access X-Forwarded-For deny all
  151. httpd_suppress_version_string on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement