Advertisement
n4yla

squid.conf_LUSCA Head r14809

Mar 18th, 2013
9,904
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.14 KB | None | 0 0
  1. ###########################################
  2. # WELCOME TO SQUID LUSCA_HEAD-r14809 #
  3. # Tunning by : AlaskaRian-Network & Brian #
  4. ###########################################
  5. offline_mode on
  6. #============================================================================================================================#
  7. #=========================================================# AWAL #=========================================================#
  8. #============================================================================================================================#
  9. acl all src all
  10. acl manager proto cache_object
  11. acl localhost src 127.0.0.1/32
  12. acl to_localhost dst 127.0.0.0/8
  13. acl localnet src 192.168.20.0/24 # RFC1918 possible internal network #Sesuaikan dengan network Anda
  14. #acl localnet src 10.0.1.0/24 # RFC1918 possible internal network
  15. #acl localnet src 10.0.2.0/24 # RFC1918 possible internal network
  16. acl SSL_ports port 443
  17. acl Safe_ports port 80 # http
  18. acl Safe_ports port 21 # ftp
  19. acl Safe_ports port 443 # https
  20. acl Safe_ports port 70 # gopher
  21. acl Safe_ports port 210 # wais
  22. acl Safe_ports port 1025-65535 # unregistered ports
  23. acl Safe_ports port 280 # http-mgmt
  24. acl Safe_ports port 488 # gss-http
  25. acl Safe_ports port 591 # filemaker
  26. acl Safe_ports port 777 # multiling http
  27. acl CONNECT method CONNECT
  28. http_access allow manager localhost
  29. http_access deny manager
  30. http_access deny !Safe_ports
  31. http_access deny CONNECT !SSL_ports
  32. http_access allow localnet
  33. http_access deny all
  34. icp_access allow localnet
  35. icp_access deny all
  36. http_port 8080 transparent
  37.  
  38. #cache_dir aufs /cache/ 10000 16 256
  39. cache_dir aufs /cache 25600 60 256
  40.  
  41. cache_mem 8 MB
  42. maximum_object_size_in_memory 128 MB
  43. minimum_object_size 1 bytes
  44. maximum_object_size 393216 KB
  45. cache_swap_low 95
  46. cache_swap_high 99
  47. access_log /var/log/squid/access.log
  48. cache_log /var/log/squid/cache.log
  49. cache_store_log /var/log/squid/store.log
  50. acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
  51. upgrade_http0.9 deny shoutcast
  52. acl apache rep_header Server ^Apache
  53. broken_vary_encoding allow apache
  54. cache_effective_user proxy
  55. cache_effective_group proxy
  56.  
  57. #=================================================================================================================================#
  58. #=========================================================# REGEX URL #=========================================================#
  59. #=================================================================================================================================#
  60. coredump_dir /cache/
  61. ###############################################################################
  62. #acl PHP77 url_regex forum.php forumdisplay.php showthread.php showthreads.php
  63. #acl PHP77 url_regex download.php downloads.php classifieds.php classified.php
  64. #acl PHP77 url_regex forum
  65. #no_cache deny PHP77
  66.  
  67. #hierarchy_stoplist cgi-bin ? localhost
  68. #acl QUERY22 urlpath_regex cgi-bin \? localhost
  69. #no_cache deny QUERY22
  70. ################################################################################
  71. #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)
  72. #acl store_rewrite_list_domain url_regex ^http:\/\/([a-zA-Z-]+[0-9-]+)\.[A-Za-z]*\.[A-Za-z]*
  73. #acl store_rewrite_list_domain url_regex (([a-z]{1,2}[0-9]{1,3})|([0-9]{1,3}[a-z]{1,2}))\.[a-z]*[0-9]?\.[a-z]{3}
  74. #acl store_rewrite_list_path urlpath_regex \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|avc|zip|mp3|3gp|rar|on2|mar|exe)$
  75. #acl store_rewrite_list_domain_CDN url_regex \.rapidshare\.com.*\/[0-9]*\/.*\/[^\/]* ^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*) \.doubleclick\.net.* yieldmanager cpxinteractive ^http:\/\/[.a-z0-9]*\.photobucket\.com.*\.[a-z]{3}$ quantserve\.com
  76.  
  77. emulate_httpd_log off
  78. server_http11 on
  79. redirector_bypass on
  80.  
  81. acl video urlpath_regex \/(get_video|videoplayback\?id|videoplayback.*id)
  82. acl speedtest urlpath_regex \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|wmv|3gp|mp(4|3)|exe|msi|zip|on2|mar|txt)\?
  83. acl angka1 url_regex ^http:\/\/([a-zA-Z-]+[0-9-]+)\.[A-Za-z]*\.[A-Za-z]*
  84. acl angka2 url_regex (([a-z]{1,2}[0-9]{1,3})|([0-9]{1,3}[a-z]{1,2}))\.[a-z]*[0-9]?\.[a-z]{3}
  85. acl gambar urlpath_regex \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|avc|zip|mp3|3gp|rar|on2|mar|exe)$
  86. acl rapidshare url_regex \.rapidshare\.com.*\/[0-9]*\/.*\/[^\/]* ^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*) \.doubleclick\.net.*
  87. acl photobucket url_regex ^http:\/\/[.a-z0-9]*\.photobucket\.com.*\.[a-z]{3}$ quantserve\.com
  88. acl google url_regex ^http:\/\/[a-z]+[0-9]\.google\.co(m|\.id)
  89. acl indowebster url_regex ^http:\/\/\.www[0-9][0-9]\.indowebster\.com\/(.*)(rar|zip|flv|wm(a|v)|3gp|mp(4|3)|exe|msi|avi|(mp(e?g|a|e|1|2|3|4))|cab|exe)
  90. acl getmethod method GET
  91.  
  92. storeurl_access allow video
  93. storeurl_access allow speedtest
  94. storeurl_access allow gambar
  95. storeurl_access allow rapidshare
  96. storeurl_access allow photobucket
  97. storeurl_access allow indowebster
  98. storeurl_access deny all
  99.  
  100. storeurl_rewrite_program /usr/local/squid/etc/storeurl.pl
  101. storeurl_rewrite_children 1
  102. storeurl_rewrite_concurrency 100
  103. #storeurl_rewrite_children 15 #7
  104. #storeurl_rewrite_concurrency 10 #60
  105.  
  106.  
  107. #=======================================================================================================================================#
  108. #=========================================================# REFRESH PATTERN #=========================================================#
  109. #=======================================================================================================================================#
  110. # VIDEO CACHE
  111. refresh_pattern ^http://(.*?)/get_video\? 10080 90% 432000 override-expire ignore-no-cache ignore-private
  112. refresh_pattern ^http://(.*?)/videoplayback\? 10080 90% 432000 override-expire ignore-no-cache ignore-private
  113. refresh_pattern -i (get_video\?|videoplayback\?id|videoplayback.*id) 161280 50000% 525948 override-expire ignore-reload
  114.  
  115. # facebook
  116. refresh_pattern ((facebook.com)|(85.131.151.39)).*\.(jpg|png|gif) 129600 100% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
  117. refresh_pattern ((tagged.com)|(96.17.109.27)).*\.(jpg|png|gif) 129600 100% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
  118. refresh_pattern static\.ak\.fbcdn\.net*\.(jpg|gif|png) 129600 100% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
  119. refresh_pattern ^http:\/\/profile\.ak\.fbcdn.net*\.(jpg|gif|png) 129600 100% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
  120. refresh_pattern edgecastcdn.\net.*\.swf? 129600 100% 129600 override-expire ignore-reload store-stale
  121. refresh_pattern \.(jp(e?g|e|2)|tiff?|bmp|gif|png)($|&) 129600 100% 129600 ignore-no-cache ignore-no-store reload-into-ims override-expire store-stale
  122. refresh_pattern .zynga.net.*\.(jpg|gif|png|swf|mp3)($|&) 129600 100% 129600 store-stale
  123. refresh_pattern .zynga.com.*\.(jpg|gif|png|swf|mp3)($|&) 129600 100% 129600 store-stale
  124. refresh_pattern .farmville.net.*\.(jpg|gif|png|swf|mp3)($|&) 129600 100% 129600 store-stale
  125. refresh_pattern .farmville.com.*\.(jpg|gif|png|swf|mp3)($|&) 129600 100% 129600 store-stale
  126. refresh_pattern .ninjasaga.com.*\.(jpg|gif|png|swf|mp3)($|&) 129600 100% 129600 store-stale
  127. refresh_pattern .apps.facebook.com.*\.(jpg|gif|png|swf|mp3)($|&) 129600 100% 129600 store-stale
  128. refresh_pattern .frontierville.*\.(jpg|gif|png|swf|mp3)($|&) 129600 100% 129600 store-stale
  129. refresh_pattern .tagged.*\.(jpg|gif|png|swf|mp3)($|&) 129600 100% 129600 store-stale
  130.  
  131. #ads
  132. refresh_pattern ^.*(utm\.gif|ads\?|rmxads\.com|ad\.z5x\.net|bh\.contextweb\.com|bstats\.adbrite\.com|a1\.interclick\.com|ad\.trafficmp\.com|ads\.cubics\.com|ad\.xtendmedia\.com|\.googlesyndication\.com|advertising\.com|yieldmanager|game-advertising\.com|pixel\.quantserve\.com|adperium\.com|doubleclick\.net|adserving\.cpxinteractive\.com|syndication\.com|media.fastclick.net).* 129600 20% 129600 ignore-no-cache ignore-no-store ignore-private override-expire ignore-reload ignore-auth store-stale negative-ttl=40320 max-stale=1440
  133. #specific sites
  134. refresh_pattern ^.*safebrowsing.*google 129600 100% 129600 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-private ignore-auth negative-ttl=10080 store-stale
  135. refresh_pattern (get_video\?|videoplayback\?|videodownload\?|\.flv?) 129600 99100% 129600 override-expire ignore-reload store-stale
  136. refresh_pattern \.(ico|video-stats) 129600 100% 129600 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-private ignore-auth override-lastmod negative-ttl=10080 store-stale
  137.  
  138. # pictures & images
  139. refresh_pattern -i \.(gif|png|jpeg|jpg|bmp|tif|tiff|ico|swf)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth ignore-private store-stale
  140. refresh_pattern -i \.(gif|png|jpeg|jpg|bmp|tif|tiff|ico|swf)\? 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth ignore-private store-stale
  141.  
  142. # website
  143. #refresh_pattern -i \.(xml|html|htm|js|jsp|txt|css|php|asp)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth store-stale
  144. refresh_pattern -i \.(xml|js|jsp|txt|css)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth store-stale
  145. refresh_pattern -i \.(xml|js|jsp|txt|css)\? 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth store-stale
  146.  
  147. #sound, video multimedia
  148. refresh_pattern -i \.(flv|x-flv|mov|avi|qt|mpg|mpeg|wmv)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache store-stale
  149. refresh_pattern -i \.(wav|mp3|mp4|au|mid)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth ignore-private store-stale
  150.  
  151. # files
  152. refresh_pattern -i \.(iso|deb|rpm|zip|tar|tgz|ram|rar|bin|ppt|doc)$ 10080 90% 43200 ignore-no-cache ignore-auth store-stale
  153. refresh_pattern -i \.(zip|gz|arj|lha|lzh)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth store-stale
  154. refresh_pattern -i \.(rar|tgz|tar|exe|bin)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth ignore-reload ignore-no-cache store-stale
  155. refresh_pattern -i \.(hqx|pdf|rtf|doc|swf)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth store-stale
  156. refresh_pattern -i \.(inc|cab|ad|txt|dll)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth store-stale
  157.  
  158. #IIX DOWNLOAD
  159. refresh_pattern ^http:\/\/\.www[0-9][0-9]\.indowebster\.com\/(.*)(mp3|rar|zip|flv|wmv|3gp|mp(4|3)|exe|msi|zip) 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache ignore-no-store store-stale ignore-auth
  160.  
  161. #default option
  162. refresh_pattern ^ftp: 1440 20% 10080
  163. refresh_pattern -i (/cgi-bin/|\?) 1 0% 2
  164. refresh_pattern ^gopher: 1440 0% 1440
  165. refresh_pattern . 0 20% 4320 store-stale
  166.  
  167.  
  168. #=============================================================================================================================#
  169. #=========================================================# TOOLS #=========================================================#
  170. #=============================================================================================================================#
  171. memory_replacement_policy heap GDSF
  172. cache_replacement_policy heap LFUDA
  173. negative_ttl 2 minutes
  174. half_closed_clients off
  175.  
  176. connect_timeout 1 minute
  177. read_timeout 15 minutes
  178. request_timeout 5 minutes
  179. persistent_request_timeout 2 minutes
  180. half_closed_clients on
  181. shutdown_lifetime 30 seconds
  182.  
  183.  
  184. icp_port 0
  185. prefer_direct off
  186.  
  187. ipcache_size 5120
  188. ipcache_low 95
  189. ipcache_high 99
  190.  
  191. fqdncache_size 5120
  192.  
  193. memory_pools off
  194. log_icp_queries off
  195. icp_hit_stale on
  196. query_icmp on
  197. reload_into_ims on
  198. pipeline_prefetch on
  199. vary_ignore_expire on
  200.  
  201. visible_hostname ICT_Team_SMPBU
  202. unique_hostname ICT_Team_SMPBU
  203. cachemgr_passwd none all
  204. client_db on
  205. max_filedescriptors 65535
  206.  
  207. # TAG: ZPH
  208. zph_mode tos
  209. zph_local 0x30
  210. zph_parent 0
  211. zph_option 136
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement