(ASK) Mohon Koreksi Konfigurasi SQUID 3.X

Diskusi tentang Ubuntu Server baik webserver, database server, samba server dan service lainnya serta jaringan menggunakan Sistem Operasi Ubuntu.
User avatar
snowflake
Posts: 15
Joined: 22 Mar 2015, 18:18

(ASK) Mohon Koreksi Konfigurasi SQUID 3.X

Postby snowflake » 11 Apr 2015, 01:05

Permasalahan yang sedang saya alami



Squid.conf
Tampilkan
#
# Recommended minimum configuration:
#

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 192.168.2.0/24 # Sesuaikan dengan ip client/local

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 StoreID
# —————————————————————————–
acl norewrite url_regex -i redbot\.org (get_video|videoplayback\?id|videoplayback.*id).*begin\=[1-9][0-9]*
acl norewrite url_regex -i s\-platform\.ak\.fbcdn\.net
acl norewrite url_regex redirector\.c\.android\.clients\.google\.com

acl norewrite url_regex -i redbot\.org (get_video|videoplayback\?id|videoplayback.*id).*begin\=[1-9][0-9]*
acl norewrite url_regex -i s\-platform\.ak\.fbcdn\.net
acl norewrite url_regex redirector\.c\.android\.clients\.google\.com
acl storeid-helper url_regex -i ^http:\/\/(videos|photos).*\.ak\.instagram\.com\/hphotos.*
acl storeid-helper url_regex -i youtube.*(ptracking|stream_204|player_204|gen_204).*(video_id|docid|v)\=.*
acl storeid-helper url_regex -i ^https?:\/\/.*(youtube|google).*(videoplayback|liveplay).*
acl storeid-helper url_regex -i ^https?:\/\/.*\.steampowered\.com\/depot\/[0-9]+\/chunk\/([^\?]*)
acl storeid-helper url_regex -i ^https?:\/\/.*(akamaihd|fbcdn)\.net\/.*
acl storeid-helper url_regex -i ^https?:\/\/.*\.google\.com\/chrome\/win\/.+\/(.*\.exe)
acl storeid-helper url_regex -i ^https?:\/\/.*\.ytimg\.com(.*\.(webp|jpg|gif))
acl storeid-helper url_regex -i ^https?:\/\/.*firedrive\.com\/download\/[0-9]+\/[0-9]+\/.*\?h=.*e\=.*f\=(.*)\&.*
acl storeid-helper url_regex -i ^https?:\/\/.*\.4shared\.com\/.*\/dlink__[23]F([\w]+)_[23]F(.*)\_3Ftsid_[\w].*
acl storeid-helper url_regex -i ^https?:\/\/.*\.4shared\.com\/download\/([^\/]*).*
acl storeid-helper url_regex -i ^https?:\/\/.*\.[a-z]+\.bing\.net\/(.*)\&w=.*
acl storeid-helper url_regex -i ^https?:\/\/.*\.bing\.(net|com)\/.*\?id=([a-zA-Z]\.[0-9]+)&pid=.*
acl storeid-helper url_regex -i ^https?:\/\/.*\.gstatic\.com\/images\?q=tbn\:(.*)
acl storeid-helper url_regex -i ^https?:\/\/.*\.reverbnation\.com\/.*\/(ec_stream_song|download_song_direct|stream_song)\/([0-9]*).*
acl storeid-helper url_regex -i ^https?:\/\/.*\.dl\.sourceforge\.net\/(.*\.(exe|zip|mp3|mp4))
acl storeid-helper url_regex -i ^https?:\/\/fs[0-9]+\.filehippo\.com\/[^\/]*\/[^\/]*\/(.*)
acl storeid-helper url_regex -i ^https?:\/\/download[0-9]+.mediafire\.com\/.*\/\w+\/(.*)
acl storeid-helper url_regex -i ^https?:\/\/.*android\.clients\.google\.com\/[a-z]+\/[a-zA-Z]+\/[a-zA-Z]+\/(.*)\/([0-9]+)\?.*
acl storeid-helper url_regex -i ^https?:\/\/.*(googleusercontent.com|blogspot.com)\/(.*)\/([a-z0-9]+)(-[a-z]-[a-z]-[a-z]+)?\/(.*\.(jpg|png))
acl storeid-helper url_regex -i ^https?:\/\/global-shared-files-[a-z][0-9]\.softonic\.com\/.{3}\/.{3}\/.*\/.*\=(.*\.exe)
acl storeid-helper url_regex -i ^https?:\/\/.*netmarble\.co\.id\/.*\/(data|ModooMarble)\/(.*)
acl storeid-helper url_regex -i ^https?:\/\/(.*)\.windowsupdate\.com\/(.*)\/(.*)\/([a-z].*)
acl storeid-helper url_regex -i ^https?:\/\/.*filetrip\.net\/.*\/((.*)\.([^\/\?\&]{2,4}))\?.*$
acl storeid-helper url_regex -i ^https?:\/\/.*get4mobile\.net\/.*f=([^\/\?\&]*).*$
acl storeid-helper url_regex -i ^https?:\/\/.*thestaticvube\.com\/.*\/(.*)
acl storeid-helper url_regex -i ^https?:\/\/113\.6\.235\.171\/youku\/.*\/(.*\.flv)
acl storeid-helper url_regex -i ^https?:\/\/\d+\.\d+\.\d+\.\d+\/drama\/(.*\.mp4)\?.*\=(\d+)
acl storeid-helper url_regex -i ^https?:\/\/([a-z])[\d]{1,2}?(.gstatic\.com.*|\.wikimapia\.org.*)
acl storeid-helper url_regex -i ^https?:\/\/.*\.[a-z][0-9]\.(tiles\.virtualearth\.net)\/(.*\&n=z)
acl storeid-helper url_regex -i ^https?:\/\/imgv2-[0-9]\.scribdassets\.com\/(.*)
acl storeid-helper url_regex -i ^https?:\/\/(.*?)\/(archlinux\/[a-zA-Z].*\/os\/.*)
acl storeid-helper url_regex -i ^https?:\/\/(.*?)\/speedtest\/(.*\.(jpg|txt))\??.*$
acl storeid-helper url_regex -i ^https?:\/\/i[1-9]{3}\.photobucket\.com\/(.*)
acl storeid-helper url_regex -i ^https?:\/\/i[1-9]{4}\.photobucket\.com\/(.*)
acl storeid-helper url_regex -i ^https?:\/\/avideos\.5min\.com\/.*\/(.*)\?.*
acl storeid-helper url_regex -i ^https?:\/\/.*\.catalog\.video\.msn\.com\/.*\/(.*\.(mp4|flv|m4v))
acl storeid-helper url_regex -i ^https?:\/\/v\.imwx\.com\/.*\/(.*)\?.*
acl storeid-helper url_regex -i ^https?:\/\/video[0-9]\.break\.com\/.*\/(.*)\?.*
acl storeid-helper url_regex -i ^https?:\/\/.*\.video[0-9]\.blip\.tv\/.*\/(.*)\?.*
acl storeid-helper url_regex -i ^https?:\/\/ss[0-9]\.vidivodo\.com\/vidivodo\/vidservers\/server[0-9]*\/videos\/.*\/([a-zA-Z0-9.]*)\?.*
acl storeid-helper url_regex -i ^https?:\/\/video\-http\.media\-imdb\.com\/([a-zA-Z0-9\@\_\-]+\.(mp4|flv|m4v))\?.*
acl storeid-helper url_regex -i ^https?:\/\/(vl|v)\.mccont\.com\/(.*)\/(.*\.(mp4|m4v|flv))\?.*
acl storeid-helper url_regex -i ^https?:\/\/(vid.{0,2}|proxy.*)(\.ak|\.ec|\.akm|)\.(dmcdn\.net|dailymotion\.com)\/.*\/(frag.*\.(flv|mp4|m4v)).*
acl storeid-helper url_regex -i ^https?:\/\/[a-zA-Z0-9\-\_\.\%]*\.vimeo[a-zA-Z0-9\-\_\.\%]*\.com.*\/([[a-zA-Z0-9\-\_\.\%]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg|web))\?.*
acl storeid-helper url_regex -i ^https?:\/\/fcache\.veoh\.com\/.*\/.*(l[0-9]*\.(mp4|flv))\?.*
acl storeid-helper url_regex -i ^https?:\/\/video\.thestaticvube\.com\/.*\/(.*)
acl storeid-helper url_regex -i ^https?:\/\/cdn[0-9]\.videos\.videobash\.com\/.*\/(.*\.(mp4|m4v|flv))\?.*
acl storeid-helper url_regex -i ^https?:\/\/[a-zA-Z0-9\-\_\.\%]*\.phncdn[a-zA-Z0-9\-\_\.\%]*\.com.*\/([[a-zA-Z0-9\-\_\.\%]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*
acl storeid-helper url_regex -i ^https?:\/\/.*\.xvideos\.com\/.*\/([a-zA-Z0-9\-\_\.\%]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*
acl storeid-helper url_regex -i ^https?:\/\/[a-zA-Z0-9\-\_\.\%]*\.tube8[a-zA-Z0-9\-\_\.\%]*\.com.*\/([a-zA-Z0-9\-\_\.\%]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*
acl storeid-helper url_regex -i ^https?:\/\/.*\.(redtube|redtubefiles)\.com\/.*\/([a-zA-Z0-9\-\_\.\%]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*
acl storeid-helper url_regex -i ^https?:\/\/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\/.*\/xh.*\/([a-zA-Z0-9\-\_\.\%]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))
acl storeid-helper url_regex -i ^https?:\/\/[a-zA-Z0-9\-\_\.\%]*\.xhcdn[a-zA-Z0-9\-\_\.\%]*\.com.*\/([a-zA-Z0-9\-\_\.\%]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*
acl storeid-helper url_regex -i ^https?:\/\/[a-zA-Z0-9\-\_\.\%]*\.nsimg[a-zA-Z0-9\-\_\.\%]*\.net.*\/([a-zA-Z0-9\-\_\.\%]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*
acl storeid-helper url_regex -i ^https?:\/\/.*\.youjizz\.com.*\/([a-zA-Z0-9\-\_\.\%]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*
acl storeid-helper url_regex -i ^https?:\/\/[a-zA-Z0-9\-\_\.\%]*\.public\.keezmovies[a-zA-Z0-9\-\_\.\%]*\.com.*\/([a-zA-Z0-9\-\_\.\%]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*
acl storeid-helper url_regex -i ^https?:\/\/[a-zA-Z0-9\-\_\.\%]*\.youporn[a-zA-Z0-9\-\_\.\%]*\.com.*\/([a-zA-Z0-9\-\_\.\%]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*
acl storeid-helper url_regex -i ^https?:\/\/[a-zA-Z0-9\-\_\.\%]*\.spankwire[a-zA-Z0-9\-\_\.\%]*\.com.*\/([a-zA-Z0-9\-\_\.\%]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*
acl storeid-helper url_regex -i ^https?:\/\/[a-zA-Z0-9\-\_\.\%]*\.pornhub[a-zA-Z0-9\-\_\.\%]*\.com.*\/([[a-zA-Z0-9\-\_\.\%]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*
acl storeid-helper url_regex -i ^https?:\/\/[a-zA-Z0-9\-\_\.\%]*\.us.playvid[a-zA-Z0-9\-\_\.\%]*\.com.*\/([[a-zA-Z0-9\-\_\.\%]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*
acl storeid-helper url_regex -i ^https?:\/\/[a-zA-Z0-9\-\_\.\%]*\.slutload-media[a-zA-Z0-9\-\_\.\%]*\.com.*\/([[a-zA-Z0-9\-\_\.\%]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*
acl storeid-helper url_regex -i ^https?:\/\/[a-zA-Z0-9\-\_\.\%]*\.hardsextube[a-zA-Z0-9\-\_\.\%]*\.com.*\/([[a-zA-Z0-9\-\_\.\%]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*
acl storeid-helper url_regex -i ^https?:\/\/[a-zA-Z0-9\-\_\.\%]*\.public\.extremetube[a-zA-Z0-9\-\_\.\%]*\.com.*\/([[a-zA-Z0-9\-\_\.\%]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*
acl storeid-helper url_regex -i ^https?:\/\/([a-z0-9.]*)(\.doubleclick\.net|\.quantserve\.com|.exoclick\.com|interclick.\com|\.googlesyndication\.com|\.auditude\.com|.visiblemeasures\.com|yieldmanager|cpxinteractive)(.*)
acl storeid-helper url_regex -i ^https?:\/\/(.*?)\/(ads)\?(.*?)
acl storeid-helper url_regex -i ^https?:\/\/[a-zA-Z0-9\-\_\.\%]*phobos\.apple\.com\/.*\/([a-zA-Z0-9\-\_\.\%]*\.ipa)
acl storeid-helper url_regex -i ^https?:\/\/fs\w*\.fileserve\.com\/file\/(\w*)\/[\w-]*\.\/(.*)
acl storeid-helper url_regex -i ^https?:\/\/s[0-9]*\.filesonic\.com\/download\/([0-9]*)\/(.*)
acl storeid-helper url_regex -i ^https?:\/\/download[0-9]{3}\.avast\.com\/(.*)
acl storeid-helper url_regex -i ^https?:\/\/[a-zA-Z0-9]+\.[a-zA-Z0-9]+x\.[a-z]\.avast\.com\/[a-zA-Z0-9]+x\/(.*\.vpx)
acl storeid-helper url_regex -i ^https?:\/\/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\/(iavs.*)
acl storeid-helper url_regex -i ^https?:\/\/.*\.starhub\.com\/[a-z]+\/[a-z]+\/[a-z]+\/(.*exe)\?[0-9]
acl storeid-helper url_regex -i ^https?:\/\/dnl-[0-9]{2}\.geo\.kaspersky\.com\/(.*)
acl storeid-helper url_regex -i ^https?:\/\/([^\.]*)\.yimg\.com\/(.*)
acl getmethod method GET
acl snmppublic snmp_community public


# Recommended minimum Access Permission configuration:
#
# Deny requests to certain unsafe ports
#http_access deny !Safe_ports
#http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localnet
http_access allow localhost
http_access deny all


# Squid normally listens to port 3128
http_port 3128 ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB key=/etc/mydlp/ssl/private.pem cert=/etc/mydlp/ssl/public.pem
always_direct allow all
ssl_bump allow all
sslproxy_cert_error allow all
# Or may be deny all according to your company policy
# sslproxy_cert_error deny all
sslproxy_flags DONT_VERIFY_PEER
sslcrtd_program /usr/lib/squid3/ssl_crtd -s /var/lib/ssl_db -M 4MB
sslcrtd_children 5


# Uncomment and adjust the following to add a disk cache directory.
cache_dir ufs /cache-1 40000 94 256
cache_dir ufs /cache-2 40000 94 256
cache_dir ufs /cache-3 40000 94 256
cache_dir ufs /cache-4 40000 94 256
cache_dir ufs /cache-5 40000 94 256
coredump_dir /var/spool/squid

store_id_program /etc/squid3/store-id.pl
#store_id_program /etc/squid3/test.rb
store_id_children 50 startup=40 idle=30 concurrency=1
store_id_access deny !getmethod
store_id_access deny norewrite
store_id_access allow storeid-helper
store_id_access deny all

refresh_all_ims on
reload_into_ims on
max_stale 20 years
minimum_expiry_time 0


# Add any of your own refresh_pattern entries above these.

#PATTERN REFRESH YOU TUBE
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

#PATTERN REFRESH
refresh_pattern -i \.(html|htm|css|js|png|jsp|asx|asp|aspx)$ 240 100% 420
refresh_pattern -i \/speedtest\/.*\.(txt|jpg|png|swf) 0 99% 14400 override-expire ignore-reload ignore-private ignore-reload override-lastmod reload-into-ims
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
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
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
refresh_pattern .((pikawarnet\.com)|(blogspot\.com)|(pixieimage\.com)|(multiply\.com)).* 60 30% 240

#sensitive site
refresh_pattern -i \.(sc-|dl-|ex-|mh-|dll|da-) 0 2% 50 reload-into-ims
refresh_pattern -i \.(mst|Xtp|iop)$ 0 50% 1440 reload-into-ims
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
refresh_pattern -i (wks_avira-win32-en-pecl.info.gz|wks_avira10-win32-en-pecl.info.gz|servers.def.vpx)$ 0 50% 1440
refresh_pattern -i (setup.exe.gz|avscan.exe.gz|avguard.exe.gz|filelist.zip|AvaClient.exe) 0 50% 1440
refresh_pattern -i (livescore.com|goal.com|bobet) 0 50% 60
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

#FB
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
refresh_pattern \.facebook\.com.* 240 50% 480
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
refresh_pattern \.gstatic\.com/images\? 1440 99% 14400 override-expire override-lastmod ignore-reload ignore-private ignore-must-revalidate
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
refresh_pattern (gstatic|diggstatic)\.com/.* 1440 99% 14400 override-expire ignore-reload ignore-private
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
refresh_pattern (zynga|ninjasaga|mafiawars|cityville|farmville|crowdstar|spilcdn|agame|popcap)\.com/.* 1440 99% 14400 override-expire ignore-reload ignore-private
refresh_pattern ^http:\/\/images|image|img|pics|openx|thumbs[0-9]\. 1440 99% 14400 override-expire ignore-reload ignore-private
refresh_pattern ^.*safebrowsing.*google 1440 99% 14400 override-expire ignore-reload ignore-private ignore-auth ignore-must-revalidate
refresh_pattern -i reverbnation.com 1440 99% 14400 override-expire override-lastmod ignore-no-cache ignore-private ignore-must-revalidate ignore-reload store-stale

# Game Online Update
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
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
refresh_pattern ^http://file\.atlantica\.gemscool\.com/.*\.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale
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
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
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
refresh_pattern ^http://.*\.gemscool\.com/.*\.(cab|zip|exe|rar|dat) 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale
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

#ads
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
refresh_pattern \.(ico|video-stats) 1440 99% 14400 override-expire ignore-reload ignore-private ignore-auth override-lastmod ignore-must-revalidate
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
refresh_pattern vid\.akm\.dailymotion\.com.*\.on2\? 1440 99% 14400 override-expire override-lastmod
refresh_pattern galleries\.video(\?|sz) 1440 99% 14400 override-expire ignore-reload ignore-must-revalidate ignore-private
refresh_pattern \.wikimapia\.org\/? 1440 99% 14400 override-expire override-lastmod ignore-reload ignore-private

#Spesific URL
refresh_pattern ^http://*.indowebster.com.*/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.21cineplex.*/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.kompas.*/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache store-stale ignore-must-revalidate
refresh_pattern ^http://*.blogspot.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.wordpress.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims store-stale ignore-must-revalidate
refresh_pattern ^http://*.photobucket.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.tinypic.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.imageshack.us/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.kaskus.*/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.detik.*/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.detiknews.*/*.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://video.liputan6.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://static.liputan6.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.friendster.com/.* 10080 80% 10080 override-expire override-lastmod ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.forummikrotik.com/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://*.linux.or.id/.* 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-auth store-stale ignore-must-revalidate
refresh_pattern ^http://(.*?)/get_video\? 10080 80% 10080 override-expire ignore-private store-stale ignore-must-revalidate
refresh_pattern ^http://(.*?)/videodownload\? 10080 80% 10080 override-expire ignore-private store-stale ignore-must-revalidate

#Update Antivirus
refresh_pattern guru.avg.com/.*\.(bin) 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
refresh_pattern avast.com.*\.vpx 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
refresh_pattern (avgate|avira).*\.(idx|gz)$ 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
refresh_pattern kaspersky.*\.avc$ 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
refresh_pattern kaspersky 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
refresh_pattern liveupdate.symantecliveupdate.com.*\.zip 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
refresh_pattern .update.nai.com/.*\.(gem|zip|mcs) 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
refresh_pattern .symantec.com.*\(exe|zip) 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
refresh_pattern mbamupdates.com.*\.ref 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
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
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

# Update Windows
#refresh_pattern windowsupdate.com/.*\.(cab|exe) 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
#refresh_pattern update.microsoft.com/.*\.(cab|exe) 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale
#refresh_pattern download.microsoft.com/.*\.(cab|exe) 10080 80% 10080 ignore-no-store ignore-reload reload-into-ims store-stale

# Download IIX
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

# Banner IIX
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
refresh_pattern ^http:\/\/ads(1|2|3).kompas.com.*\/ 10080 80% 10080 reload-into-ims ignore-reload override-expire ignore-no-store store-stale
refresh_pattern ^http:\/\/img.ads.kompas.com.*\/ 10080 80% 10080 reload-into-ims ignore-reload override-expire ignore-no-store store-stale
refresh_pattern .kompasimages.com.*\.(jpg|gif|png|swf) 10080 80% 10080 reload-into-ims ignore-reload override-expire ignore-no-store store-stale
refresh_pattern ^http:\/\/openx.kompas.com.*\/ 10080 80% 10080 reload-into-ims ignore-reload override-expire ignore-no-store store-stale
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
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
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
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
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
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
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

#general
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
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
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
refresh_pattern -i .(html|htm|css|js)$ 1440 75% 40320
refresh_pattern -i .index.(html|htm)$ 0 75% 10080

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320


store-id.pl

Tampilkan
#!/usr/bin/perl
###########################
#Store-id untuk squid3.x.x
#Copas dari sana sini banyak yg salah silakan diambil yg benar saja
#Special buat mas SJW dan Pragola Pati
$|=1;
while () {
my $chan = “”;
if (s/^(\d+\s+)//o) {
$chan = $1;
}
$_ =~ s/(\s+.+)//o;
if ($_ =~ m/^https?\:\/\/.*youtube.*(ptracking|stream_204|player_204|gen_204).*(video_id|docid|v)\=([^\&\s]*).*/){
$vid = $3 ;
@cpn = m/[&?]cpn\=([^\&\s]*)/;
$fn = “/var/log/squid/@cpn”;
unless (-e $fn) {
open FH,”>”.$fn ;
print FH “$vid\n”;
close FH;
}
print $chan, “ERR\n” ;
} elsif ($_ =~ m/^https?\:\/\/.*(youtube|google).*videoplayback.*/){
@itag = m/[&?](itag=[0-9]*)/;
@ids = m/[&?]id\=([^\&\s]*)/;
@mime = m/[&?](mime\=[^\&\s]*)/;
@cpn = m/[&?]cpn\=([^\&\s]*)/;
@range = m/[&?](range=[^\&\s]*)/;
if (defined($cpn[0])) {
$fn = “/var/log/squid/@cpn”;
if (-e $fn) {
open FH,”;
chomp $id ;
close FH ;
} else {
$id = $ids[0] ;
}
print $chan, “OK store-id=http://googlevideo.squid.internal/id=” . $id . “&@itag@range@mime\n” ;
} else {
print $chan, “ERR\n” ;
}
} elsif ($x =~ m/^https?:\/\/i[1-4]\.ytimg\.com\/(.*)/) {
$out=”http://ytimg.com.squid.internal/” . $1 ;
} elsif ($x =~ m/^http:\/\/.*\.dl\.sourceforge\.net\/(.*)/) {
$out=”http://dl.sourceforge.net.squid.internal/” . $1 ;
#Speedtest
} elsif ($x =~ m/^http\:\/\/.*\/speedtest\/(.*\.(jpg|txt)).*/) {
$out=”http://speedtest.squid.internal/” . $1 ;
#reverbnation
} elsif (m/^http:\/\/[a-z0-9]{4}\.reverbnation\.com\/.*\/([0-9]*).*/) {
$out=”http://reverbnation.com.squid.internal/” . “$1″ . “\n”;
# reverbnation
} elsif ($X[1] =~ m/^http:\/\/c2lo\.reverbnation\.com\/audio_player\/ec_stream_song\/(.*)\?.*/) {
$out=”http://reverbnation.squid.internal/” . $1 . “\n”;
# 4shared preview dan download
} elsif ($X[1] =~ m/^http:\/\/.*dlink__[23]Fdownload_[23]F([\w\d-]+)_3Ftsid.*/) {
$1 =~ s/_5F/_/g;
$out=”http://4shared.squid.internal/” . $1 . “\n”;
} elsif (m/^http\:\/\/.*\.4shared\.com\/download\/(.*)\/.*/) {
$out=”http://4shared.squid.internal/” . $1 . “\n”;
#BLOGSPOT
} elsif ($x =~ m/^http:\/\/[1-4]\.bp\.(blogspot\.com.*)/) {
$out=”http://blog-cdn.” . $1 ;
#AVAST
} elsif ($x =~ m/^http:\/\/download[0-9]{3}.(avast.com.*)/) {
$out=”http://avast-cdn.” . $1 ;
#AVAST
} elsif ($x =~ m/^http:\/\/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\/(iavs.*)/) {
$out=”http://avast-cdn.avast.com/” . $1 ;
#KAV
} elsif ($x =~ m/^http:\/\/dnl-[0-9]{2}.(geo.kaspersky.com.*)/) {
$out=”http://kav-cdn.” . $1 ;
#AVG
} elsif ($x =~ m/^http:\/\/update.avg.com/) {
$out=”http://avg-cdn.” . $1 ;
#maps.google.com
} elsif ($x =~ m/^http:\/\/(cbk|mt|khm|mlt|tbn)[0-9]?(.google\.co(m|\.uk|\.id).*)/) {
$out=”http://” . $1 . $2 ;
#gstatic and/or wikimapia
} elsif ($x =~ m/^http:\/\/([a-z])[0-9]?(\.gstatic\.com.*|\.wikimapia\.org.*)/) {
$out=”http://” . $1 . $2 ;
#maps.google.com
} elsif ($x =~ m/^http:\/\/(khm|mt)[0-9]?(.google.com.*)/) {
$out=”http://” . $1 . $2 ;
#Google
} elsif ($x =~ m/^http:\/\/www\.google-analytics\.com\/__utm\.gif\?.*/) {
$out=”http://www.google-analytics.com/__utm.gif\n”;
} elsif ($x =~ m/^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*?)/) {
$out=”http://” . $1 ;
#cdn, varialble 1st path
} elsif (($x =~ /filehippo/) && (m/^https?:\/\/(.*?)\.(.*?)\/(.*?)\/(.*)\.([a-z0-9]{3,4})(\?.*)?/)) {
@y = ($1,$2,$4,$5);
$y[0] =~ s/[a-z0-9]{2,5}/cdn./;
$out=”http://” . $y[0] . $y[1] . “/” . $y[2] . “.” . $y[3] ;
#rapidshare
} elsif (($x =~ /rapidshare/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?)([a-z]*\.[^\/]{3}\/[a-z]*\/[0-9]*)\/(.*?)\/([^\/\?\&]{4,})$/)) {
$out=”http://cdn.” . $3 . “/squid.internal/” . $5 ;
#for yimg.com video
} elsif ($x =~ m/^https?:\/\/(.*yimg.com)\/\/(.*)\/([^\/\?\&]*\/[^\/\?\&]*\.[^\/\?\&]{3,4})(\?.*)?$/) {
$out=”http://cdn.yimg.com/” . $3 ;
#for yimg.com doubled
} elsif ($x =~ m/^http:\/\/(.*?)\.yimg\.com\/(.*?)\.yimg\.com\/(.*?)\?(.*)/) {
$out=”http://cdn.yimg.com/” . $3 ;
} elsif ($_ =~ m/^http:\/\/(videos|photos|scontent)[\-a-z0-9\.]*instagram\.com\/hphotos[\-a-z0-9]*\/([\w\d\-\_\/\.]*.(mp4|jpg))/){
print $chan, “OK store-id=http://instagram.squid.internal/$2\n” ;
} elsif ($_ =~ m/^http:\/\/distilleryimage[\-a-z0-9\.]*instagram\.com\/(.*)/){
print $chan, “OK store-id=http://instagram.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*\.steampowered\.com\/depot\/[0-9]+\/chunk\/([^\?]*)/){
print $chan, “OK store-id=http://steampowered.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*(fbcdn|akamaihd)\.net\/.*\/(.*\.mp4)(.*)/) {
print $chan, “OK store-id=storeurl://facebook.squid.internal/$2\n” ;
} elsif ($_ =~ m/^https?:\/\/.*(static|profile).*a\.akamaihd\.net(\/static-ak\/rsrc\.php\/v[0-9]\/(.*\.(mp4|jpg|bmp|png|flv|m4v|gif|jpeg)))/) {
print $chan, “OK store-id=http://facebook.squid.internal/$3\n” ;
} elsif ($_ =~ m/^https?:\/\/.*(static|profile).*\.ak\.fbcdn\.net(\/static-ak\/rsrc\.php\/v[0-9]\/(.*\.(mp4|jpg|bmp|png|flv|m4v|gif|jpeg)))/) {
print $chan, “OK store-id=http://facebook.squid.internal/$3\n” ;
} elsif ($_ =~ m/^https?:\/\/.*(static|profile).*a\.akamaihd\.net(\/rsrc\.php\/v[0-9]\/(.*))/) {
print $chan, “OK store-id=http://facebook.squid.internal/$3\n” ;
} elsif ($_ =~ m/^https?:\/\/.*(static|profile).*\.ak\.fbcdn\.net(\/rsrc\.php\/v[0-9]\/(.*))/) {
print $chan, “OK store-id=http://facebook.squid.internal/$3\n” ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*(fbcdn|akamaihd)[^\/]*net\/rsrc\.php\/(.*\.(mp4|jpg|bmp|png|flv|m4v|gif|jpeg))/) {
print $chan, “OK store-id=http://facebook.squid.internal/$2\n” ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*(fbcdn|akamaihd)[^\/]*net\/safe\_image\.php\?.*(url\=.*\.(mp4|jpg|bmp|png|flv|m4v|gif|jpeg)).*/) {
print $chan, “OK store-id=http://facebook.squid.internal/$2\n” ;
} elsif ($_ =~ m/^https?:\/\/i[0-2].wp\.com\/graph\.facebook\.com\/(.*)/) {
print $chan, “OK store-id=http://facebook.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/(video\.ak\.fbcdn\.net)\/(.*?)\/(.*\.mp4)\??.*$/) {
print $chan, “OK store-id=http://facebook.squid.internal/$1/$3\n” ;
} elsif ($_ =~ m/^https?:\/\/video\.(.*)\.fbcdn\.net\/(.*?)\/([0-9_]+\.(mp4|flv|avi|mkv|m4v|mov|wmv|3gp|mpg|mpeg)?)(.*)/) {
print $chan, “OK store-id=http://facebook.squid.internal/$3\n” ;
} elsif ($_ =~ m/^https?:\/\/(fbcdn|scontent).*(akamaihd|fbcdn)\.net\/(h|s)(profile|photos).*\/((p|s).*\.(png|gif|jpg))(\?.+)?$/){
print $chan, “OK store-id=http://facebook.squid.internal/$5\n” ;
} elsif ($_ =~ m/^https?:\/\/(fbcdn|scontent).*(akamaihd|fbcdn)\.net\/(h|s)(profile|photos).*\/(.*\.(png|gif|jpg))(\?.+)?$/){
print $chan, “OK store-id=http://facebook.squid.internal/$5\n” ;
} elsif ($_ =~ m/^https?:\/\/attachment\.fbsbx\.com\/.*\?(id=[0-9]*).*/) {
print $chan, “OK store-id=http://facebook.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https:\/\/.*\.google\.com\/chrome\/win\/.+\/(.*\.exe)/){
print $chan, “OK store-id=http://update-google.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*\.ytimg\.com\/(.*\.(webp|jpg|gif))/){
print $chan, “OK store-id=http://ytimg.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*firedrive\.com\/download\/[0-9]+\/[0-9]+\/.*\?h=.*e\=.*f\=(.*)\&.*/){
print $chan, “OK store-id=http://firedrive.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*\.4shared\.com\/.*\/dlink__[23]F([\w]+)_[23]F(.*)\_3Ftsid_[\w].*/){
print $chan, “OK store-id=http://4shared.squid.internal/$2\n” ;
} elsif ($_ =~ m/^https?:\/\/.*\.4shared\.com\/download\/([^\/]*).*/){
print $chan, “OK store-id=http://4shared.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*\.[a-z]+\.bing\.net\/(.*)\&w=.*/){
print $chan, “OK store-id=http://bing.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*\.bing\.(net|com)\/.*\?id=([a-zA-Z]\.[0-9]+)&pid=.*/){
print $chan, “OK store-id=http://bing.squid.internal/$2\n” ;
} elsif ($_ =~ m/^https?:\/\/.*\.gstatic\.com\/images\?q=tbn\:(.*)/){
print $chan, “OK store-id=http://gstatic.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*\.reverbnation\.com\/.*\/(ec_stream_song|download_song_direct|stream_song)\/([0-9]*).*/){
print $chan, “OK store-id=http://reverbnation.squid.internal/$2\n” ;
} elsif ($_ =~ m/^https?:\/\/.*\.dl\.sourceforge\.net\/(.*\.(exe|zip|mp3|mp4))/){
print $chan, “OK store-id=http://sourceforge.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/fs[0-9]+\.filehippo\.com\/[^\/]*\/[^\/]*\/(.*)/){
print $chan, “OK store-id=http://filehippo.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/download[0-9]+.mediafire\.com\/.*\/\w+\/(.*)/){
print $chan, “OK store-id=http://mediafire.squid.internal$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*android\.clients\.google\.com\/[a-z]+\/[a-zA-Z]+\/[a-zA-Z]+\/(.*)\/([0-9]+)\?.*/){
print $chan, “OK store-id=http://android.squid.internal/$1/$2\n” ;
} elsif ($_ =~ m/^https?:\/\/.*(googleusercontent.com|blogspot.com)\/(.*)\/([a-z0-9]+)(-[a-z]-[a-z]-[a-z]+)?\/(.*\.(jpg|png))/){
print $chan, “OK store-id=http://googleusercontent.squid.internal/$5\n” ;
} elsif ($_ =~ m/^https?:\/\/global-shared-files-[a-z][0-9]\.softonic\.com\/.{3}\/.{3}\/.*\/.*\=(.*\.exe)/){
print $chan, “OK store-id=http://softonic.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*netmarble\.co\.id\/.*\/(data|ModooMarble)\/(.*)/){
print $chan, “OK store-id=http://netmarble.squid.internal/$2\n” ;
} elsif ($_ =~ m/^https?:\/\/(.*)\.windowsupdate\.com\/(.*)\/(.*)\/([a-z].*)/){
print $chan, “OK store-id=http://windowsupdate.squid.internal/$4\n” ;
} elsif ($_ =~ m/^https?:\/\/.*filetrip\.net\/.*\/((.*)\.([^\/\?\&]{2,4}))\?.*$/){
print $chan, “OK store-id=http://filetrip.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*get4mobile\.net\/.*f=([^\/\?\&]*).*$/){
print $chan, “OK store-id=http://get4mobile.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*thestaticvube\.com\/.*\/(.*)/){
print $chan, “OK store-id=http://thestaticvube.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/113\.6\.235\.171\/youku\/.*\/(.*\.flv)/){
print $chan, “OK store-id=http://youku.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/\d+\.\d+\.\d+\.\d+\/drama\/(.*\.mp4)\?.*\=(\d+)/){
print $chan, “OK store-id=http://drama.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/([a-z])[\d]{1,2}?(.gstatic\.com.*|\.wikimapia\.org.*)/){
print $chan, “OK store-id=http://gstatic.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*\.[a-z][0-9]\.(tiles\.virtualearth\.net)\/(.*\&n=z)/){
print $chan, “OK store-id=http://virtualearth.squid.internal/$2\n” ;
} elsif ($_ =~ m/^https?:\/\/imgv2-[0-9]\.scribdassets\.com\/(.*)/){
print $chan, “OK store-id=http://scribdassets.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/(.*?)\/(archlinux\/[a-zA-Z].*\/os\/.*)/){
print $chan, “OK store-id=http://archlinux.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/(.*?)\/speedtest\/(.*\.(jpg|txt))\??.*$/){
print $chan, “OK store-id=http://speedtest.squid.internal/$2\n” ;
} elsif ($_ =~ m/^https?:\/\/i[1-9]{3}\.photobucket\.com\/(.*)/){
print $chan, “OK store-id=http://photobucket.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/i[1-9]{4}\.photobucket\.com\/(.*)/){
print $chan, “OK store-id=http://photobucket.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/avideos\.5min\.com\/.*\/(.*)\?.*/){
print $chan, “OK store-id=http://avideos.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*\.catalog\.video\.msn\.com\/.*\/(.*\.(mp4|flv|m4v))/){
print $chan, “OK store-id=http://msn-video.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/v\.imwx\.com\/.*\/(.*)\?.*/){
print $chan, “OK store-id=http://imwx.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/video[0-9]\.break\.com\/.*\/(.*)\?.*/){
print $chan, “OK store-id=http://break.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*\.video[0-9]\.blip\.tv\/.*\/(.*)\?.*/){
print $chan, “OK store-id=http://blip.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/ss[0-9]\.vidivodo\.com\/vidivodo\/vidservers\/server[0-9]*\/videos\/.*\/([a-zA-Z0-9.]*)\?.*/){
print $chan, “OK store-id=http://vidivodo.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/video\-http\.media\-imdb\.com\/([a-zA-Z0-9\@\_\-]+\.(mp4|flv|m4v))\?.*/){
print $chan, “OK store-id=http://imdb-video.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/(vl|v)\.mccont\.com\/(.*)\/(.*\.(mp4|m4v|flv))\?.*/){
print $chan, “OK store-id=http://mccont.squid.internal/$3\n” ;
} elsif ($_ =~ m/^https?:\/\/(vid.{0,2}|proxy.*)(\.ak|\.ec|\.akm|)\.(dmcdn\.net|dailymotion\.com)\/.*\/(frag.*\.(flv|mp4|m4v)).*/){
print $chan, “OK store-id=http://dailymotion.squid.internal/$4\n” ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.vimeo[^\/]*\.com.*\/([[^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg|web))\?.*/){
print $chan, “OK store-id=http://vimeo.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/fcache\.veoh\.com\/.*\/.*(l[0-9]*\.(mp4|flv))\?.*/){
print $chan, “OK store-id=http://veoh.squid.internal$1\n” ;
} elsif ($_ =~ m/^https?:\/\/video\.thestaticvube\.com\/.*\/(.*)/){
print $chan, “OK store-id=http://thestaticvube.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/cdn[0-9]\.videos\.videobash\.com\/.*\/(.*\.(mp4|m4v|flv))\?.*/){
print $chan, “OK store-id=http://videobash.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.phncdn[^\/]*\.com.*\/([[^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
print $chan, “OK store-id=http://phncdn.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*\.xvideos\.com\/.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
print $chan, “OK store-id=http://xvideos.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.tube8[^\/]*\.com.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
print $chan, “OK store-id=http://tube8.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*\.(redtube|redtubefiles)\.com\/.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
print $chan, “OK store-id=http://redtube.squid.internal/$2\n” ;
} elsif ($_ =~ m/^https?:\/\/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/.*\/xh.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))/){
print $chan, “OK store-id=http://xhcdn.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.xhcdn[^\/]*\.com.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
print $chan, “OK store-id=http://xhcdn.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.nsimg[^\/]*\.net.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
print $chan, “OK store-id=http://nsimg.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*\.youjizz\.com.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
print $chan, “OK store-id=http://youjizz.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.public\.keezmovies[^\/]*\.com.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
print $chan, “OK store-id=http://keezmovies.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.youporn[^\/]*\.com.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
print $chan, “OK store-id=http://youporn.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.spankwire[^\/]*\.com.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
print $chan, “OK store-id=http://spankwire.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.pornhub[^\/]*\.com.*\/([[^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
print $chan, “OK store-id=http://pornhub.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.us.playvid[^\/]*\.com.*\/([[^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
print $chan, “OK store-id=http://playvid.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.slutload-media[^\/]*\.com.*\/([[^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
print $chan, “OK store-id=http://slutload-media.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.hardsextube[^\/]*\.com.*\/([[^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
print $chan, “OK store-id=http://hardsextube.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.public\.extremetube[^\/]*\.com.*\/([[^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
print $chan, “OK store-id=http://extremetube.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/([a-z0-9.]*)(\.doubleclick\.net|\.quantserve\.com|.exoclick\.com|interclick.\com|\.googlesyndication\.com|\.auditude\.com|.visiblemeasures\.com|yieldmanager|cpxinteractive)(.*)/){
print $chan, “OK store-id=http://ads.squid.internal/$3\n” ;
} elsif ($_ =~ m/^https?:\/\/(.*?)\/(ads)\?(.*?)/){
print $chan, “OK store-id=http://ads.squid.internal/$3\n” ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*phobos\.apple\.com\/.*\/([^\/]*\.ipa)/){
print $chan, “OK store-id=http://apple.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/fs\w*\.fileserve\.com\/file\/(\w*)\/[\w-]*\.\/(.*)/){
print $chan, “OK store-id=http://fileserve.squid.internal/$2\n” ;
} elsif ($_ =~ m/^https?:\/\/s[0-9]*\.filesonic\.com\/download\/([0-9]*)\/(.*)/){
print $chan, “OK store-id=http://filesonic.squid.internal/$2\n” ;
} elsif ($_ =~ m/^https?:\/\/download[0-9]{3}\.avast\.com\/(.*)/){
print $chan, “OK store-id=http://avast.squid.internal/41\n” ;
} elsif ($_ =~ m/^https?:\/\/[a-zA-Z0-9]+\.[a-zA-Z0-9]+x\.[a-z]\.avast\.com\/[a-zA-Z0-9]+x\/(.*\.vpx)/){
print $chan, “OK store-id=http://avast.squid.internal\$1\n” ;
} elsif ($_ =~ m/^https?:\/\/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/(iavs.*)/){
print $chan, “OK store-id=http://iavs.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/.*\.starhub\.com\/[a-z]+\/[a-z]+\/[a-z]+\/(.*exe)\?[0-9]/){
print $chan, “OK store-id=http://starhub.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/dnl-[0-9]{2}\.geo\.kaspersky\.com\/(.*)/){
print $chan, “OK store-id=http://kaspersky.squid.internal/$1\n” ;
} elsif ($_ =~ m/^https?:\/\/([^\.]*)\.yimg\.com\/(.*)/){
print $chan, “OK store-id=http://yimg.squid.internal/$1\n” ;
} else {
print $chan, “ERR\n” ;
}
}


root@myproxy:/etc/squid3# squid3 -k reconfigure
2015/04/11 00:57:48| squid.conf:142 unrecognized: 'store_id_program'
2015/04/11 00:57:48| squid.conf:144 unrecognized: 'store_id_children'
2015/04/11 00:57:48| squid.conf:145 unrecognized: 'store_id_access'
2015/04/11 00:57:48| squid.conf:146 unrecognized: 'store_id_access'
2015/04/11 00:57:48| squid.conf:147 unrecognized: 'store_id_access'
2015/04/11 00:57:48| squid.conf:148 unrecognized: 'store_id_access'


Apa Yang harus saya lakukan untuk Kasus ini ?
Attachments
Untitled.png
Untitled.png (24.68 KiB) Viewed 286 times
User avatar
bang_andi
Posts: 398
Joined: 03 Sep 2010, 09:07
Location: Di sekitar sungai musi...
Contact:

Re: (ASK) Mohon Koreksi Konfigurasi SQUID 3.X

Postby bang_andi » 11 Apr 2015, 06:15

beri comment (#) dulu pd syntax line 142 - 148 lalu save dan restart service squid3.

baris syntax yg di beri # tadi, coba dicek satu persatu.

maaf, sy ol pakai hp jadi code squid.conf tidak kelihatan semuanya.

Return to “Ubuntu Server”

Who is online

Users browsing this forum: No registered users and 4 guests