-
Notifications
You must be signed in to change notification settings - Fork 0
/
inComum.conf
79 lines (65 loc) · 6.26 KB
/
inComum.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# inComum 0.3.9.1
# ===============
#
# To install, add following line (without #) on squid.conf:
# include /etc/squid/inComum.conf
#
# IMPORTANT: above line MUST be inserted BEFORE any other config.
# (Not exactly: must be before acl QUERY or any other refresh_pattern).
#
# IMPORTANT 2: Don't forget to recompile Squid with --enable-http-violations directive
#
# Install helper on squid.conf
# 1. Redirector config wich makes URL equivalency
storeurl_rewrite_program /usr/lib/squid/inComum
storeurl_rewrite_children 10 #depends on your load. Usually between 5 and 100.
# 2. acl to send only changeable URLs to redirector.
acl store_rewrite_list dstdomain .youtube.com .googlevideo.com .orkut.com .ytimg.com .fbcdn.net
acl store_rewrite_list dstdomain .ggpht.com .media.tumblr.com .photobucket.com .gstatic.com .bp.blogspot.com
acl store_rewrite_list dstdomain .avast.com .avg.com .vimeo.com .v.mccont.com .blip.tv
acl store_rewrite_list dstdomain .flashvideo.globo.com .terra.com
acl store_rewrite_list dstdomain .wpc.porntube.com .redtubefiles.com .xvideos.com .phncdn.com .pornhub.com
acl store_rewrite_list dstdomain .catalog.video.msn.com .mais.uol.com.br
acl store_rewrite_list dstdomain .videobb.com .sourceforge.net
acl all1 src all
storeurl_access allow store_rewrite_list
storeurl_access deny all1
# 3. Allow Squid to cache URL with "?"
# By default, Squid thinks every "?" URL is not cacheable (this behavior is not a HTTP standard).
# Unfortunately, some sites disagree.
# These 2 following squid.conf lines must be commented:
# #acl QUERY urlpath_regex cgi-bin \?
# #cache deny QUERY
#
# An alternative method is no remove only "\?" string from acl "QUERY" and comment line bellow.
cache allow all1
# 4. if you wish, you may use agressive cache refresh pattern. Uncomment line below.
# refresh_pattern -i \.(js|gif|jpg|png|css|htm|html|bmp|mp4|flv|pdf)$ 1440 7000% 525600 override-expire reload-into-ims max-stale=5259487 stale-while-revalidate=2592000 ignore-private ignore-no-cache
# 5. refresh_pattern for increase time of cacheable URLs.
refresh_pattern ^http://([a-z][0-9]\.){0,1}(profile|sphotos|photos-[a-z])\.ak\.fbcdn\.net/hp(rofile|hotos)-ak- 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://[^/]*\.(youtube|googlevideo).com/(get_video|videoplayback|videodownload)\? 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://i.\.ytimg\.com/.*\.(bmp|gif|jpg|png) 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://lh.\.ggpht\.com/.*\.(bmp|gif|jpg|png) 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://(.{1,2}\.|)media\.tumblr\.com/.*\.(bmp|gif|jpg|png) 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://(i|th).{1,4}\.photobucket\.com/.*\.(bmp|gif|jpg|png) 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://[1-4]\.bp\.blogspot\.com/ 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://download.*\.avast\.com/ 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://(backup|a.|pupdate-aa)\.avg\.c(om|z)/softw/ 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://av\.vimeo\.com/.*\.(mp4|flv) 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://.{1,3}\.video.\.blip\.tv.*\.(m4v|flv|mp4|wmv|rm|ram|mov|avi|mp3) 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://flashvideo.globo.com/.*mp4 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://(img|content).{1,2}.catalog.video.msn.com/ 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://(video.{1,2}|thumb|storage)\.mais\.uol\.com.br/ 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://v.mccont.com/ 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://(img..|videos\.flv.{0,1})\.redtubefiles\.com/ 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://wpc.porntube.com/ 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://porn.{1,3}\.xvideos\.com/.*\.flv 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://s[0-9]{0,3}\.videobb\.com/ 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://t.\.gstatic\.com/ 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://cdn[1-3][a-z]{0,1}.*\.phncdn\.com/ 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://nyc-v[0-9]{1,3}\.pornhub\.com/*\.flv 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
refresh_pattern ^http://[a-z]{1,}\.dl\.sourceforge\.net\/project/ 5259487 99999% 5259487 override-expire reload-into-ims stale-while-revalidate=2592000 ignore-private ignore-no-cache
# Don't forget to increase the size of your maximum objects.
# Something among 30 and 100MB is usually a good number.
# IMPORTANT: this value is global.
maximum_object_size 50 MB