Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8d1190d

Browse filesBrowse files
committed
Merge branch 'master' into translations-improvement
Conflicts: src/chrome/locale/ar/https-everywhere.dtd src/chrome/locale/bg/https-everywhere.dtd src/chrome/locale/ca/https-everywhere.dtd src/chrome/locale/cs/https-everywhere.dtd src/chrome/locale/da/https-everywhere.dtd src/chrome/locale/de/https-everywhere.dtd src/chrome/locale/el/https-everywhere.dtd src/chrome/locale/en_GB/https-everywhere.dtd src/chrome/locale/es/https-everywhere.dtd src/chrome/locale/et/https-everywhere.dtd src/chrome/locale/eu/https-everywhere.dtd src/chrome/locale/fa/https-everywhere.dtd src/chrome/locale/fi/https-everywhere.dtd src/chrome/locale/fo/https-everywhere.dtd src/chrome/locale/fr/https-everywhere.dtd src/chrome/locale/fr_CA/https-everywhere.dtd src/chrome/locale/he/https-everywhere.dtd src/chrome/locale/hr_HR/https-everywhere.dtd src/chrome/locale/hu/https-everywhere.dtd src/chrome/locale/it/https-everywhere.dtd src/chrome/locale/ja/https-everywhere.dtd src/chrome/locale/km/https-everywhere.dtd src/chrome/locale/ko/https-everywhere.dtd src/chrome/locale/lt/https-everywhere.dtd src/chrome/locale/lv/https-everywhere.dtd src/chrome/locale/ms_MY/https-everywhere.dtd src/chrome/locale/nb/https-everywhere.dtd src/chrome/locale/nl/https-everywhere.dtd src/chrome/locale/pl/https-everywhere.dtd src/chrome/locale/pt/https-everywhere.dtd src/chrome/locale/pt_BR/https-everywhere.dtd src/chrome/locale/ro/https-everywhere.dtd src/chrome/locale/ru/https-everywhere.dtd src/chrome/locale/si_LK/https-everywhere.dtd src/chrome/locale/sk/https-everywhere.dtd src/chrome/locale/sk_SK/https-everywhere.dtd src/chrome/locale/sl/https-everywhere.dtd src/chrome/locale/sl_SI/https-everywhere.dtd src/chrome/locale/sq/https-everywhere.dtd src/chrome/locale/sr/https-everywhere.dtd src/chrome/locale/sv/https-everywhere.dtd src/chrome/locale/th/https-everywhere.dtd src/chrome/locale/tr/https-everywhere.dtd src/chrome/locale/uk/https-everywhere.dtd src/chrome/locale/zh-CN/https-everywhere.dtd src/chrome/locale/zh_TW/https-everywhere.dtd
2 parents 854f4cd + abeb7d2 commit 8d1190d
Copy full SHA for 8d1190d

25 files changed

+495-177Lines changed: 495 additions & 177 deletions
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎chromium/background.js‎

Copy file name to clipboardExpand all lines: chromium/background.js
+17-6Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @param url: a relative URL to local XML
66
*/
7-
function getRuleXml(url) {
7+
function loadExtensionFile(url, returnType) {
88
var xhr = new XMLHttpRequest();
99
// Use blocking XHR to ensure everything is loaded by the time
1010
// we return.
@@ -14,14 +14,18 @@ function getRuleXml(url) {
1414
if (xhr.readyState != 4) {
1515
return;
1616
}
17-
return xhr.responseXML;
17+
if (returnType === 'xml') {
18+
return xhr.responseXML;
19+
}
20+
return xhr.responseText;
1821
}
1922

23+
2024
// Rules are loaded here
2125
var all_rules = new RuleSets(navigator.userAgent, LRUCache, localStorage);
22-
for (var i = 0; i < rule_list.length; i++) {
23-
all_rules.addFromXml(getRuleXml(rule_list[i]));
24-
}
26+
var rule_list = 'rules/default.rulesets';
27+
all_rules.addFromXml(loadExtensionFile(rule_list, 'xml'));
28+
2529

2630
var USER_RULE_KEY = 'userRules';
2731
// Records which tabId's are active in the HTTPS Switch Planner (see
@@ -504,7 +508,14 @@ function onBeforeRedirect(details) {
504508
}
505509

506510
// Registers the handler for requests
507-
wr.onBeforeRequest.addListener(onBeforeRequest, {urls: ["https://*/*", "http://*/*"]}, ["blocking"]);
511+
// We listen to all HTTP hosts, because RequestFilter can't handle tons of url restrictions.
512+
wr.onBeforeRequest.addListener(onBeforeRequest, {urls: ["http://*/*"]}, ["blocking"]);
513+
514+
// TODO: Listen only to the tiny subset of HTTPS hosts that we rewrite/downgrade.
515+
var httpsUrlsWeListenTo = ["https://*/*"];
516+
// See: https://developer.chrome.com/extensions/match_patterns
517+
wr.onBeforeRequest.addListener(onBeforeRequest, {urls: httpsUrlsWeListenTo}, ["blocking"]);
518+
508519

509520
// Try to catch redirect loops on URLs we've redirected to HTTPS.
510521
wr.onBeforeRedirect.addListener(onBeforeRedirect, {urls: ["https://*/*"]});
Collapse file

‎chromium/manifest.json‎

Copy file name to clipboardExpand all lines: chromium/manifest.json
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"background": {
66
"scripts": [
77
"lru.js",
8-
"rule_list.js",
98
"rules.js",
109
"util.js",
1110
"background.js"
Collapse file

‎chromium/rule_list.js‎

Copy file name to clipboardExpand all lines: chromium/rule_list.js
-3Lines changed: 0 additions & 3 deletions
This file was deleted.
Collapse file

‎chromium/util.js‎

Copy file name to clipboardExpand all lines: chromium/util.js
+8-6Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
VERB=1;
2-
DBUG=2;
3-
INFO=3;
4-
NOTE=4;
5-
WARN=5;
1+
"use strict";
2+
3+
var VERB=1;
4+
var DBUG=2;
5+
var INFO=3;
6+
var NOTE=4;
7+
var WARN=5;
68
// FYI: Logging everything is /very/ slow. Chrome will log & buffer
79
// these console logs even when the debug tools are closed. :(
810

911
// TODO: Add an easy UI to change the log level.
1012
// (Developers can just type DEFAULT_LOG_LEVEL=1 in the console)
11-
DEFAULT_LOG_LEVEL=4;
13+
var DEFAULT_LOG_LEVEL=4;
1214
console.log("Hey developer! Want to see more verbose logging?");
1315
console.log("Type this into the console: DEFAULT_LOG_LEVEL=1");
1416

Collapse file

‎src/chrome/content/code/ApplicableList.js‎

Copy file name to clipboardExpand all lines: src/chrome/content/code/ApplicableList.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ ApplicableList.prototype = {
228228
var item = this.document.createElement('menuitem');
229229
item.setAttribute('command', rule.id+'-command');
230230
item.setAttribute('class', type+'-item menuitem-iconic');
231+
item.setAttribute('type', 'checkbox');
231232
item.setAttribute('label', rule.name);
232233

233234
// we can get confused if rulesets have their state changed after the
Collapse file

‎src/chrome/content/rules/Admin.ch.xml‎

Copy file name to clipboardExpand all lines: src/chrome/content/rules/Admin.ch.xml
-40Lines changed: 0 additions & 40 deletions
This file was deleted.
Collapse file

‎src/chrome/content/rules/BR.xml‎

Copy file name to clipboard
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<ruleset name="Bayrischer Rundfunk">
2-
<target host="*.brreisen.de"/>
32

4-
<rule from="^http://www\.brreisen\.de/" to="https://www.brreisen.de/"/>
3+
<target host="br.de"/>
4+
<target host="*.br.de"/>
5+
<target host="www.brreisen.de"/>
6+
7+
<rule from="^http:"
8+
to="https:" />
9+
510
</ruleset>
Collapse file
+6-8Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
<!--
2-
Disabled by https-everywhere-checker because:
3-
Fetch error: http://bverfg.de/ => https://www.bundesverfassungsgericht.de/: (6, 'Could not resolve host: bverfg.de')
4-
-->
5-
<ruleset name="Bundesverfassungsgericht" default_off='failed ruleset test'>
1+
<ruleset name="Bundesverfassungsgericht.de">
62
<target host="www.bundesverfassungsgericht.de" />
73
<target host="bundesverfassungsgericht.de" />
84
<target host="www.bverfg.de" />
9-
<target host="bverfg.de" />
5+
<!-- no DNS entry for bverfg.de -->
106

11-
<rule from="^http://(?:www\.)?bundesverfassungsgericht\.de/" to="https://www.bundesverfassungsgericht.de/"/>
12-
<rule from="^http://(?:www\.)?bverfg\.de/" to="https://www.bundesverfassungsgericht.de/"/>
7+
<securecookie host="^(.*\.)?bundesverfassungsgericht\.de$" name=".+" />
8+
<securecookie host="^(.*\.)?bverfg\.de$" name=".+" />
9+
10+
<rule from="^http:" to="https:"/>
1311
</ruleset>
Collapse file

‎src/chrome/content/rules/CA-State-Board-of-Equalization.xml‎

Copy file name to clipboardExpand all lines: src/chrome/content/rules/CA-State-Board-of-Equalization.xml
+4-7Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
<!--
2-
Disabled by https-everywhere-checker because:
3-
Fetch error: http://boe.ca.gov/ => https://www.boe.ca.gov/: (60, 'SSL certificate problem: unable to get local issuer certificate')
4-
Fetch error: http://efile.boe.ca.gov/ => https://efile.boe.ca.gov/: (7, 'Failed to connect to efile.boe.ca.gov port 80: Connection refused')
5-
Fetch error: http://www.boe.ca.gov/ => https://www.boe.ca.gov/: (60, 'SSL certificate problem: unable to get local issuer certificate')
6-
-->
7-
<ruleset name="California State Board of Equalization" default_off='failed ruleset test'>
1+
<ruleset name="California State Board of Equalization">
82
<target host="boe.ca.gov" />
93
<target host="efile.boe.ca.gov" />
104
<target host="www.boe.ca.gov" />
115

126
<securecookie host="^(?:efile|www)\.boe\.ca\.gov$"
137
name=".+" />
148

9+
<test url="https://boe.ca.gov/" />
10+
<test url="http://efile.boe.ca.gov/ereg/" />
11+
1512
<rule from="^(?:http://(?:www\.)?|https://)boe\.ca\.gov/"
1613
to="https://www.boe.ca.gov/" />
1714
<rule from="^http://efile\.boe\.ca\.gov/"
Collapse file

‎src/chrome/content/rules/Fastly.net.xml‎

Copy file name to clipboardExpand all lines: src/chrome/content/rules/Fastly.net.xml
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<test url="http://www.example.com.global.prod.fastly.net/" />
3333
<test url="http://www.loveholidays.com.global.prod.fastly.net/" />
3434
<test url="http://www.cosmopolitan.com.global.prod.fastly.net/" />
35+
3536
<exclusion pattern="^http://purge\.fastly\.net/" />
3637
<test url="http://purge.fastly.net/" />
3738
<!-- Discourse forum software uses a font for its icons. When the HTTP URL
@@ -47,6 +48,12 @@
4748
<test url="http://virtual-host-discourse.global.ssl.fastly.net/assets/fontawesome-webfont-73827efc2a64a873027d05873d392cb6.eot?http://users.rust-lang.org&amp;amp;2&amp;v=4.3.0" />
4849
<test url="http://boingboing.global.ssl.fastly.net/assets/fontawesome-webfont-743c128c2e48ae20145724e61f9998b4.ttf?http://bbs.boingboing.net" />
4950

51+
<!-- Periscope.tv live streaming is broken by rewrite of player resources -->
52+
53+
<exclusion pattern="^http://periscope\-prod\-[\w.-]+\.global\.ssl\.fastly\.net" />
54+
<test url="http://periscope-prod-eu-central-1.global.ssl.fastly.net" />
55+
<test url="http://periscope-prod-us-west-1.global.ssl.fastly.net" />
56+
5057
<rule from="^http://assets1\.fastly\.com\.a\.prod\.fastly\.net/"
5158
to="https://fastly.a.ssl.fastly.net/" />
5259
<test url="http://assets1.fastly.com.a.prod.fastly.net/" />

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.