summaryrefslogtreecommitdiff
path: root/searx/plugins/https_rules/GoogleAPIs.xml
blob: 85a5a80815530ed1996087135cd4c02779b8f296 (plain)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!--
	For other Google coverage, see GoogleServices.xml.


	Nonfunctional domains:

		- hosted.gmodules.com *
		- img0.gmodules.com *
		- p.gmodules.com *

	* 404; mismatched, CN: *.googleusercontent.com


	Problematic domains:

		- gmodules.com			(503, CN: www.google.com)
		- www.gmodules.com		(503, CN: *.googleusercontent.com)
		- gstatic.com			(404, valid cert)
		- api.recaptcha.net		(works; mismatched, CN: google.com)


	Partially covered domains:

		- (www.)gmodules.com		(→ www.google.com)
		- (www.)google.com
		- chart.apis.google.com		(→ chart.googleapis.com)


	Fully covered domains:

		- api.google.com

		- *.clients.google.com:

			- linkhelp

		- ssl.google-analytics.com
		- www.google-analytics.com

		- googleapis.com subdomains:

			- ajax
			- chart
			- *.commondatastorage
			- fonts
			- *.storage
			- www

		- gstatic.com subdomains:

			- (www.)	(^ → www)
			- csi
			- encrypted-tbn\d
			- g0
			- *.metric
			- ssl
			- t\d

		- api.recaptcha.net	(→ www.google.com)
		- api-secure.recaptcha.net
		- gdata.youtube.com


	ssl.google-analytics.com/ga.js sets __utm\w wildcard
	cookies on whichever domain it is loaded from.

-->
<ruleset name="Google APIs">

	<target host="gmodules.com" />
	<target host="www.gmodules.com" />
	<target host="google.com" />
	<target host="apis.google.com" />
	<target host="*.apis.google.com" />
	<target host="*.clients.google.com" />
	<target host="www.google.com" />
	<target host="*.google-analytics.com" />
	<target host="*.googleapis.com" />
	<target host="gstatic.com" />
	<target host="*.gstatic.com" />
	<!--	Captive portal detection redirects to this URL, and many captive
		portals break TLS, so exempt this redirect URL.
		See GitHub bug #368
							-->
		<exclusion pattern="^http://www\.gstatic\.com/generate_204" />
	<target host="*.recaptcha.net" />
	<target host="gdata.youtube.com" />
		<exclusion pattern="^http://gdata\.youtube\.com/crossdomain\.xml" />


	<securecookie host="^ssl\.google-analytics\.com$" name=".+" />


	<rule from="^http://(?:www\.)?gmodules\.com/ig/images/"
		to="https://www.google.com/ig/images/" />

	<!--	jsapi was causing problems on some sites that embed google maps:
		https://trac.torproject.org/projects/tor/ticket/2335
		Apparently now fixed; thanks, Google!
							-->
	<rule from="^http://(?:www\.)?google\.com/(afsonline/|chart|jsapi|recaptcha/|uds)"
		to="https://www.google.com/$1" />

	<rule from="^http://(api|[\w-]+\.client)s\.google\.com/"
		to="https://$1s.google.com/" />

	<rule from="^http://chart\.apis\.google\.com/chart"
		to="https://chart.googleapis.com/chart" />

	<rule from="^http://(ssl|www)\.google-analytics\.com/"
		to="https://$1.google-analytics.com/" />

	<rule from="^http://(ajax|chart|fonts|www)\.googleapis\.com/"
		to="https://$1.googleapis.com/" />

	<rule from="^http://([^@:\./]+\.)?(commondata)?storage\.googleapis\.com/"
		to="https://$1$2storage.googleapis.com/" />

	<!--	There is an interesting question about whether we should
		append &strip=1 to all cache URLs.  This causes them to load
		without images and styles, which is more secure but can look
		worse.
			Without &strip=1, the images and styles from the cached
		pages still load from the original, typically unencrypted, page.
			With &strip=1, the cached page will be text-only and
		will come exclusively from Google's HTTPS server.
									-->
	<rule from="^http://(?:www\.)?gstatic\.com/"
		to="https://www.gstatic.com/" />

	<rule from="^http://(csi|encrypted-tbn\d|g0|[\w-]+\.metric|ssl|t\d)\.gstatic\.com/"
		to="https://$1.gstatic.com/" />

	<rule from="^http://api\.recaptcha\.net/"
		to="https://www.google.com/recaptcha/api/" />

	<rule from="^http://api-secure\.recaptcha\.net/"
		to="https://api-secure.recaptcha.net/" />

	<rule from="^http://gdata\.youtube\.com/"
		to="https://gdata.youtube.com/" />

</ruleset>