squid.conf
# HTTP Port for SQUID Service http_port 3128 transparent server_http11 on # Cache Pee, for parent proxy if you ahve any, or ignore it. #cache_peer x.x.x.x parent 8080 0 # Various Logs/files location pid_filename /var/run/squid.pid coredump_dir /var/spool/squid/ error_directory /usr/share/squid/errors/English icon_directory /usr/share/squid/icons mime_table /etc/squid/mime.conf access_log daemon:/var/log/squid/access.log squid cache_log none #debug_options ALL,1 22,3 11,2 #84,9 #referer_log /var/log/squid/referer.log cache_store_log none store_dir_select_algorithm round-robin logfile_daemon /usr/lib/squid/logfile-daemon logfile_rotate 1 # Cache Policy cache_mem 128 MB maximum_object_size_in_memory 128 KB memory_replacement_policy heap GDSF cache_replacement_policy heap LFUDA minimum_object_size 0 bytes maximum_object_size 4 GB cache_swap_low 98 cache_swap_high 99 quick_abort_min 0 KB # Cache Folder Path, using 100GB for test cache_dir aufs /cache1 150000 16 256 # ACL Section acl all src all acl manager proto cache_object acl localhost src 192.168.0.0/16 acl localnet src 192.168.0.0/16 acl SSL_ports port 443 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 # https acl Safe_ports port 70 # gopher acl Safe_ports port 210 # wais acl Safe_ports port 1025-65535 # unregistered ports acl Safe_ports port 280 # http-mgmt acl Safe_ports port 488 # gss-http acl Safe_ports port 591 # filemaker acl Safe_ports port 777 # multiling http acl CONNECT method CONNECT acl purge method PURGE acl snmppublic snmp_community public acl range dstdomain .windowsupdate.com range_offset_limit -1 KB range #=========================================================================== # Loading Patch 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 #=========================================================================== # Rules to block few Advertising sites acl ads url_regex -i .youtube\.com\/ad_frame? #acl ads url_regex -i .(s|s[0-90-9])\.youtube\.com #acl ads url_regex -i .googlesyndication\.com #acl ads url_regex -i .googleadservices\.com acl ads url_regex -i .doubleclick\.net #acl ads url_regex -i ^http:\/\/googleads\.* acl ads url_regex -i ^http:\/\/(dtscdn|simpli.fi|puhtml|crwdcntrl|ad|ads|cdnads|advertiser|adk2x|rev2pub|advertiser|aadvertisementt|servedepo|adServe|padsdel|popads|directrev|wwwpromoter|mgid|reklama|addebris|exoclick|trafficfactory|trafficjunky|adk|revdepo|onclickads|onclick|eclkspbn|ads[0-90-9]|ad[0-90-9]|ads\d|kad|a[b|d]|ad\d|adserver|adsbox)\.[a-z0-9]*\.[a-z][a-z]* acl ads url_regex -i ^http:\/\/openx\.[a-z0-9]*\.[a-z][a-z]* acl ads url_regex -i ^http:\/\/[a-z0-9]*\.openx\.net\/ acl ads url_regex -i ^http:\/\/[a-z0-9]*\.u-ad\.info\/ acl ads url_regex -i ^http:\/\/adserver\.bs\/ acl ads url_regex -i ^http:\/\/toroadvertisingmedia\.com\/ #acl ads url_regex -i "/etc/squid/adslist.txt" #http_access deny ads #acl NO-CACHE-SITES dstdomain "/etc/squid/not-to-cache-sites.txt" #no_cache deny NO-CACHE-SITES #acl torrentblock urlpath_regex /etc/squid/torrentblock.acl #http_access deny torrentblock #acl yuck dstdomain .beeg.com #acl yuck dstdomain .youporn.com #acl yuck dstdomain .pornhub.com #http_access deny yuck #==== End Rules: Advertising ==== strip_query_terms off acl yutub url_regex -i .*youtube\.com\/.*$ acl yutub url_regex -i .*youtu\.be\/.*$ #logformat squid1 %{Referer}>h %ru #access_log /var/log/squid/yt.log squid1 yutub # ==== Custom Option REWRITE ==== 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 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|m3u8|ts)$ 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|iso)$ acl store_rewrite_list_path urlpath_regex \.(htm|html|mhtml|css|js)$ acl getmethod method GET #######################################################refresh pattern test######### #### steam #### refresh_pattern -i (valve[0-9]*|cdn.*)\.cs\.steampowered\.com\/([^\/]*\/[0-9]*)\/chunk\/([^\&\s]*)($|\?) 0 80% 10800 ignore-reload ignore-no-store ignore-auth reload-into-ims ######### refresh_pattern -i \.prodigy\.co\.id\/(root|\/microclient) 10080 90% 43500 override-expire ignore-reload ignore-no-store ignore-private ignore-auth ignore-must-revalidate store-stale refresh_pattern -i \.cdn\.ea\.com\/.*\.dat 10080 99% 259200 override-expire ignore-reload ignore-no-store ignore-private ignore-auth ignore-must-revalidate store-stale #refresh_pattern ^.*safebrowsing.*google 259200 99% 172800 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-store ignore-must-revalidate ignore-private ignore-auth refresh-ims store-stale #refresh_pattern -i \.wikimapia\.org\/? 10080 99% 43500 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-store ignore-must-revalidate ignore-private ignore-auth refresh-ims store-stale refresh_pattern -i \.avira-update.com\update\.*\.gz 4320 50% 8640 reload-into-ims ########## refresh_pattern ^http.*(youtube|googlevideo)\.* 5259487 99% 5259487 ignore-reload override-expire override-lastmod ignore-must-revalidate ignore-private ignore-no-store ignore-auth store-stale ########### #local hit refresh_pattern ^http://.*\.squid\.internal\/.* 10080 99% 79900 override-expire override-lastmod ignore-reload ignore-no-store ignore-must-revalidate reload-into-ims ignore-private ignore-auth store-stale #refresh_pattern ^http://video-srv.squid.internal/.* 10080 80% 79900 override-lastmod override-expire ignore-reload ignore-must-revalidate ignore-private ############# #Windows Update refresh_pattern -i microsoft.com/.*\.(cab|exe|ms[i|u|f]|[ap]sf|wm[v|a]|dat|zip) 4320 80% 43200 reload-into-ims refresh_pattern -i windowsupdate.com/.*\.(cab|exe|ms[i|u|f]|[ap]sf|wm[v|a]|dat|zip) 4320 80% 43200 reload-into-ims refresh_pattern -i windows.com/.*\.(cab|exe|ms[i|u|f]|[ap]sf|wm[v|a]|dat|zip) 4320 80% 43200 reload-into-ims refresh_pattern -i download.microsoft.com/.*.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims refresh_pattern -i update.microsoft.com/.*.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims refresh_pattern -i au.download.windowsupdate.com/.*.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims ########## # APPS APPLE refresh_pattern -i phobos\.apple\.com.*ipa 1440 99% 14400 override-expire override-lastmod ignore-no-cache ignore-private refresh_pattern -i apple\.com/.*?\.(pkg|dmg|tar|pkm|ipsw|exe)$ 10080 100% 172800 ignore-no-store ignore-reload ignore-private ############ refresh_pattern \.(akamaihd|edgecastcdn|spilcdn|zgncdn|(tw|y|yt)img)\.com.*\.(jp(e?g|e|2)|gif|png|swf||flv|mp(3|4)) 14400 99% 24400 ignore-no-cache override-expire override-lastmod ignore-reload ignore-private ########## refresh_pattern -i (eset\.com|eset\.rs)/.*?\.(cab|exe|dll|ms[iuf]|asf|wm[va]|dat|zip|ver|nup|rar)$ 10080 100% 172800 ignore-no-store ignore-reload ignore-private refresh_pattern -i ^http.*91\.228\.167\.21\/.*\.nup 1440 50% 1440 ignore-no-store ignore-reload reload-into-ims store-stale refresh_pattern -i avg\.com/.*?\.(cab|exe|dll|ms[iuf]|asf|wm[va]|dat|zip|ctf|bin|gz)$ 10080 100% 172800 ignore-no-store ignore-reload ignore-private refresh_pattern -i grisoft\.(com|cz|bin|ctf)/.*?\.(cab|exe|dll|ms[iuf]|asf|wm[va]|dat|zip|ctf|bin|gz)$ 10080 100% 172800 ignore-no-store ignore-reload ignore-private refresh_pattern -i avast\.com/.*?\.(cab|exe|dll|ms[iuf]|asf|wm[va]|dat|zip|vpx|vpu|vpa|vpaa|def|stamp)$ 10080 100% 172800 ignore-no-store ignore-reload ignore-private refresh_pattern -i (kaspersky-labs|kaspersky)\.com/.*?\.(cab|zip|exe|msi|msp|bz2|avc|kdc|klz|dif|dat|kdz|kdl|kfb)$ 10080 100% 172800 ignore-no-store ignore-reload ignore-private refresh_pattern -i nai\.com/.*?\.(gem|zip|mcs|tar|exe)$ 10080 100% 172800 ignore-no-store ignore-reload ignore-private refresh_pattern -i mcafee\.com/.*?\.(xdb|gem|cab)$ 10080 100% 172800 ignore-no-store ignore-reload ignore-private refresh_pattern -i bitdefender\.com/.*?\.(id|gz|gzip|dat)$ 10080 100% 172800 ignore-no-store ignore-reload ignore-private refresh_pattern -i adobe\.com/.*?\.(cab|aup|exe|msi|upd|msp)$ 10080 100% 172800 ignore-no-store ignore-reload ignore-private refresh_pattern -i symantecliveupdate\.com/.*?\.(zip|exe|msi)$ 10080 100% 172800 ignore-no-store ignore-reload ignore-private #---------------------------------------- #sensitif refresh_pattern ^http:\/\/.*\.(crossfire.web\.id|worldinayodance\.com)\/.*\.(ini|list|xml|txt)$ 0 0% 0 refresh_pattern ^http:\/\/patch\.gemscool\.com\/dz\/live\/DZPatch\/Patched_GameLoader\.exe 0 0% 0 refresh_pattern -i \.lytogame\.com\/.*\.(ini|inf)$ 0 0% 0 refresh_pattern -i ^http:\/\/202\.93\.20\.237\/rf2\/.*\.(lst|ini|inf)$ 0 0% 0 refresh_pattern -i ^http:\/\/.*\.winnerinter\.co\.id\/new_autopatch\/.*\.xml$ 0 0% 0 refresh_pattern -i ^http.*\.gemscool.com\/lsaga\/hackshield 0 0% 0 refresh_pattern -i ^http.*(hackshield|nprotect|webnProtect) 0 0% 0 refresh_pattern ^http:\/\/patch\.gemscool\.com\/lsaga 0 0% 0 refresh_pattern ^http:\/\/lostsaga-image\.gscdn\.com 0 0% 0 refresh_pattern -i ^http:\/\/.*\.(garenanow|starhub)\.com\/.*\.(dll|php|version|xml|js)$ 0 0% 0 refresh_pattern -i ^http:\/\/.*\.garenanow\.com\/.*\/(app|ui)$ 0 0% 0 refresh_pattern -i ^http:\/\/update3\.netmarble\.co\.id\/sf2\/.*\/.*\.(xml|jpg)\.dfg$ 0 0% 0 refresh_pattern -i \.reloadedtech.com\/.*\.(Xtp|dll|xt)$ 0 0% 0 refresh_pattern -i ^http.*(porn)$ 0 0% 0 refresh_pattern -i ^http.*(redtubefiles)$ 0 0% 0 refresh_pattern -i ^http.*(phncdn)$ 0 0% 0 refresh_pattern -i ^http.*(adsafeprotected)$ 0 0% 0 refresh_pattern -i ^http.*(addthis)$ 0 0% 0 refresh_pattern -i ^http.*(flash)$ 0 0% 0 refresh_pattern -i ^http.*(y8)$ 0 0% 0 refresh_pattern -i ^http.*(xvideos)$ 0 0% 0 refresh_pattern -i ^http.*(bet365)$ 0 0% 0 refresh_pattern -i ^http.*(swf)$ 0 0% 0 refresh_pattern -i ^http.*(edgefonts)$ 0 0% 0 refresh_pattern -i ^http.*(bet365)$ 0 0% 0 refresh_pattern -i ^http.*(merrjep)$ 0 0% 0 refresh_pattern -i ^http.*(ebay)$ 0 0% 0 refresh_pattern -i ^http.*(aliexpress)$ 0 0% 0 refresh_pattern -i ^http.*(contentabc)$ 0 0% 0 refresh_pattern -i ^http.*(ahcdn)$ 0 0% 0 refresh_pattern -i ^http.*(friv)$ 0 0% 0 refresh_pattern -i ^http.*(pornhub)$ 0 0% 0 refresh_pattern -i ^http.*(beeg)$ 0 0% 0 refresh_pattern -i ^http.*(xnxx)$ 0 0% 0 refresh_pattern -i ^http.*(redtube)$ 0 0% 0 refresh_pattern -i ^http.*(tube8)$ 0 0% 0 refresh_pattern -i \.(3gp|m3u8|ts|mp4|swf|flv) 10080 80% 10080 ignore-no-cache #---------------------------------------- #---------------------------------------- #file extensi refresh_pattern -i \.(gif|png|pnp|img|jpg|jpeg|jpeg2|ico|mod|bmp|eps|tif|tiff?|pcx|pic|tga|iff|sct|pxr|dcs|rle|lzw|ccit|f3d|woff) 10080 99% 40320 override-expire override-lastmod ignore-reload ignore-no-store ignore-must-revalidate ignore-private ignore-auth store-stale refresh_pattern -i \.(pps|ppsx|ps|rtx|wpl|doc|docx|pdf|xls|xlsx|latex|ppt|pptx|mbd|asm|psd|vck|xem|klz|ttf)$ 10080 80% 40320 override-expire override-lastmod ignore-reload ignore-no-store ignore-must-revalidate ignore-private ignore-auth store-stale refresh_pattern -i \.(mp4|m4v|3ivx|asf|avi|divx|ogv|webm|mpg|mpeg|ogg|wmv|mkv|3gp|swf|flv|x-flv|vob|swz|mov|midi)$ 10080 99% 40320 override-expire override-lastmod ignore-reload ignore-no-store ignore-must-revalidate ignore-private ignore-auth store-stale refresh_pattern -i \.(mp2|ac3|mpc|m4a|flac|aiff|aif|aifc|raw|au|mid|wav|wv|mp3|aac|wma|ra|ram|dss|msv|dvf|m4p|amr|awb|ape|apl)$ 10080 99% 40320 override-expire override-lastmod ignore-reload ignore-no-store ignore-must-revalidate ignore-private ignore-auth store-stale refresh_pattern -i \.(exe|dfg|crx|7z|mds|mdl|arj|bz2|ms-dos|ccd|sub|deb|cab|bin|nrg|mdf|zip|tar|jar|jxr|jad|tar.gz|msi|inc|lha|msu|rpm)$ 10080 99% 40320 override-expire override-lastmod ignore-reload ignore-no-store ignore-must-revalidate ignore-private ignore-auth store-stale refresh_pattern -i \.(rtp|wdp|stg|thor|rpz|comp|nar|nui|kom|pak|sup|nzp|pack|npz|tgz|vpx|avc|ref|msp|iso|rar|mar|pkg|gmf|apk|z)$ 10080 99% 40320 override-expire override-lastmod ignore-reload ignore-no-store ignore-must-revalidate ignore-private ignore-auth store-stale #---------------------------------------- refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 refresh_pattern (index|home|default)\.(html|htm|php3|php|aspx|asp|shtml|phtml|cfml|cfm|cgi) 0 0% 0 refresh_pattern \.(html|htm|php3|php|aspx|asp|shtml|phtml|cfml|cfm|jsp|cgi|asx|css|js|xml)$ 0 0% 0 refresh_pattern . 0 20% 4320 ###########################################################################e mbarova # Video Youtube acl dontrewrite url_regex redbot\.org (get_video|videoplayback\?id|videoplayback.*id).*begin\=[1-9][0-9]* refresh_pattern -i (youtube|google).*(videoplayback|liveplay) 1440 99% 14400 override-expire override-lastmod ignore-no-cache ignore-private reload-into-ims ignore-must-revalidate ignore-reload store-stale #KETU refresh_pattern ^http\:\/\/*\.facebook\.com\/ 10080 80% 43200 reload-into-ims refresh_pattern ^http\:\/\/*\.kaskus\.us\/ 10080 80% 43200 reload-into-ims refresh_pattern ^http\:\/\/*\.google\.co\*.*/ 10080 90% 43200 reload-into-ims refresh_pattern ^http\:\/\/*\.yahoo\.co*\.*/ 10080 90% 43200 reload-into-ims refresh_pattern ^http\:\/\/.*\.windowsupdate\.microsoft\.com\/ 10080 80% 43200 reload-into-ims refresh_pattern ^http\:\/\/office\.microsoft\.com\/ 10080 80% 43200 reload-into-ims refresh_pattern ^http\:\/\/windowsupdate\.microsoft\.com\/ 10080 80% 43200 reload-into-ims refresh_pattern ^http\:\/\/w?xpsp[0-9]\.microsoft\.com\/ 10080 80% 43200 reload-into-ims refresh_pattern ^http\:\/\/w2ksp[0-9]\.microsoft\.com\/ 10080 80% 43200 reload-into-ims refresh_pattern ^http\:\/\/download\.microsoft\.com\/ 10080 80% 43200 reload-into-ims refresh_pattern ^http\:\/\/download\.macromedia\.com\/ 10080 80% 43200 reload-into-ims refresh_pattern ^ftp\:\/\/ftp\.nai\.com/ 10080 80% 43200 reload-into-ims refresh_pattern ^http\:\/\/ftp\.software\.ibm\.com\/ 10080 80% 43200 reload-into-ims refresh_pattern ^http\:\/\/*\.google\.co\*.*/ 10080 90% 43200 reload-into-ims refresh_pattern ^http\:\/\/*\.yahoo\.co*\.*/ 10080 90% 43200 reload-into-ims refresh_pattern ^http://*.apps.facebook.*/.* 720 80% 4320 refresh_pattern ^http://*.profile.ak.fbcdn.net/.* 720 80% 4320 refresh_pattern ^http://*.creative.ak.fbcdn.net/.* 720 80% 4320 refresh_pattern ^http://*.static.ak.fbcdn.net/.* 720 80% 4320 refresh_pattern ^http://*.facebook.poker.zynga.com/.* 720 80% 4320 refresh_pattern ^http://*.statics.poker.static.zynga.com/.* 720 80% 4320 refresh_pattern ^http://*.zynga.*/.* 720 80% 4320 refresh_pattern ^http://*.texas_holdem.*/.* 720 80% 4320 refresh_pattern ^http://*.google.*/.* 720 80% 4320 refresh_pattern ^http://*.yandex.ru.*/.* 720 80% 4320 refresh_pattern ^http://*.4shared.*/.* 720 80% 4320 refresh_pattern ^http://*.yahoo.com/.* 720 80% 4320 refresh_pattern ^http://*.yimg.*/.* 720 80% 4320 refresh_pattern ^http://*.boleh.*/.* 720 80% 4320 refresh_pattern ^http://*.kompas.*/.* 180 80% 4320 refresh_pattern ^http://*.google-analytics.*/.* 720 80% 4320 refresh_pattern ^http://(.*?)/get_video\? 10080 90% 999999 override-expire ignore-no-cache ignore-private refresh_pattern ^http://(.*?)/videoplayback\? 10080 90% 999999 override-expire ignore-no-cache ignore-private refresh_pattern -i (get_video\?|videoplayback\?id|videoplayback.*id) 161280 50000% 525948 override-expire ignore-reload # compressed refresh_pattern -i \.gz$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.cab$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.bzip2$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.bz2$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.gz2$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.tgz$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.tar.gz$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.zip$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.rar$ 1008000 90% 99999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.tar$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.ace$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.7z$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload # documents refresh_pattern -i \.xls$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.doc$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.xlsx$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.docx$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.pdf$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.ppt$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.pptx$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.rtf\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload # multimedia refresh_pattern -i \.mid$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.wav$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.viv$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.mpg$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.mov$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.avi$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.asf$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.qt$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.rm$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.rmvb$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.mpeg$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.wmp$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.3gp$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.mp3$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.mp4$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload # web content refresh_pattern -i \.js$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.psf$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.html$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.htm$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.css$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.swf$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.js\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.css\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.xml$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload # images refresh_pattern -i \.gif$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.jpg$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.png$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.jpeg$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.bmp$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.psd$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.ad$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.gif\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.jpg\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.png\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.jpeg\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.psd\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload # application refresh_pattern -i \.deb$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.rpm$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.msi$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.exe$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.dmg$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload # misc refresh_pattern -i \.dat$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.qtm$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload # itunes refresh_pattern -i \.m4p$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload refresh_pattern -i \.mpa$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload # JUNK : O ~ refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern -i \.(avi|wav|mid|mp?|mpeg|mov|3gp|wm?|swf|flv|x-flv|css|js|axd)$ 10080 95% 302400 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth refresh_pattern -i \.(gif|png|jp?g|ico|bmp)$ 4320 95% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth refresh_pattern -i \.(rpm|cab|exe|msi|msu|zip|tar|gz|tgz|rar|bin|7z|doc|xls|ppt|pdf)$ 4320 90% 10080 override-expire override-lastmod reload-into-ims refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 refresh_pattern . 360 90% 302400 override-lastmod reload-into-ims ######################################################################## ## MORE REFRESH PATTERN SETTINGS (including video cache config too) ######################################################################## acl dontrewrite url_regex (get_video|video\?v=|videoplayback\?id|videoplayback.*id).*begin\=[1-9][0-9]* \.php\? \.asp\? \.aspx\? threadless.*\.jpg\?r= 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 \/(get_video\?|videodownload\?|videoplayback.*id|watch\?) acl store_rewrite_list urlpath_regex \.(3gp|mp(3|4)|flv|(m|f)4v|on2|fid|avi|mov|wm(a|v)|(mp(e?g|a|e|1|2))|mk(a|v)|jp(e?g|e|2)|gif|png|tiff?|bmp|tga|svg|ico|swf|exe|ms(i|u|p)|cab|psf|mar|bin|z(ip|[0-9]{2})|r(ar|[0-9]{2})|7z)\? acl store_rewrite_list_domain url_regex ^http:\/\/([a-zA-Z-]+[0-9-]+)\.[A-Za-z]*\.[A-Za-z]* 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} 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)$ acl store_rewrite_list_domain_CDN url_regex streamate.doublepimp.com.*\.js\? .fbcdn.net \.rapidshare\.com.*\/[0-9]*\/.*\/[^\/]* ^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*) \.doubleclick\.net.* yield$ acl store_rewrite_list_domain_CDN url_regex (cbk|mt|khm|mlt|tbn)[0-9]?.google\.co(m|\.uk|\.id) acl store_rewrite_list_domain_CDN url_regex ^http://(.*?)/windowsupdate\? acl store_rewrite_list_domain_CDN url_regex ^http://(.*?)/360totalsecurity\? acl store_rewrite_list_domain_CDN url_regex photos-[a-z].ak.fbcdn.net acl store_rewrite_list_domain_CDN url_regex ^http:\/\/([a-z])[0-9]?(\.gstatic\.com|\.wikimapia\.org) acl store_rewrite_list_domain_CDN url_regex ^http:\/\/download[0-9]{3}.avast.com/iavs5x/ acl store_rewrite_list_domain_CDN url_regex ^http:\/\/dnl-[0-9]{2}.geo.kaspersky.com acl store_rewrite_list_domain_CDN url_regex ^http:\/\/[1-4].bp.blogspot.com acl store_rewrite_list_domain url_regex ^http:\/\/([a-zA-Z-]+[0-9-]+)\.[A-Za-z]*\.[A-Za-z]* 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} acl store_rewrite_list_path urlpath_regex \.fid\?.*\&start= \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|psf|flv|avc|zip|mp3|3gp|rar|on2|mar|exe)$ acl store_rewrite_list_domain_CDN url_regex \.rapidshare\.com.*\/[0-9]*\/.*\/[^\/]* ^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*) \.doubleclick\.net.* acl store_rewrite_list_domain_CDN url_regex ^http:\/\/[.a-z0-9]*\.photobucket\.com.*\.[a-z]{3}$ quantserve\.com acl store_rewrite_list_domain_CDN url_regex ^http:\/\/[a-z]+[0-9]\.google\.co(m|\.id) acl store_rewrite_list_domain_CDN url_regex ^http:\/\/\.www[0-9][0-9]\.indowebster\.com\/(.*)(rar|zip|flv|wm(a|v)|3gp|psf|mp(4|3)|exe|msi|avi|(mp(e?g|a|e|1|2|3|4))|cab|exe) # Videos Config / jz acl videocache_allow_url url_regex -i \.googlevideo\.com\/videoplayback \.googlevideo\.com\/videoplay \.googlevideo\.com\/get_video\? acl videocache_allow_url url_regex -i \.google\.com\/videoplayback \.google\.com\/videoplay \.google\.com\/get_video\? acl videocache_allow_url url_regex -i \.google\.[a-z][a-z]\/videoplayback \.google\.[a-z][a-z]\/videoplay \.google\.[a-z][a-z]\/get_video\? acl videocache_allow_url url_regex -i proxy[a-z0-9\-][a-z0-9][a-z0-9][a-z0-9]?\.dailymotion\.com\/ acl videocache_allow_url url_regex -i \.vimeo\.com\/(.*)\.(flv|mp4|3gp|m4v|swf) acl videocache_allow_url url_regex -i va\.wrzuta\.pl\/wa[0-9][0-9][0-9][0-9]? acl videocache_allow_url url_regex -i \.youporn\.com\/(.*)\.(flv|mp4|3gp|m4v|swf) acl videocache_allow_url url_regex -i \.msn\.com\.edgesuite\.net\/(.*)\.flv acl videocache_allow_url url_regex -i \.tube8\.com\/(.*)\.(flv|mp4|3gp|m4v|swf) acl videocache_allow_url url_regex -i \.mais\.uol\.com\.br\/(.*)\.flv acl videocache_allow_url url_regex -i \.blip\.tv\/(.*)\.(flv|avi|mov|mp3|m4v|mp4|wmv|rm|ram|m4v) acl videocache_allow_url url_regex -i \.apniisp\.com\/(.*)\.(flv|avi|mov|mp3|m4v|mp4|wmv|rm|ram|m4v) acl videocache_allow_url url_regex -i \.break\.com\/(.*)\.(flv|mp4) acl videocache_allow_url url_regex -i redtube\.com\/(.*)\.(flv|mp4|3gp|m4v|swf) acl videocache_allow_url url_regex -i vid\.akm\.dailymotion\.com\/ acl videocache_allow_url url_regex -i [a-z0-9][0-9a-z][0-9a-z]?[0-9a-z]?[0-9a-z]?\.xtube\.com\/(.*)(flv|mp4|3gp|m4v|swf) acl videocache_allow_url url_regex -i bitcast\.vimeo\.com\/vimeo\/videos\/ acl videocache_allow_url url_regex -i va\.wrzuta\.pl\/wa[0-9][0-9][0-9][0-9]? acl videocache_allow_url url_regex -i \.files\.youporn\./(.*)\/(flv|3gp|m4v|swf)\/ acl videocache_allow_url url_regex -i \.msn\.com\.edgesuite\.net\/(.*)\.flv acl videocache_allow_url url_regex -i media[a-z0-9]?[a-z0-9]?[a-z0-9]?\.tube8\./ mobile[a-z0-9]?[a-z0-9]?[a-z0-9]?\.tube8\./ www\.tube8\.com\/(.*)\/ acl videocache_allow_url url_regex -i \.mais\.uol\.com\.br\/(.*)\.flv acl videocache_allow_url url_regex -i \.video[a-z0-9]?[a-z0-9]?\.blip\.tv\/(.*)\.(flv|avi|mov|mp3|m4v|mp4|wmv|rm|ram) acl videocache_allow_url url_regex -i video\.break\.com\/(.*)\.(flv|mp4) acl videocache_allow_url url_regex -i stream\.aol\.com\/(.*)/[a-zA-Z0-9]+\/(.*)\.(flv|mp4) acl videocache_allow_url url_regex -i videos\.5min\.com\/(.*)/[0-9_]+\.(mp4|flv) acl videocache_allow_url url_regex -i msn\.com\/(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i msn\.(.*)\.(com|net)\/(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i msnbc\.(.*)\.(com|net)\/(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i \.blip\.tv\/(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_deny_url url_regex -i \.blip\.tv\/(.*)filename acl videocache_allow_url url_regex -i \.break\.com\/(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i cdn\.turner\.com\/(.*)/(.*)\.(flv) acl videocache_allow_url url_regex -i \.dailymotion\.com\/video\/[a-z0-9]{5,9}_?(.*) acl videocache_allow_url url_regex -i proxy[a-z0-9\-]?[a-z0-9]?[a-z0-9]?[a-z0-9]?\.dailymotion\.com\/(.*)\.(flv|on2|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i vid\.akm\.dailymotion\.com\/(.*)\.(flv|on2|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i vid\.ec\.dmcdn\.net\/(.*)\.(flv|on2|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i video\.(.*)\.fbcdn\.net\/(.*)/[0-9_]+\.(mp4|flv|avi|mkv|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i \.mccont\.com\/ItemFiles\/(.*)?\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i (.*)\.myspacecdn\.com\/(.*)\/[a-zA-Z0-9]+\/vid\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i (.*)\.myspacecdn\.(.*)\.footprint\.net\/(.*)\/[a-zA-Z0-9]+\/vid\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i \.vimeo\.com\/(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i \.amazonaws\.com\/(.*)\.vimeo\.com(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i v\.imwx\.com\/v\/wxcom\/[a-zA-Z0-9]+\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg)\?(.*)videoId=[0-9]+& acl videocache_allow_url url_regex -i c\.wrzuta\.pl\/wv[0-9]+\/[a-z0-9]+/[0-9]+/ acl videocache_allow_url url_regex -i c\.wrzuta\.pl\/wa[0-9]+\/[a-z0-9]+ acl videocache_allow_url url_regex -i cdn[a-z0-9]?[a-z0-9]?[a-z0-9]?\.public\.extremetube\.phncdn\.com\/(.*)\/[a-zA-Z0-9_-]+\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i vs[a-z0-9]?[a-z0-9]?[a-z0-9]?\.hardsextube\.com\/(.*)\/(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i vs[a-z0-9]?[a-z0-9]?[a-z0-9]?\.yandex\.ru\/(.*)\/(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i cdn[a-z0-9]?[a-z0-9]?[a-z0-9]?\.public\.keezmovies\.phncdn\.com\/(.*)\/[0-9a-zA-Z_\-]+\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i cdn[a-z0-9]?[a-z0-9]?[a-z0-9]?\.xvideos\.com\/(.*)\/[0-9a-zA-Z_\-]+\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i cdn[a-z0-9]?[a-z0-9]?[a-z0-9]?\.public\.keezmovies\.com\/(.*)\/[0-9a-zA-Z_\-]+\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i nyc-v[a-z0-9]?[a-z0-9]?[a-z0-9]?\.pornhub\.com\/(.*)/videos/[0-9]{3}/[0-9]{3}/[0-9]{3}/[0-9]+\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i nyc-v[a-z0-9]?[a-z0-9]?[a-z0-9]?\.redtube\.com\/(.*)/videos/[0-9]{3}/[0-9]{3}/[0-9]{3}/[0-9]+\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i nyc-v[a-z0-9]?[a-z0-9]?[a-z0-9]?\.xnxx\.com\/(.*)/videos/[0-9]{3}/[0-9]{3}/[0-9]{3}/[0-9]+\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i \.video\.pornhub\.phncdn\.com\/videos/(.*)/[0-9]+\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i \.xnxx\./(.*)/[0-9]+\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i video(.*)\.redtubefiles\./(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i \.slutload-media\.com\/(.*)\/[a-zA-Z0-9_.-]+\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i cdn[a-z0-9]?[a-z0-9]?[a-z0-9]?\.public\.spankwire\.com\/(.*)\/(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i cdn[a-z0-9]?[a-z0-9]?[a-z0-9]?\.public\.spankwire\.phncdn\.com\/(.*)\/(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i \.tube8\.com\/(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i \.xtube\.com\/(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i \.xvideos\/(.*)\/[a-zA-Z0-9_-]+\/(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i \.youporn\/(.*)\/[a-zA-Z0-9_-]+\/(.*)\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_dom dstdomain .mccont.com .metacafe.com .redtube.com .dailymotion.com .fbcdn.net acl videocache_allow_dom dstdomain .download.youporn.com .static.blip.tv acl dontrewrite url_regex redbot\.org (get_video|videoplayback\?id|videoplayback.*id).*begin\=[1-9][0-9]* acl videocache_allow_url url_regex -i cdn[a-z0-9]?[a-z0-9]?[a-z0-9]?\.phncdn\./(.*)\/[0-9a-zA-Z_\-]+\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i cdn[a-z0-9]?[a-z0-9]?[a-z0-9]?\.contentabc\./(.*)\/[0-9a-zA-Z_\-]+\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) acl videocache_allow_url url_regex -i cdn[a-z0-9]?[a-z0-9]?[a-z0-9]?\.porn\./(.*)\/[0-9a-zA-Z_\-]+\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg) #=========================================================================== refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern ^ftp: 10080 95% 10080 override-lastmod reload-into-ims refresh_pattern . 0 20% 10080 override-lastmod reload-into-ims http_access allow manager localhost http_access deny manager http_access allow purge localhost http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access allow localnet http_access deny all icp_access allow localnet icp_access deny all icp_port 0 buffered_logs on 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 forwarded_for off 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 shutdown_lifetime 10 seconds snmp_port 3401 snmp_access allow snmppublic all dns_timeout 1 minutes dns_nameservers 192.168.7.2 fqdncache_size 16384 #16384#ishte 5000 u nderrua ne 21 shtator ipcache_size 16384 #16384#ishte 5000 u nderrua ne 21 shtator ipcache_low 98 ipcache_high 99 log_fqdn off log_icp_queries off memory_pools off maximum_single_addr_tries 2 retry_on_error on icp_hit_stale on strip_query_terms off query_icmp on reload_into_ims on emulate_httpd_log off negative_ttl 0 seconds pipeline_prefetch on vary_ignore_expire on half_closed_clients off high_page_fault_warning 2 nonhierarchical_direct on prefer_direct off cache_mgr Tnet cache_effective_user proxy cache_effective_group proxy visible_hostname tnet@info.al unique_hostname Tnet cachemgr_passwd none all client_db on max_filedesc 65536 # ZPH config Marking Cache Hit, so cached contents can be delivered at full lan speed via MT zph_mode tos zph_local 0x30 zph_parent 0 zph_option 136 storeurl_access deny !getmethod #this is not related to youtube video its only for CDN pictures storeurl_access allow store_rewrite_list_web storeurl_access allow store_rewrite_list storeurl_access allow videocache_allow_url storeurl_access allow store_rewrite_list_domain_CDN storeurl_access allow store_rewrite_list_path #Speedtest acl speedtest_allow_url url_regex -i \.speedtest\/ acl speedtest_allow_url url_regex ^http:\/\/speedtest\.* acl speedtest_allow_url url_regex speedtest acl speedtest_allow_dom dstdomain .speedtest.net storeurl_access allow speedtest_allow_url storeurl_access allow speedtest_allow_dom #storeurl_access deny all storeurl_access allow yutub storeurl_access allow all storeurl_rewrite_program /etc/squid/storeurl.pl storeurl_rewrite_children 15 storeurl_rewrite_concurrency 999
storeurl.pl
#!/usr/bin/perl use IO::File; $|=1; STDOUT->autoflush(1); $debug=1; ## recommended:0 $bypassallrules=0; ## recommended:0 $sucks=""; ## unused $sucks="sucks" if ($debug>=1); $timenow=""; $printtimenow=1; ## print timenow: 0|1 my $logfile = '/tmp/storeurl.log'; open my $logfh, '>>', $logfile or die "Couldn't open $logfile for appending: $!\n" if $debug; $logfh->autoflush(1) if $debug; #### main while (<>) { $timenow=time()." " if ($printtimenow); print $logfh "$timenow"."in : $_" if ($debug>=1); chop; ## strip eol @X = split; $x = $X[0]; ## 0 $u = $X[1]; ## url $_ = $u; ## url if ($bypassallrules){ print $x . "$u"; ## map 1:1 } elsif ($X[1] =~ m/^http\:\/\/.*\/speedtest\/([a-zA-Z0-9\-\_\.\%]*\.(jpg|txt|png|swf|gif|php))\?.*/) { print $x . "storeurl://testspeed.SQUIDINTERNAL/" . $1 . "\n"; } elsif ($X[1] =~ m/^http\:\/\/.*\/speedtest\/([a-zA-Z0-9\-\_\.\%]*\.(jpg|txt|png|swf|gif|php))\?.*/) { print $x . "storeurl://testspeed.SQUIDINTERNAL/" . $2 . "\n"; } elsif ($X[1] =~ m/^http\:\/\/.*\/speedtest\/([a-zA-Z0-9\-\_\.\%]*\.(jpg|txt|png|swf|gif|php))\?.*/) { print $x . "storeurl://testspeed.SQUIDINTERNAL/" . $3 . "\n"; #mediafire }elsif (m/^http:\/\/199\.91\.15\d\.\d*\/\w{12}\/(\w*)\/(.*)/) { print $x . "http://www.mediafire.com.SQUIDINTERNAL/" . $1 ."/" . $2 . ""; #fileserve }elsif (m/^http:\/\/fs\w*\.fileserve\.com\/file\/(\w*)\/[\w-]*\.\/(.*)/) { print $x . "http://www.fileserve.com.SQUIDINTERNAL/" . $1 . "./" . $2 . ""; #filesonic }elsif (m/^http:\/\/s[0-9]*\.filesonic\.com\/download\/([0-9]*)\/(.*)/) { print $x . "http://www.filesonic.com.SQUIDINTERNAL/" . $1 . ""; #4shared }elsif (m/^http:\/\/[a-zA-Z]{2}\d*\.4shared\.com(:8080|)\/download\/(.*)\/(.*\..*)\?.*/) { print $x . "http://www.4shared.com.SQUIDINTERNAL/download/$2\/$3"; #4shared preview }elsif (m/^http:\/\/[a-zA-Z]{2}\d*\.4shared\.com(:8080|)\/img\/(\d*)\/\w*\/dlink__2Fdownload_2F(\w*)_3Ftsid_3D[\w-]*\/preview\.mp3\?sId=\w*/) { print $x . "http://www.4shared.com.SQUIDINTERNAL/$2"; #photos-X.ak.fbcdn.net where X a-z }elsif (m/^http:\/\/photos-[a-z](\.ak\.fbcdn\.net)(\/.*\/)(.*\.jpg)/) { print $x . "http://photos" . $1 . "/" . $2 . $3 . ""; #YX.sphotos.ak.fbcdn.net where X 1-9, Y a-z } elsif (m/^http:\/\/[a-z][0-9]\.sphotos\.ak\.fbcdn\.net\/(.*)\/(.*)/) { print $x . "http://photos.ak.fbcdn.net/" . $1 ."/". $2 . ""; #maps.google.com } elsif (m/^http:\/\/(cbk|mt|khm|mlt|tbn)[0-9]?(.google\.co(m|\.uk|\.id).*)/) { print $x . "http://" . $1 . $2 . ""; #Cache High Latency Ads } elsif (m/^http:\/\/([a-z0-9.]*)(\.doubleclick\.net|\.quantserve\.com|\.googlesyndication\.com|yieldmanager|cpxinteractive)(.*)/) { $y = $3;$z = $2; for ($y) { s/pixel;.*/pixel/; s/activity;.*/activity/; s/(imgad[^&]*).*/\1/; s/;ord=[?0-9]*//; s/;×tamp=[0-9]*//; s/[&?]correlator=[0-9]*//; s/&cookie=[^&]*//; s/&ga_hid=[^&]*//; s/&ga_vid=[^&]*//; s/&ga_sid=[^&]*//; # s/&prev_slotnames=[^&]*// # s/&u_his=[^&]*//; s/&dt=[^&]*//; s/&dtd=[^&]*//; s/&lmt=[^&]*//; s/(&alternate_ad_url=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/; s/(&url=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/; s/(&ref=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/; s/(&cookie=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/; s/[;&?]ord=[?0-9]*//; s/[;&]mpvid=[^&;]*//; s/&xpc=[^&]*//; # yieldmanager s/\?clickTag=[^&]*//; s/&u=[^&]*//; s/&slotname=[^&]*//; s/&page_slots=[^&]*//; } print $x . "http://" . $1 . $2 . $y . ""; #cache high latency ads } elsif (m/^http:\/\/(.*?)\/(ads)\?(.*?)/) { print $x . "http://" . $1 . "/" . $2 . ""; # spicific servers starts here.... } elsif (m/^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*?)/) { print $x . "http://" . $1 . ""; #cdn, varialble 1st path } elsif (($u =~ /filehippo/) && (m/^http:\/\/(.*?)\.(.*?)\/(.*?)\/(.*)\.([a-z0-9]{3,4})(\?.*)?/)) { @y = ($1,$2,$4,$5); $y[0] =~ s/[a-z0-9]{2,5}/cdn./; print $x . "http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . ""; #rapidshare } elsif (($u =~ /rapidshare/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?)([a-z]*\.[^\/]{3}\/[a-z]*\/[0-9]*)\/(.*?)\/([^\/\?\&]{4,})$/)) { print $x . "http://cdn." . $3 . "/SQUIDINTERNAL/" . $5 . ""; # spicific extention } elsif (m/^http:\/\/(.*?)\.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|exe|msi|swf|apk).*?/) { @y = ($1,$2); $y[0] =~ s/((cache|cdn)[-\d]*)|([a-zA-A]+-?[0-9]+(-[a-zA-Z]*)?)/cdn/; print $x . "http://" . $y[0] . "." . $y[1] . "\n"; #VK } elsif ($x =~ m/^http:\/\/(jpg|jpeg|mp3|mp4|flv)[0-9]?(.vk\.co(m|\.me).*)/) { $out="http://" . $1 . $2 ; # PORN Movies # ========================================================================== } elsif ($X[1] =~ m/^http:\/\/.*\.xvideos\.com\/.*\/([\w\d\-\.\%]*\.(3gp|mpg|flv|mp4|m3u8|ts))\?.*/){ print $x . "http://SQUIDINTERNAL/" . $1 . $2 . "\n"; } elsif ($X[1] =~ m/^http:\/\/.*\.videos\/.*\/([\w\d\-\.\%]*\.(3gp|mpg|flv|mp4|m3u8|ts))\?.*/){ print $x . "http://SQUIDINTERNAL/" . $1 . $2 . "\n"; } elsif ($X[1] =~ m/^http:\/\/.*\.xvideos\.com\/.*\/([\w\d\-\.\%]*\.(3gp|mpg|flv|mp4|m3u8|ts))\?.*/){ print $x . "http://SQUIDINTERNAL/" . $4 . $6 . "\n"; } elsif ($X[1] =~ m/^http:\/\/.*\.beeg\.com\/.*\/([\w\d\-\.\%]*\.(3gp|mpg|flv|mp4|m3u8|ts))\?.*/){ print $x . "http://SQUIDINTERNAL/" . $1 . $2 . "\n"; } elsif ($X[1] =~ m/^http:\/\/.*\.redtube\.com\/.*\/([\w\d\-\.\%]*\.(3gp|mpg|flv|mp4|m3u8|ts))\?.*/){ print $x . "http://SQUIDINTERNAL/" . $1 . $2 . "\n"; } elsif ($X[1] =~ m/^http:\/\/[\d]+\.[\d]+\.[\d]+\.[\d]+\/.*\/xh.*\/([\w\d\-\.\%]*\.flv)/){ print $x . "http://SQUIDINTERNAL/" . $1 . $2 . "\n"; } elsif ($X[1] =~ m/^http:\/\/[\d]+\.[\d]+\.[\d]+\.[\d]+.*\/([\w\d\-\.\%]*\.(3gp|mpg|flv|mp4|m3u8|ts))\?start=0/){ print $x . "http://SQUIDINTERNAL/" . $1 . $2 . "\n"; } elsif ($X[1] =~ m/^http:\/\/.*\.youjizz\.com.*\/([\w\d\-\.\%]*\.(mp4|flv|3gp))\?.*/){ print $x . "http://SQUIDINTERNAL/" . $1 . $2 . "\n"; } elsif ($X[1] =~ m/^http:\/\/[\w\d\-\.\%]*\.keezmovies[\w\d\-\.\%]*\.com.*\/([\w\d\-\.\%]*\.(mp4|flv|3gp|mpg|wmv))\?.*/){ print $x . "http://SQUIDINTERNAL/" . $1 . $2 . "\n"; } elsif ($X[1] =~ m/^http:\/\/[\w\d\-\.\%]*\.mystreamservice[\w\d\-\.\%]*\.com.*\/([\w\d\-\.\%]*\.(mp4|flv|3gp|mpg|wmv))\?.*/){ print $x . "http://SQUIDINTERNAL/" . $1 . $2 . "\n"; } elsif ($X[1] =~ m/^http:\/\/[\w\d\-\.\%]*\.tube8[\w\d\-\.\%]*\.com.*\/([\w\d\-\.\%]*\.(mp4|flv|3gp|mpg|wmv))\?.*/) { print $x . "http://SQUIDINTERNAL/" . $1 . $2 . "\n"; } elsif ($X[1] =~ m/^http:\/\/[\w\d\-\.\%]*\.youporn[\w\d\-\.\%]*\.com.*\/([\w\d\-\.\%]*\.(mp4|flv|3gp|mpg|wmv))\?.*/){ print $x . "http://SQUIDINTERNAL/" . $1 . $2 . "\n"; } elsif ($X[1] =~ m/^http:\/\/[\w\d\-\.\%]*\.spankwire[\w\d\-\.\%]*\.com.*\/([\w\d\-\.\%]*\.(mp4|flv|3gp|mpg|wmv))\?.*/) { print $x . "http://SQUIDINTERNAL/" . $1 . $2 . "\n"; } elsif ($X[1] =~ m/^http:\/\/[\w\d\-\.\%]*\.pornhub[\w\d\-\.\%]*\.com.*\/([[\w\d\-\.\%]*\.(mp4|flv|3gp|mpg|wmv))\?.*/){ print $x . "http://SQUIDINTERNAL/" . $1 . $2 . "\n"; } elsif ($X[1] =~ m/^http:\/\/[\w\d\-\_\.\%\/]*.*\/([\w\d\-\_\.]+\.(flv|mp3|mp4|3gp|wmv))\?.*cdn\_hash.*/){ print $x . "http://SQUIDINTERNAL/" . $1 . $2 . "\n"; } elsif (($X[1] =~ /maxporn/) && (m/^http:\/\/([^\/]*?)\/(.*?)\/([^\/]*?)(\?.*)?$/)) { print $x . "http://SQUIDINTERNAL/" . $1 . "/SQUIDINTERNAL/" . $3 . "\n"; #ktu ktu ktu } elsif (($u =~ /tube8|xvideos|pornotube|mystremservice|xnxx|redtube|gfrevenge|povd|fuckingglasses|naughtyamerica|milfhunter|8thstreetlatinas|iknowthatgirl|cumfiesta|massagegirls18|bangbros18|lustcinema|teenslikeitbig|cumlouder|assparade|milfsugarbabes|exploitedcollegegirls|daredorm|letstryanal|tonightsgirlfriend|filthyandfisting|bangmystepmom|bigtitcreampie|milfhunter|naughtyamericans|wowgirls|culioneros|happytugs|eurosexparties|teenslovehugecocks|publicinvasion|eroticax|fakeagent|backroomcastingcouch|castingcouch-x|girlsdoporn|mikesapartment|bigmouthfuls|vk.com|vk.me/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?(\.[a-z]*)?)\.([a-z]*[0-9]?\.[^\/]{3}\/[a-z]*)(.*?)((\/[a-z]*)?(\/[^\/]*){4}\.[^\/\?]{3,4})(\?.*)?$/)) { print $x . "http://cdn." . $4 . $6 . "\n"; #for yimg.com video } elsif (m/^http:\/\/(.*yimg.com)\/\/(.*)\/([^\/\?\&]*\/[^\/\?\&]*\.[^\/\?\&]{3,4})(\?.*)?$/) { print $x . "http://cdn.yimg.com//" . $3 . ""; #for yimg.com doubled } elsif (m/^http:\/\/(.*?)\.yimg\.com\/(.*?)\.yimg\.com\/(.*?)\?(.*)/) { print $x . "http://cdn.yimg.com/" . $3 . ""; #for yimg.com with &sig= } elsif (m/^http:\/\/(.*?)\.yimg\.com\/(.*)/) { @y = ($1,$2); $y[0] =~ s/[a-z]+[0-9]+/cdn/; $y[1] =~ s/&sig=.*//; print $x . "http://" . $y[0] . ".yimg.com/" . $y[1] . ""; #general purpose for cdn servers. add above your specific servers. } elsif (m/^http:\/\/([0-9.]*?)\/\/(.*?)\.(.*)\?(.*?)/) { print $x . "http://squid-cdn-url//" . $2 . "." . $3 . ""; #generic http://variable.domain.com/path/filename."ex" "ext" or "exte" with or withour "? or %" } elsif (m/^http:\/\/(.*)(\.[^\.\-]*?\..*?)\/(.*)\.([^\/\?\&]{2,4})((\?|\%).*)?$/) { @y = ($1,$2,$3,$4); $y[0] =~ s/(([a-zA-Z]+[0-9]+(-[a-zA-Z])?$)|(.*cdn.*)|(.*cache.*))/cdn/; print $x . "http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . ""; } else { print $x . "$u"; ##$X[2]="$sucks"; } print $logfh "$timenow"."out: $x $out $X[2] $X[3] $X[4] $X[5] $X[6] $X[7]\n" if ($debug>=1); print "$x $out $X[2] $X[3] $X[4] $X[5] $X[6] $X[7]\n"; } close $logfh if ($debug);
No comments:
Post a Comment