Advertisement
albspirit86

not stable

Oct 31st, 2014
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.45 KB | None | 0 0
  1. #=======================================================================#
  2. ## SQUID - Youtube Cache Super Squid Proxy
  3. #=======================================================================#
  4.  
  5. #=============================================
  6. # ADMINISTRATIVE PARAMETER
  7. #=============================================
  8. error_directory /usr/share/squid-langpack/en
  9. cache_mgr Internet-Kaltersia
  10. visible_hostname Internet-Kaltersia
  11.  
  12. cache_mem 1024 MB
  13. cache_swap_low 98
  14. cache_swap_high 99
  15.  
  16. maximum_object_size 1024 MB
  17. maximum_object_size_in_memory 32 KB
  18. #minimum_object_size 512 bytes
  19.  
  20. ipcache_size 16384
  21. ipcache_low 98
  22. ipcache_high 99
  23.  
  24. #memory_pools off
  25. #reload_into_ims on
  26. #vary_ignore_expire on
  27. max_filedescriptors 65536
  28.  
  29. debug_options ALL,1 22,3
  30.  
  31. #====================================
  32. # HDD CACHE
  33. #====================================
  34. cache_replacement_policy heap LFUDA
  35. memory_replacement_policy heap GDSF
  36. #cache_dir aufs /cache1 23000 540 256
  37.  
  38. cache_dir aufs /mnt/ssd1/cache1 55000 64 256 min-size=5KB max-size=2MB
  39. cache_dir aufs /mnt/ssd1/cache2 55000 48 256 min-size=5KB max-size=2MB
  40.  
  41. cache_dir aufs /mnt/ssd2/cache1 55000 16 256 min-size=5KB max-size=2MB
  42. cache_dir aufs /mnt/ssd2/cache2 55000 32 256 min-size=5KB max-size=2MB
  43.  
  44. cache_dir aufs /mnt/1500/cache1 402000 1 256 min-size=1MB max-size=150GB
  45. cache_dir aufs /mnt/1500/cache2 402000 2 256 min-size=1MB max-size=150GB
  46. cache_dir aufs /mnt/1500/cache3 402000 8 256 min-size=1MB max-size=150GB
  47.  
  48.  
  49.  
  50.  
  51. access_log stdio:/var/log/squid/access.log
  52. cache_log /var/log/squid/cache.log
  53. cache_store_log stdio:/var/log/squid/store.log
  54.  
  55.  
  56. #cache allow rewritedoms
  57. #cache deny QUERY
  58. #cache deny redir
  59.  
  60. #====================================
  61. # ACL OPTION
  62. #====================================
  63. acl all src
  64. acl client src 192.168.100.0/24
  65. acl client src 128.0.0.0/16
  66. acl SSL_ports port 443
  67. acl Safe_ports port 80
  68. acl Safe_ports port 21
  69. acl Safe_ports port 443
  70. acl Safe_ports port 70
  71. acl Safe_ports port 210
  72. acl Safe_ports port 1025-65535
  73. acl Safe_ports port 280
  74. acl Safe_ports port 488
  75. acl Safe_ports port 591
  76. acl Safe_ports port 777
  77. acl CONNECT method CONNECT
  78.  
  79.  
  80. acl reverbnation url_regex -i reverbnation.*(audio_player|ec_stream_song).*$
  81. acl reverbnation url_regex -i \.c\.(reverbnation|c2lo)\.com\/(get_audio|audioplayback|audioplay).*$
  82.  
  83. acl youtube url_regex -i youtube.*(ptracking|stream_204|player_204|gen_204).*$
  84. acl youtube url_regex -i (youtube|google).*\/videoplayback\?.*
  85.  
  86. acl dontrewrite url_regex redbot\.org
  87. acl getmethod method GET
  88.  
  89. acl QUERY urlpath_regex -i (begin|start)\=
  90. acl QUERY urlpath_regex -i cgi-bin \? .php$ .asp$ .shtml$ .cfm$ .cfml$ .phtml$ .php3$ localhost
  91. acl dontrewrite url_regex -i c\.youtube\.com\/.*(begin|start)\=.*
  92. acl dontrewrite url_regex redbot\.org
  93. acl getmethod method GET
  94. acl redir urlpath_regex -i &redirect_counter=1&cms_redirect=yes
  95. acl redir urlpath_regex -i &ir=1&rr=12
  96. acl yutub url_regex -i youtube\.com\/(generate_204|ptracking|stream_204|player_204|s|(.*(playback|watchtime|delayplay)))\?.*$
  97. acl yutub url_regex -i gstatic\.com\/csi\?.*$
  98.  
  99. acl rewritedoms url_regex -i dl\.sourceforge\.net.*
  100. acl rewritedoms url_regex -i i[0-9]*\.ytimg\.com.*
  101. acl rewritedoms url_regex -i ak\.fbcdn\.net.*
  102. acl rewritedoms url_regex -i (youtube|google).*\/videoplayback\?.*
  103.  
  104. cache allow youtube
  105. cache allow rewritedoms
  106. cache deny QUERY
  107. cache deny redir
  108.  
  109. #
  110. acl error url_regex -i ^http.*gemscool\.com.*hackshield.*
  111. cache deny dontrewrite error
  112.  
  113. #acl link-bermasalah dst 203.89.146.67
  114. #cache deny link-bermasalah
  115. #ssl_bump none link-bermasalah
  116.  
  117. always_direct allow all
  118. ssl_bump server-first all
  119. http_access deny !Safe_ports
  120. http_access deny CONNECT !SSL_ports
  121. http_access allow client
  122. http_access allow all
  123. http_access allow youtube
  124. http_access allow reverbnation
  125. http_access allow rewritedoms
  126. http_reply_access allow all
  127. icp_access allow all
  128.  
  129. https_port 3127 tproxy ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/etc/squid/ssl_cert/kaltersia.pem
  130. http_port 3128
  131. http_port 3129 tproxy
  132.  
  133. sslcrtd_program /usr/lib/squid/ssl_crtd -s /var/squid/ssl_db/certs/ -M 4MB
  134. sslcrtd_children 20
  135. sslproxy_cert_error allow all
  136. sslproxy_flags DONT_VERIFY_PEER
  137.  
  138. # Protect clients. Never bump servers.
  139. #ssl_bump splice validServerCertificate
  140. #ssl_bump err haveServerCertificate
  141. #ssl_bump peek all
  142. #ssl_bump terminate all
  143. #ssl_bump splice client
  144.  
  145. ssl_bump peek all
  146. ssl_bump splice all
  147.  
  148. store_id_program /etc/squid/store-id.pl
  149. store_id_children 40 startup=10 idle=5 concurrency=0
  150. store_id_access deny !getmethod
  151. store_id_access deny redir
  152. store_id_access deny dontrewrite
  153. store_id_access allow rewritedoms
  154. store_id_access allow youtube
  155. store_id_access allow reverbnation
  156. store_id_access deny all
  157.  
  158. strip_query_terms off
  159.  
  160. #=============================================
  161. # DNS SERVER
  162. #=============================================
  163. dns_v4_first on
  164. dns_nameservers 192.168.5.1
  165. #217.24.240.66
  166. #dns_nameservers 208.67.222.222 208.67.220.220
  167.  
  168. max_stale 1 week
  169.  
  170. refresh_pattern .*(begin|start)\=[1-9][0-9].* 0 0% 0
  171. refresh_pattern -i (cgi-bin|mrtg|graph) 0 0% 0
  172. refresh_pattern -i \.(php|lst|ui|ini|list)$ 0 0% 0
  173. refresh_pattern (update.ini|Update.ini|version.list|Version.list|update.1st|update.exe|autoup.exe) 0 0% 0
  174. refresh_pattern (hackshield|nprotect) 240 100% 420 override-expire override-lastmod reload-into-ims
  175. #refresh_pattern \.gemscool.com.*\.(exe|dll|cab|zip|iop|npz|swf)$ 1440 100% 4320 override-expire override-lastmod reload-into-ims ignore-auth store-stale
  176. #refresh_pattern \.crossfire.web.id.*\.(cab|zip|exe|rar|dat|swf)$ 1440 100% 4320 override-expire override-lastmod reload-into-ims ignore-auth store-stale
  177. #refresh_pattern \.cabalonline.co.id.*\.(cab|zip|exe|rar|dat|swf) 1440 100% 4320 override-expire override-lastmod reload-into-ims ignore-auth store-stale
  178. #refresh_pattern \.megaxus.com.*\.(cab|zip|exe|rar|dat|swf) 1440 100% 4320 override-expire override-lastmod reload-into-ims ignore-auth store-stale
  179. #refresh_pattern \.lytogame.com.*\.(cab|zip|exe|rar|dat|swf) 1440 100% 4320 override-expire override-lastmod reload-into-ims ignore-auth store-stale
  180. #refresh_pattern ((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2}).*\.(pak|exe|zip|kom|stg|npz|swf)$ 1440 100% 4320 override-expire override-lastmod reload-into-ims ignore-auth store-stale
  181.  
  182. #PATTERN REFRESH YOU TUBE
  183. refresh_pattern -i ^http\://video\-srv\.youtube\/.* 10080 100% 43200 override-expire override-lastmod ignore-no-cache ignore-private reload-into-ims ignore-must-revalidate ignore-reload store-stale
  184.  
  185. #PATTERN REFRESH
  186. refresh_pattern -i \.(html|htm|css|js|png|jsp|asx|asp|aspx)$ 240 100% 420
  187. refresh_pattern -i \/speedtest\/.*\.(txt|jpg|png|swf) 0 99% 14400 override-expire ignore-reload ignore-private ignore-reload override-lastmod reload-into-ims
  188. refresh_pattern .pixieimage\.com.*\.(jp(e?g|e|2)|gif|png|tiff?|bmp|swf|mp(4|3)) 1440 99% 14400 override-expire ignore-reload ignore-private ignore-reload override-lastmod reload-into-ims
  189. refresh_pattern .blogspot\.com.*\.(jp(e?g|e|2)|gif|png|tiff?|bmp|swf|mp(4|3)) 1440 99% 14400 override-expire ignore-reload ignore-private ignore-reload override-lastmod reload-into-ims
  190. refresh_pattern .multiply\.com.*\.(jp(e?g|e|2)|gif|png|tiff?|bmp|swf|mp(4|3)) 1440 99% 14400 override-expire ignore-reload ignore-private ignore-reload override-lastmod reload-into-ims
  191. refresh_pattern .((pikawarnet\.com)|(blogspot\.com)|(pixieimage\.com)|(multiply\.com)).* 60 30% 240
  192.  
  193. #sensitive site
  194. refresh_pattern -i \.(sc-|dl-|ex-|mh-|dll|da-) 0 2% 50 reload-into-ims
  195. refresh_pattern -i \.(mst|Xtp|iop)$ 0 50% 1440 reload-into-ims
  196. refresh_pattern -i (index.php|autoup.exe|main.exe|xtrap.xt|autoupgrade.exe|update.exe|grandchase.exe|FSLauncher.exe|FreeStyle_Setup.exe|grandchase.exe|filelist.zip)$ 0 50% 1440
  197. #refresh_pattern -i (UpdaterModifier.exe|FreeStyle.exe|PBLauncher.exe|update.exe|NewLauncher.exe|NewAvalon.exe|hon.exe.zip|cabal.exe)$ 0 50% 1440
  198. #refresh_pattern -i (PointBlank.exe.zip|HSUpdate.exe.zip|PBConfig.exe.zip) 0 50% 1440
  199. refresh_pattern -i (wks_avira-win32-en-pecl.info.gz|wks_avira10-win32-en-pecl.info.gz|servers.def.vpx)$ 0 50% 1440
  200. refresh_pattern -i (setup.exe.gz|avscan.exe.gz|avguard.exe.gz|filelist.zip|AvaClient.exe) 0 50% 1440
  201. refresh_pattern -i (livescore.com|goal.com|bobet) 0 50% 60
  202. refresh_pattern ^http.*(youtube|googlevideo)\.* 43200 99% 242020 ignore-reload override-expire override-lastmod ignore-must-revalidate ignore-private ignore-no-store ignore-auth store-stale
  203.  
  204. #FB
  205. refresh_pattern \.facebook\.com.*\.(jp(e?g|e|2)|gif|png|tiff?|bmp|swf|mp(4|3)) 1440 99% 14400 override-expire ignore-reload ignore-private
  206. refresh_pattern \.facebook\.com.* 240 50% 480
  207. refresh_pattern \.fbcdn\.net.*\.(jp(e?g|e|2)|gif|png|tiff?|bmp|swf|mp(4|3)) 1440 99% 14400 override-expire ignore-reload ignore-private store-stale
  208. refresh_pattern \.gstatic\.com/images\? 1440 99% 14400 override-expire override-lastmod ignore-reload ignore-private ignore-must-revalidate
  209. refresh_pattern \.(akamaihd|edgecastcdn|spilcdn|zgncdn|(tw|y|yt)img)\.com.*\.(jp(e?g|e|2)|gif|png|swf|mp(3|4)) 1440 99% 14400 override-expire override-lastmod ignore-reload ignore-private
  210. refresh_pattern (gstatic|diggstatic)\.com/.* 1440 99% 14400 override-expire ignore-reload ignore-private
  211. refresh_pattern (photobucket|pbsrc|flickr|yimg|ytimg|twimg|gravatar)\.com.*\.(jp(e?g|e|2)|gif|png|tiff?|bmp|swf|mp(4|3)) 1440 99% 14400 override-expire ignore-reload ignore-private
  212. refresh_pattern (zynga|ninjasaga|mafiawars|cityville|farmville|crowdstar|spilcdn|agame|popcap)\.com/.* 1440 99% 14400 override-expire ignore-reload ignore-private
  213. refresh_pattern ^http:\/\/images|image|img|pics|openx|thumbs[0-9]\. 1440 99% 14400 override-expire ignore-reload ignore-private
  214. refresh_pattern ^.*safebrowsing.*google 1440 99% 14400 override-expire ignore-reload ignore-private ignore-auth ignore-must-revalidate
  215. refresh_pattern ^http://.*\.squid\.internal\/.* 10080 100% 79900 override-expire override-lastmod ignore-reload ignore-no-store ignore-must-revalidate ignore-private ignore-auth max-stale=10000 store-stale
  216. refresh_pattern -i reverbnation.com 1440 99% 14400 override-expire override-lastmod ignore-no-cache ignore-private ignore-must-revalidate ignore-reload store-stale
  217. #refresh_pattern (get_video\?|videoplayback\?|videodownload\?|\.flv\?|\.fid\?) 43200 99% 43200 override-expire ignore-reload ignore-must-revalidate ignore-private
  218.  
  219. # Game Online Update
  220. refresh_pattern ^http://file\.pb\.gemscool\.com/gamepatch/.*\.(exe|dll|cab|zip) 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale
  221. refresh_pattern ^http://file\.fs\.gemscool\.com/JCE/.*\.(exe|dll|cab|zip) 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale
  222. refresh_pattern ^http://file\.atlantica\.gemscool\.com/.*\.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale
  223. refresh_pattern ^http://122\.102\.49\.132/.*\.(zip|exe) 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth ignore-no-store store-stale
  224. refresh_pattern ^http://122\.102\.49\.202/.*\.(kom|zip|exe|stg) 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth ignore-no-store store-stale
  225. refresh_pattern ^http://.*\.cabalonline\.co\.id/.*\.(cab|zip|exe|rar|dat) 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale
  226. refresh_pattern ^http://.*\.gemscool\.com/.*\.(cab|zip|exe|rar|dat) 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale
  227. refresh_pattern ^http://patch\.crossfire\.web\.id/.*\.(cab|zip|exe|rar|dat) 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale
  228.  
  229. #ads
  230. refresh_pattern ^.*(streamate.doublepimp.com.*\.js\?|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).* 1440 99% 14400 ignore-private override-expire ignore-reload ignore-auth max-stale=1440
  231. refresh_pattern \.(ico|video-stats) 1440 99% 14400 override-expire ignore-reload ignore-private ignore-auth override-lastmod ignore-must-revalidate
  232. refresh_pattern ^http://((cbk|mt|khm|mlt|tbn)[0-9]?)\.google\.co(m|\.uk|\.id) 1440 99% 14400 override-expire override-lastmod ignore-reload ignore-private ignore-auth ignore-must-revalidate
  233. refresh_pattern vid\.akm\.dailymotion\.com.*\.on2\? 1440 99% 14400 override-expire override-lastmod
  234. refresh_pattern galleries\.video(\?|sz) 1440 99% 14400 override-expire ignore-reload ignore-must-revalidate ignore-private
  235. refresh_pattern \.wikimapia\.org\/? 1440 99% 14400 override-expire override-lastmod ignore-reload ignore-private
  236.  
  237. # Spesific Game URL
  238. refresh_pattern ^http://*.lytogame.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  239. refresh_pattern ^http://*.megaxus.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  240. refresh_pattern ^http://*.ayodance.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  241. refresh_pattern ^http://*.gemscool.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  242. refresh_pattern ^http://*.wavegame.net/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  243. refresh_pattern ^http://*.playcircle.net/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  244. refresh_pattern ^http://*.lineage2.co.id/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  245. refresh_pattern ^http://*.roseonline.web.id/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  246. refresh_pattern ^http://*.xshot.web.id/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  247. refresh_pattern ^http://*.romonline.web.id/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  248. refresh_pattern ^http://*.iahgames.co.id/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  249. refresh_pattern ^http://*.vtconline.co.id/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  250. refresh_pattern ^http://*.blackshotonline.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  251. refresh_pattern ^http://*.speedsoft.co.id/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  252. refresh_pattern ^http://*.ijji.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  253. refresh_pattern ^http://*.mmosite.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  254. # Spesific URL
  255. refresh_pattern ^http://*.indowebster.com.*/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-auth store-stale ignore-must-revalidate
  256. refresh_pattern ^http://*.21cineplex.*/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-auth store-stale ignore-must-revalidate
  257. refresh_pattern ^http://*.kompas.*/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache store-stale ignore-must-revalidate
  258. refresh_pattern ^http://*.blogspot.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  259. refresh_pattern ^http://*.wordpress.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims store-stale ignore-must-revalidate
  260. refresh_pattern ^http://*.photobucket.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  261. refresh_pattern ^http://*.tinypic.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  262. refresh_pattern ^http://*.imageshack.us/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  263. refresh_pattern ^http://*.kaskus.*/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  264. refresh_pattern ^http://*.detik.*/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  265. refresh_pattern ^http://*.detiknews.*/*.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  266. refresh_pattern ^http://video.liputan6.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  267. refresh_pattern ^http://static.liputan6.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  268. refresh_pattern ^http://*.friendster.com/.* 10080 80% 10080 override-expire override-lastmod ignore-auth store-stale ignore-must-revalidate
  269. refresh_pattern ^http://*.forummikrotik.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  270. refresh_pattern ^http://*.linux.or.id/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
  271. refresh_pattern ^http://(.*?)/get_video\? 10080 80% 10080 override-expire ignore-private store-stale ignore-must-revalidate
  272. refresh_pattern ^http://(.*?)/videodownload\? 10080 80% 10080 override-expire ignore-private store-stale ignore-must-revalidate
  273. # Update Antivirus
  274. refresh_pattern guru.avg.com/.*\.(bin) 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
  275. refresh_pattern avast.com.*\.vpx 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
  276. refresh_pattern (avgate|avira).*\.(idx|gz)$ 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
  277. refresh_pattern kaspersky.*\.avc$ 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
  278. refresh_pattern kaspersky 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
  279. refresh_pattern liveupdate.symantecliveupdate.com.*\.zip 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
  280. refresh_pattern .update.nai.com/.*\.(gem|zip|mcs) 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
  281. refresh_pattern .symantec.com.*\(exe|zip) 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
  282. refresh_pattern mbamupdates.com.*\.ref 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
  283. refresh_pattern \/*.eset\.com\.*\(bin|php|ui|exe|mcs|gem|avc|nup)(\?|$) 1440 95% 40320 override-expire override-lastmod ignore-no-store ignore-reload reload-into-ims store-stale
  284. refresh_pattern \/*.eset\.com\.*\(bin|php|ui|exe|mcs|gem|avc|nup) 1440 95% 40320 override-expire override-lastmod ignore-no-store ignore-reload reload-into-ims store-stale
  285. # Update Windows
  286. refresh_pattern windowsupdate.com/.*\.(cab|exe) 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
  287. refresh_pattern update.microsoft.com/.*\.(cab|exe) 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
  288. refresh_pattern download.microsoft.com/.*\.(cab|exe) 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
  289. # Download IIX
  290. refresh_pattern ^http:\/\/\.www[0-9][0-9]\.indowebster\.com\/(.*)(mp3|rar|zip|flv|wmv|3gp|mp(4|3)|exe|msi|zip) 10080 80% 10080 reload-into-ims ignore-reload override-expire ignore-no-store store-stale ignore-auth
  291.  
  292. # Banner IIX
  293. refresh_pattern ^http:\/\/openx.*\.(jp(e?g|e|2)|gif|pn[pg]|swf|ico|css|tiff?) 10080 80% 10080 reload-into-ims ignore-reload override-expire ignore-no-store store-stale
  294. refresh_pattern ^http:\/\/ads(1|2|3).kompas.com.*\/ 10080 80% 10080 reload-into-ims ignore-reload override-expire ignore-no-store store-stale
  295. refresh_pattern ^http:\/\/img.ads.kompas.com.*\/ 10080 80% 10080 reload-into-ims ignore-reload override-expire ignore-no-store store-stale
  296. refresh_pattern .kompasimages.com.*\.(jpg|gif|png|swf) 10080 80% 10080 reload-into-ims ignore-reload override-expire ignore-no-store store-stale
  297. refresh_pattern ^http:\/\/openx.kompas.com.*\/ 10080 80% 10080 reload-into-ims ignore-reload override-expire ignore-no-store store-stale
  298. refresh_pattern kaskus.\us.*\.(jp(e?g|e|2)|gif|png|swf) 10080 80% 10080 reload-into-ims ignore-reload override-expire ignore-no-store store-stale
  299. refresh_pattern ^http:\/\/img.kaskus.us.*\.(jpg|gif|png|swf) 10080 80% 10080 reload-into-ims ignore-reload override-expire ignore-no-store store-stale
  300. refresh_pattern ^http:\/\/img.gemscool.com.*\.(jpg|gif|png|swf) 10080 80% 10080 reload-into-ims ignore-reload override-expire ignore-no-store store-stale
  301. refresh_pattern ^http:\/\/img.pb.gemscool.com.*\.(jpg|gif|png|swf) 10080 80% 10080 reload-into-ims ignore-reload override-expire ignore-no-store store-stale
  302. refresh_pattern ^http:\/\/img.atlantica.gemscool.com.*\.(jpg|gif|png|swf) 10080 80% 10080 reload-into-ims ignore-reload override-expire ignore-no-store store-stale
  303. refresh_pattern ^http:\/\/img.fs.gemscool.com.*\.(jpg|gif|png|swf) 10080 80% 10080 reload-into-ims ignore-reload override-expire ignore-no-store store-stale
  304. refresh_pattern ^http:\/\/img.vivanews.com.*\.(jpg|gif|png|swf) 10080 80% 10080 reload-into-ims ignore-reload override-expire ignore-no-store store-stale
  305.  
  306.  
  307. #general
  308. refresh_pattern -i \.(7z|arj|bin|bz2|cab|dll|exe|gz|inc|iso|jar|lha|ms(i|p|u)|rar|rpm|tar|tgz|zip|rtp|rpz|nui|kom|stg|pak|sup|nzp|npz|iop)$ 1440 99% 14400 override-expire override-lastmod ignore-private reload-into-ims ignore-must-revalidate ignore-reload store-stale
  309. refresh_pattern -i \.(class|doc|docx|pdf|pps|ppt|ppsx|pptx|ps|rtx|txt|wpl|xls|xlsx)$ 1440 99% 14400 override-expire override-lastmod ignore-private reload-into-ims ignore-must-revalidate ignore-reload store-stale
  310. refresh_pattern -i \.(3gp|ac4|agx|au|avi|axd|bmp|cbr|cbt|cbz|dat|divx|flv|gif|hqx|ico|jp(2|e|eg|g)|mid|mk(a|v)|mov|mp(1|2|3|4|e|eg|g)|og(a|g|v)|qt|ra|ram|rm|swf|tif|tiff|wa(v|x)|wm(a|v|x)|x-flv)$ 1440 99% 14400 override-expire override-lastmod ignore-private reload-into-ims ignore-must-revalidate ignore-reload store-stale
  311. refresh_pattern -i .(html|htm|css|js)$ 1440 75% 40320
  312. refresh_pattern -i .index.(html|htm)$ 0 75% 10080
  313. refresh_pattern ^ftp: 1440 20% 10080
  314. refresh_pattern ^gopher: 1440 0% 1440
  315. refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
  316. refresh_pattern . 60 50% 14400 store-stale
  317.  
  318.  
  319. memory_pools off
  320. client_db off
  321. reload_into_ims on
  322. pipeline_prefetch on
  323. offline_mode off
  324. cache_effective_user proxy
  325. cache_effective_group proxy
  326.  
  327. request_header_access From deny all
  328. request_header_access Server deny all
  329. request_header_access WWW-Authenticate deny all
  330. request_header_access Link deny all
  331. request_header_access Cache-Control deny all
  332. request_header_access Proxy-Connection deny all
  333. request_header_access X-Cache deny all
  334. request_header_access X-Cache-Lookup deny all
  335. request_header_access Via deny all
  336. request_header_access Forwarded-For deny all
  337. request_header_access X-Forwarded-For deny all
  338. request_header_access Pragma deny all
  339. request_header_access Keep-Alive deny all
  340. vary_ignore_expire on
  341.  
  342.  
  343. # local
  344. qos_flows local-hit=0x30
  345. # sibling
  346. # qos_flows sibling-hit=0x31
  347. # parent
  348. # qos_flows parent-hit=0x32
  349. # preserve
  350. # qos_flows disable-preserve-miss
  351.  
  352.  
  353. ================================
  354. ========================
  355. store id
  356.  
  357. #!/usr/bin/perl
  358. # ISI DARI STORE-ID DIBAWAH INI DARI SHUDY
  359. # SHUDYLAH BERBAGI ILMU :3
  360. # ucok_karnadi(at)yahoo.com or https://twitter.com/syaifuddin_jw
  361.  
  362. # send link from youtube contain >> (ptracking|stream_204|player_204|gen_204) to storeurl
  363.  
  364.  
  365. $|=1;
  366. while (<>) {
  367. @X = split;
  368.  
  369. if ( $X[0] =~ m/^http\:\/\/.*/) {
  370. $x = $X[0];
  371. $_ = $X[0];
  372. $u = $X[0];
  373. } else {
  374. $x = $X[1];
  375. $_ = $X[1];
  376. $u = $X[1];
  377. }
  378.  
  379. if ($x =~ m/^http(|s)\:\/\/.*youtube.*(ptracking|stream_204|player_204|gen_204).*(video_id|docid|v)\=([^\&\s]*).*/){
  380. $vid = $4 ;
  381. @cpn = m/[&?]cpn\=([^\&\s]*)/;
  382. $fn = "/var/log/squid/@cpn";
  383. unless (-e $fn) {
  384. open FH,">".$fn ;
  385. print FH "$vid\n";
  386. close FH;
  387. }
  388. $out = $x ;
  389.  
  390. } elsif ($x =~ m/^http(|s)\:\/\/.*(youtube|google).*videoplayback.*/){
  391. @itag = m/[&?](itag=[0-9]*)/;
  392. @ids = m/[&?]id\=([^\&\s]*)/;
  393. @mime = m/[&?](mime\=[^\&\s]*)/;
  394. @cpn = m/[&?]cpn\=([^\&\s]*)/;
  395. $fn = "/var/log/squid/@cpn";
  396. if (-e $fn) {
  397. open FH,"<".$fn ;
  398. $id = <FH>;
  399. chomp $id ;
  400. close FH ;
  401. } else {
  402. $id = $ids[0] ;
  403. }
  404. @range = m/[&?](range=[^\&\s]*)/;
  405. $out = "http://video-srv.youtube.com.SQUIDINTERNAL/id=" . $id . "&@itag@range@mime";
  406.  
  407.  
  408.  
  409. #} ### tambahan baru
  410. } elsif ($x=~ m/^https:\/\/fbcdn-s?(photos|profile|creative|vthumb|dragon).*akamaihd.net\/(h(photos|profile|ads|vthumb)-ak-(xpa|xfp|xap|xpf|xfa|xfa|prn|xaf|prn|ash|frc)[0-9])\/.*\/(.*)\/(.*)/) {
  411. $out="http://akamaihd.squid.internal/" . $5 . $6 . "\n";
  412.  
  413. } elsif ($x=~ m/^https:\/\/fbexternal-a.akamaihd.net\/safe_image.php\?[a-zA-Z0-9\&\=].+%2F(.*\.(jpe?g|png))&.*/) {
  414. $out="http://akamaihd.squid.internal/" . $1 ;
  415.  
  416. } elsif ($x=~ m/^https:\/\/fbexternal-a.akamaihd.net\/.*php\?[a-zA-Z0-9\&\=].+%2F(.*ashx).[a-z0-9](.*)/) {
  417. $out="http://akamaihd.squid.internal/" . $1 ;
  418.  
  419. } elsif ($x =~ m/^https:\/\/scontent.*\.xx.fbcdn.net\/h(photos|profile|ads)-(xpa|xfp|xap|xpf|xfa|xfa|prn|xaf|prn|ash|frc)[0-9]\/.*\/(.*)\/(.*)/) {
  420. #$out="http://fbcdn.net.squid.internal/" . $3 . $4 . "\n";
  421.  
  422. } elsif ($x =~ m/^https:\/\/www.facebook.com\/images\/profile\/.*\/.*\/(.*)/) {
  423. $out="http://www.facebook.com.squid.internal/" . $1;
  424.  
  425. } elsif ($x =~ m/^https:\/\/fbstatic-a.akamaihd.net\/rsrc.php\/.*\/(.*)/) {
  426. $out="http://fbstatic-a.akamaihd.net.squid.internal/" . $1;
  427.  
  428. } elsif ($x =~ m/^https:\/\/(scontent|fbcdn).*\/hvideo.*(xpa|xfp|xap|xpf|xfa|xfa|prn|xaf|prn|ash|frc)[0-9]\/v\/.*\/(.*\mp4)/) {
  429. $out="http://fbcdn.akamaihd.net.squid.internal/" . $3;
  430.  
  431. } elsif ($x =~ m/^https?:\/\/(attachment.fbsbx.com)\/(file_download.php\?id=([\d]+).*)/) {
  432. $out="http://fbsbx.squid.internal/" . $3 ;
  433.  
  434. } elsif ($x =~ m/^https:\/\/www.facebook.com\/.*php\?fbid=(.*)&set=.*[a-z0-9]/) {
  435. $out="http://www.facebook.com.internal/" . $1 ;
  436.  
  437.  
  438. #} elsif ($x =~ m/^http:\/\/.*(profile|photo|creative).*\.ak\.fbcdn\.net\/((h|)(profile|photos)-ak-)(snc|ash|prn)[0-9]?(.*)/) {
  439. # $out="http://fbcdn.net.squid.internal/" . $2 . "fb" . $6 ;
  440.  
  441. #} elsif ($x =~ m/^https?:\/\/.*\.(fbcdn|hvideo|akamaihd)\.net\/(.*-ak-(frc|snc|ash|prn)[0-9])\/(.*\/|)(.*\.(mp4|jpg|bmp|png|flv|m4v|gif|jpeg)).*/) {
  442. #$out = "http://cdn.fbcdn.squid.internal/" . $2 . "/" . $4 . $5 ;
  443.  
  444.  
  445. } elsif ($x =~ m/^http:\/\/[\d\w\-]+\.c\.pack\.google\.com\/.*\/(.*?\.exe)\?.*/) {
  446. $out="http://googlechrome.squid.internal/" . $1 ;
  447.  
  448. } elsif ($x =~ m/^http:\/\/[\d\w\-]+\.c\.pack\.google\.com\/.*\/.*\/(.*?\.crx)\?.*/) {
  449. $out="http://googlechrome.squid.internal/" . $1 ;
  450.  
  451.  
  452. } elsif ($x =~ m/^http:\/\/i[1-4]\.ytimg\.com\/(.*)/) {
  453. $out="http://ytimg.com.squid.internal/" . $1 ;
  454.  
  455. } elsif ($x =~ m/^http:\/\/.*\.dl\.sourceforge\.net\/(.*)/) {
  456. $out="http://dl.sourceforge.net.squid.internal/" . $1 ;
  457.  
  458. #Speedtest
  459. } elsif ($x =~ m/^http\:\/\/.*\/speedtest\/(.*\.(jpg|txt)).*/) {
  460. $out="http://speedtest.squid.internal/" . $1 ;
  461.  
  462. #reverbnation
  463. } elsif ($x =~ m/^http:\/\/c2lo\.(reverbnation)\.com\/(audio)_player\/.*\/(.*)[\/\?]/) {
  464. $out = "http://reverbnation.squid.internal/" . $1 . "/" . $2 . "/" . $3 ;
  465.  
  466.  
  467. #BLOGSPOT
  468. } elsif ($x =~ m/^http:\/\/[1-4]\.bp\.(blogspot\.com.*)/) {
  469. $out="http://blog-cdn." . $1 ;
  470.  
  471. #AVAST
  472. } elsif ($x =~ m/^http:\/\/download[0-9]{3}.(avast.com.*)/) {
  473. $out="http://avast-cdn." . $1 ;
  474.  
  475. #AVAST
  476. } elsif ($x =~ m/^http:\/\/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\/(iavs.*)/) {
  477. $out="http://avast-cdn.avast.com/" . $1 ;
  478.  
  479. #KAV
  480. } elsif ($x =~ m/^http:\/\/dnl-[0-9]{2}.(geo.kaspersky.com.*)/) {
  481. $out="http://kav-cdn." . $1 ;
  482.  
  483. #AVG
  484. } elsif ($x =~ m/^http:\/\/update.avg.com/) {
  485. $out="http://avg-cdn." . $1 ;
  486.  
  487. #maps.google.com
  488. } elsif ($x =~ m/^http:\/\/(cbk|mt|kh|mlt|tbn)[0-9]?(.google\.co(m|\.uk|\.id).*)/) {
  489. $out="http://" . $1 . $2 ;
  490.  
  491.  
  492. #maps.google.com
  493. } elsif ($x =~ m/^http:\/\/(kh|mt)[0-9]?(.google.com.*)/) {
  494. $out="http://" . $1 . $2 ;
  495.  
  496. #Google
  497. } elsif ($x =~ m/^http:\/\/(.*\.google-analytics\.com)\/(__utm\.gif)\?.*/) {
  498. $out="http://google-analytics.com.squid.internal/" . $1 . $2 ;
  499.  
  500.  
  501. } elsif ($x =~ m/^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*?)/) {
  502. $out="http://" . $1 ;
  503.  
  504. #cdn, varialble 1st path
  505. } elsif (($x =~ /filehippo/) && (m/^http:\/\/(.*?)\.(.*?)\/(.*?)\/(.*)\.([a-z0-9]{3,4})(\?.*)?/)) {
  506. @y = ($1,$2,$4,$5);
  507. $y[0] =~ s/[a-z0-9]{2,5}/cdn./;
  508. $out="http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] ;
  509.  
  510. #rapidshare
  511. } elsif (($x =~ /rapidshare/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?)([a-z]*\.[^\/]{3}\/[a-z]*\/[0-9]*)\/(.*?)\/([^\/\?\&]{4,})$/)) {
  512. $out="http://cdn." . $3 . "/squid.internal/" . $5 ;
  513.  
  514.  
  515. #domain/path/.*/path/filename
  516. } elsif (($X[1] =~ /fucktube/) && (m/^http:\/\/(.*?)(\.[^\.\-]*?[^\/]*\/[^\/]*)\/(.*)\/([^\/]*)\/([^\/\?\&]*)\.([^\/\?\&]{3,4})(\?.*?)$/)) {
  517. @y = ($1,$2,$4,$5,$6);
  518. $y[0] =~ s/(([a-zA-A]+[0-9]+(-[a-zA-Z])?$)|([^\.]*cdn[^\.]*)|([^\.]*cache[^\.]*))/cdn/;
  519. $out="http://" . $y[0] . $y[1] . "/" . $y[2] . "/" . $y[3] . "." . $y[4] ;
  520.  
  521. #youjizz. We use only domain and filename
  522. } elsif (($X[1] =~ /media[0-9]{1,5}\.youjizz/) && (m/^http:\/\/(.*?)(\.[^\.\-]*?\.[^\/]*)\/(.*)\/([^\/\?\&]*)\.([^\/\?\&]{3,4})(\?.*?)$/)) {
  523. @y = ($1,$2,$4,$5);
  524. $y[0] =~ s/(([a-zA-A]+[0-9]+(-[a-zA-Z])?$)|([^\.]*cdn[^\.]*)|([^\.]*cache[^\.]*))/cdn/;
  525. $out="http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] ;
  526.  
  527. #general purpose for cdn servers. add above your specific servers.
  528. #} elsif (m/^http:\/\/([0-9.]*?)\/\/(.*?)\.(.*)\?(.*?)/) {
  529. #$out="http://squid-cdn-url/" . $2 . "." . $3 ;
  530.  
  531. #generic http://variable.domain.com/path/filename."ex", "ext" or "exte"
  532. #http://cdn1-28.projectplaylist.com
  533. #http://s1sdlod041.bcst.cdn.s1s.yimg.com
  534. } elsif (m/^http:\/\/(.*?)(\.[^\.\-]*?\..*?)\/([^\?\&\=]*)\.([\w\d]{2,4})\??.*$/) {
  535. @y = ($1,$2,$3,$4);
  536. $y[0] =~ s/([a-z][0-9][a-z]dlod[\d]{3})|((cache|cdn)[-\d]*)|([a-zA-A]+-?[0-9]+(-[a-zA-Z]*)?)/cdn/;
  537. $out="http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] ;
  538.  
  539.  
  540. #for yimg.com video
  541. } elsif ($x =~ m/^http:\/\/(.*yimg.com)\/\/(.*)\/([^\/\?\&]*\/[^\/\?\&]*\.[^\/\?\&]{3,4})(\?.*)?$/) {
  542. $out="http://cdn.yimg.com/" . $3 ;
  543.  
  544. #for yimg.com doubled
  545. } elsif ($x =~ m/^http:\/\/(.*?)\.yimg\.com\/(.*?)\.yimg\.com\/(.*?)\?(.*)/) {
  546. $out="http://cdn.yimg.com/" . $3 ;
  547.  
  548. #for yimg.com with &sig=
  549. } elsif ($x =~ m/^http:\/\/([^\.]*)\.yimg\.com\/(.*)/) {
  550. @y = ($1,$2);
  551. $y[0] =~ s/[a-z]+([0-9]+)?/cdn/;
  552. $y[1] =~ s/&sig=.*//;
  553. $out="http://" . $y[0] . ".yimg.com/" . $y[1] ;
  554.  
  555. # all that ends with ;
  556. } elsif (m/^http:\/\/(.*?)\/(.*?)\;(.*)/) {
  557. $out="http://" . $1 . "/" . $2 ;
  558.  
  559.  
  560. } else {
  561. $out=$x;
  562.  
  563. }
  564. if ( $X[0] =~ m/^http\:\/\/.*/) {
  565. print "OK store-id=$out\n" ;
  566. } else {
  567. print $X[0] . " OK store-id=$out\n" ;
  568. }
  569. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement