1 acl osmtile_thishost dstdomain <%= node.name %>
2 acl osmtile_sites dstdomain <%= node.name %> a.tile.openstreetmap.org b.tile.openstreetmap.org c.tile.openstreetmap.org tile.openstreetmap.org a.tile.osm.org b.tile.osm.org c.tile.osm.org tile.osm.org
3 acl osmtiles_png urlpath_regex .png$
5 acl osmtileScrapers browser ^$
6 acl osmtileScrapers browser ^MOBAC
7 acl osmtileScrapers browser ^JTileDownloader
8 acl osmtileScrapers browser ^Apache\-HttpClient
9 acl osmtileScrapers browser ^Go-http-client\/
10 acl osmtileScrapers browser ^Opera\/10\.00
11 acl osmtileScrapers browser ^shipxy01
12 # acl osmtileScrapers browser ^OsmAnd # Victor + Email. Whitelist for 1 week
13 # acl osmtileScrapers browser ^apemap # CGI143 + Email. Whitelist for 1 week
14 acl osmtileScrapers browser Firefox\/2\.0\.0\.11$
15 acl osmtileScrapers browser Firefox\/3\.5\.7$
16 acl osmtileScrapers browser Firefox\/3\.6$
17 acl osmtileScrapers browser ^Mozilla\/4\.0$
18 acl osmtileScrapers browser ^Mozilla\/5\.0$ # QLandkarte unwilling to set a real user-agent.
19 acl osmtileScrapers browser ^Mozilla$ # Intentionally faked user-agent
20 acl osmtileScrapers browser ^User\-Agent
21 acl osmtileScrapers browser Firefox\/0\.8$
22 acl osmtileScrapers browser Firefox\/1\.0$
23 acl osmtileScrapers browser Firefox\/1\.0\.7$
24 acl osmtileScrapers browser K\-Meleon\/1\.02$
25 acl osmtileScrapers browser MSIE.7\.0.*Windows.NT.5\.1.*2\.0\.50727.$
26 acl osmtileScrapers browser MSIE.5.5
27 acl osmtileScrapers browser ^LoadOSM\.exe$
28 acl osmtileScrapers browser ^app_name$
29 acl osmtileScrapers browser ^osmdroid$ # app using osmdroid library not setting app-specific User-Agent
30 # acl osmtileScrapers browser ^Mozilla/5\.0 \(Windows NT 5\.1\)$ # Faked User-Agent
31 acl osmtileScrapers browser Firefox\/3\.0
32 acl osmtileScrapers browser Firefox\/4\.0
33 acl osmtileScrapers browser Firefox\/5\.0
34 acl osmtileScrapers browser Firefox\/6\.0
35 acl osmtileScrapers browser Firefox\/7\.0
36 acl osmtileScrapers browser Firefox\/8\.0
37 acl osmtileScrapers browser Firefox\/9\.0
38 acl osmtileScrapers browser Firefox\/10\.0
39 acl osmtileScrapers browser Firefox\/11\.0
40 acl osmtileScrapers browser Firefox\/12\.0
41 acl osmtileScrapers browser Firefox\/13\.0
42 acl osmtileScrapers browser ^Python\-urllib\/
43 acl osmtileScrapers browser ^python\-requests\/
44 acl osmtileScrapers browser ^node\-fetch\/
45 acl osmtileScrapers browser ^R$
46 acl osmtileScrapers browser ^Java\/
47 acl osmtileScrapers browser ^tiles$
48 acl osmtileScrapers browser ^runtastic
50 acl is_fake_browser browser Firefox\/3\.0
51 acl is_fake_browser browser Firefox\/4\.0
52 acl is_fake_browser browser Firefox\/5\.0
53 acl is_fake_browser browser Firefox\/6\.0
54 acl is_fake_browser browser Firefox\/7\.0
55 acl is_fake_browser browser Firefox\/8\.0
56 acl is_fake_browser browser Firefox\/9\.0
57 acl is_fake_browser browser Firefox\/10\.0
58 acl is_fake_browser browser Firefox\/11\.0
59 acl is_fake_browser browser Firefox\/12\.0
60 acl is_fake_browser browser Firefox\/13\.0
62 http_access deny osmtile_sites osmtileScrapers
64 acl osmtileOverusers referer_regex ^https?://pmap\.kuku\.lu/
65 acl osmtileOverusers referer_regex ^https?://[^.]*\.pmap\.kuku\.lu/
66 acl osmtileOverusers referer_regex ^https?://fastpokemap\.com/
67 acl osmtileOverusers referer_regex ^https?://[^.]*\.fastpokemap\.com/
68 acl osmtileOverusers referer_regex ^https?://pkget\.com/
69 acl osmtileOverusers referer_regex ^https?://[^.]*\.pkget\.com/
70 acl osmtileOverusers referer_regex ^https?://twpkinfo\.com/
71 acl osmtileOverusers referer_regex ^https?://[^.]*\.twpkinfo\.com/
74 acl osmtileOverusers referer_regex ^http://www\.openstreetmap\.org/?$
75 acl osmtileOverusers referer_regex ^http://openstreetmap\.org/?$
76 acl osmtileOverusers referer_regex ^http://www\.osm\.org/?$
77 acl osmtileOverusers referer_regex ^http://osm\.org/?$
79 http_access deny osmtile_sites osmtileOverusers
81 # Delay pool when !has_referer and is_browser
82 acl has_referer referer_regex .
83 acl is_browser browser Chrome\/
84 acl is_browser browser Firefox\/
85 acl is_browser browser Trident\/
86 acl is_browser browser Safari\/
87 acl is_browser browser AppleWebKit\/
89 acl whitelist_path urlpath_regex ^/cgi-bin/(export|debug)
90 acl blacklist_path urlpath_regex ^/cgi-bin/
91 acl blacklist_path urlpath_regex ^/MyAdmin/
92 acl blacklist_path urlpath_regex ^/myadmin/
93 acl blacklist_path urlpath_regex ^/pma/
94 acl blacklist_path urlpath_regex ^/phpmyadmin/
95 acl blacklist_path urlpath_regex ^/phpMyAdmin/
96 acl blacklist_path urlpath_regex ^/idssvc/
97 acl blacklist_path urlpath_regex ^/iesvc/
98 acl blacklist_path urlpath_regex ^/invoker/
99 acl blacklist_path urlpath_regex ^/jmx-console/
100 acl blacklist_path urlpath_regex ^/manager/
101 acl blacklist_path urlpath_regex ^/service/
102 acl blacklist_path urlpath_regex ^/web-console/
103 acl blacklist_path urlpath_regex ^/wstats/
104 acl blacklist_path urlpath_regex ^/zecmd/
106 http_access allow osmtile_sites whitelist_path
107 http_access deny blacklist_path
109 acl requestMethodGet method GET
111 http_access allow osmtile_sites requestMethodGet
113 acl osmtile_nocache_url urlpath_regex \.png/(status|dirty)$
114 cache deny osmtile_sites osmtile_nocache_url
116 <% @caches.each do |cache| -%>
117 <% cache.ipaddresses(:family => :inet, :role => :external).sort.each do |address| -%>
118 acl tile_caches src <%= address %>
123 <% node[:tilecache][:tile_siblings].each do |sibling| -%>
124 cache_peer <%= sibling %> sibling 3128 4827 htcp weight=1500
128 <% if node[:squid][:version] < 4 -%>
129 cache_peer <%= node[:tilecache][:tile_parent] %> parent 443 0 no-query originserver name=osmtileAccel login=PASS connect-timeout=120 no-digest weight=1000 ssl ssldomain=render.openstreetmap.org
131 cache_peer <%= node[:tilecache][:tile_parent] %> parent 443 0 no-query originserver name=osmtileAccel login=PASS connect-timeout=120 no-digest weight=1000 tls tlsdomain=render.openstreetmap.org
133 cache_peer_access osmtileAccel allow osmtile_sites
136 <% @renders.each do |renders| -%>
137 <% if node[:squid][:version] < 4 -%>
138 cache_peer <%= renders[:hostname] %>.render.openstreetmap.org parent 443 0 no-query originserver name=osmtileAccelBackup<%= renders[:hostname] %> login=PASS connect-timeout=60 no-digest weight=10 ssl ssldomain=render.openstreetmap.org
140 cache_peer <%= renders[:hostname] %>.render.openstreetmap.org parent 443 0 no-query originserver name=osmtileAccelBackup<%= renders[:hostname] %> login=PASS connect-timeout=60 no-digest weight=10 tls tlsdomain=render.openstreetmap.org
142 cache_peer_access osmtileAccelBackup<%= renders[:hostname] %> allow osmtile_sites
145 # ----------------------------------
146 # Create an unlimited pool for cache IP addresses
147 acl pool_unlimited src 127.0.0.1
148 <% @caches.each do |cache| -%>
149 <% cache.ipaddresses(:family => :inet, :role => :external).sort.each do |address| -%>
150 acl pool_unlimited src <%= address %>
154 # Juno Minsk office - me@komzpa.net
155 acl pool_unlimited src 212.98.173.54
156 <% if node[:squid][:version] < 4 -%>
158 #Allow tile_caches HTCP access
159 htcp_access allow tile_caches
161 #Allow tile_caches ICP access
162 icp_access allow tile_caches
165 <% (0..127).each do |i| -%>
166 acl pool_<%= sprintf("%03d", 2*i) %> src <%= 2*i %>.0.0.0/7
170 delay_initial_bucket_level 25
172 <% (1..256).each do |i| -%>
173 delay_class <%= i %> 3
176 # xxxxxxx- -------- xxxxxxxx xxxxxxxx
178 # small pools for !has_referer && is_browser - designed to slow down anyone
179 # using no-referer to bypass blocks due to abusive levels of use.
180 <% (0..127).each do |i| -%>
181 delay_access <%= i+1 %> allow pool_<%= sprintf("%03d", 2*i) %> !pool_unlimited is_fake_browser osmtile_sites
182 delay_access <%= i+1 %> allow pool_<%= sprintf("%03d", 2*i) %> !pool_unlimited !has_referer is_browser osmtile_sites
183 delay_access <%= i+1 %> deny all
184 delay_parameters <%= i+1 %> -1/-1 <%= node[:tilecache][:net_bucket_refill] / 10 %>/<%= node[:tilecache][:net_bucket_size] / 10 %> <%= node[:tilecache][:ip_bucket_refill] / 10 %>/<%= node[:tilecache][:ip_bucket_size] / 10 %>
187 # bigger pools for users providing a referer (assuming it's not blocked)
188 # or non-browser users.
189 <% (0..127).each do |i| %>
190 delay_access <%= i+129 %> allow pool_<%= sprintf("%03d", 2*i) %> !pool_unlimited osmtile_sites
191 delay_access <%= i+129 %> deny all
192 delay_parameters <%= i+129 %> -1/-1 <%= node[:tilecache][:net_bucket_refill] %>/<%= node[:tilecache][:net_bucket_size] %> <%= node[:tilecache][:ip_bucket_refill] %>/<%= node[:tilecache][:ip_bucket_size] %>
195 #----------------------------------