mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-27 20:03:45 +03:00
Merge branch 'development' into production
This commit is contained in:
commit
e6d5be6e56
|
@ -21,7 +21,7 @@ I believe __information mustn't be blocked based on political or other subjectiv
|
||||||
|
|
||||||
My maxim is _"Your freedom ends when it starts to confine the freedom of others"_.
|
My maxim is _"Your freedom ends when it starts to confine the freedom of others"_.
|
||||||
|
|
||||||
See [my other arguments against censorship (ru)](https://gist.github.com/ilyaigpetrov/9452b93ef3d7dd3d8cc2)
|
See [my other arguments against censorship (ru)](https://rebrand.ly/ac-arguments)
|
||||||
|
|
||||||
Looking at how Russian government [distorts TV](https://therussianreader.wordpress.com/2015/11/22/russian-truckers-strike-dagestan/) and blocks [critics of Putin](http://www.reuters.com/article/2014/03/13/us-russia-internet-idUSBREA2C21L20140313),
|
Looking at how Russian government [distorts TV](https://therussianreader.wordpress.com/2015/11/22/russian-truckers-strike-dagestan/) and blocks [critics of Putin](http://www.reuters.com/article/2014/03/13/us-russia-internet-idUSBREA2C21L20140313),
|
||||||
I decided to write an anticensorship extension for Chromium before they strike me first.
|
I decided to write an anticensorship extension for Chromium before they strike me first.
|
||||||
|
@ -37,7 +37,7 @@ I decided to write an anticensorship extension for Chromium before they strike m
|
||||||
## Contributors
|
## Contributors
|
||||||
|
|
||||||
This project exists thanks to all the people who contribute.
|
This project exists thanks to all the people who contribute.
|
||||||
<a href="graphs/contributors"><img src="https://opencollective.com/anticensority/contributors.svg?width=890&button=false" /></a>
|
<a href="graphs/contributors"><img src="https://opencollective.com/anticensority/contributors.svg?width=890&button=false?force" /></a>
|
||||||
|
|
||||||
|
|
||||||
## Backers
|
## Backers
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
# Install
|
# Install
|
||||||
|
|
||||||
Nodejs 10 and gulp have [issues](https://github.com/nodejs/node/issues/20285),
|
|
||||||
use nodejs 8 instead for a while.
|
|
||||||
|
|
||||||
```
|
```
|
||||||
npm install
|
npm install
|
||||||
cd src/extension-common/pages/options/
|
cd src/extension-common/pages/options/
|
||||||
|
@ -14,10 +11,7 @@ use your build/extension-beta
|
||||||
|
|
||||||
# Release
|
# Release
|
||||||
|
|
||||||
1. `vim src/extension-common/pages/options/src/components/App.js`
|
1. `npm run release`
|
||||||
2. Change github link there.
|
2. `vim src/templates-data.js` and bump version.
|
||||||
3. `npm run release`
|
3. Commit bumped version.
|
||||||
4. Change `App.js` back to original: `git checkout src/extension-common/pages/options/src/components/App.js`
|
4. Merge development to production (usually after deployment and testing and many patches).
|
||||||
5. `vim src/templates-data.js` and bump version.
|
|
||||||
6. Commit bumped version.
|
|
||||||
7. Merge development to production (usually after deployment and testing and many patches).
|
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
Если расширение не работает: https://git.io/vgDDj
|
Если расширение не работает: https://git.io/vgDDj
|
||||||
|
|
||||||
Антицензура на Реддите: https://www.reddit.com/r/anticensorship_russia
|
Антицензура на Реддите: https://www.reddit.com/r/anticensorship_russia
|
||||||
Группа в G+: https://goo.gl/Lh0Cjh
|
История изменений: https://github.com/anticensority/runet-censorship-bypass/releases
|
||||||
История изменений: https://github.com/ilyaigpetrov/anti-censorship-russia/releases
|
|
||||||
|
|
||||||
# Дополнительно
|
# Дополнительно
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
const gulp = require('gulp');
|
const gulp = require('gulp');
|
||||||
const del = require('del');
|
const del = require('del');
|
||||||
const through = require('through2');
|
const through = require('through2');
|
||||||
const PluginError = require('gulp-util').PluginError;
|
const PluginError = require('plugin-error');
|
||||||
const changed = require('gulp-changed');
|
const changed = require('gulp-changed');
|
||||||
|
|
||||||
const PluginName = 'Template literals';
|
const PluginName = 'Template literals';
|
||||||
|
@ -29,7 +29,7 @@ const templatePlugin = (context) => through.obj(function(file, encoding, cb) {
|
||||||
|
|
||||||
}, { keys: [], values: [] });
|
}, { keys: [], values: [] });
|
||||||
try {
|
try {
|
||||||
file.contents = new Buffer(
|
file.contents = Buffer.from(
|
||||||
(new Function(...keys, 'return `' + String(file.contents) + '`;'))(...values)
|
(new Function(...keys, 'return `' + String(file.contents) + '`;'))(...values)
|
||||||
);
|
);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
@ -43,14 +43,13 @@ const templatePlugin = (context) => through.obj(function(file, encoding, cb) {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('default', ['build:beta']);
|
|
||||||
|
|
||||||
gulp.task('clean', function(cb) {
|
const clean = function(cb) {
|
||||||
|
|
||||||
//return del.sync('./build');
|
//return del.sync('./build');
|
||||||
return cb();
|
return cb();
|
||||||
|
|
||||||
});
|
};
|
||||||
|
|
||||||
const contexts = require('./src/templates-data').contexts;
|
const contexts = require('./src/templates-data').contexts;
|
||||||
|
|
||||||
|
@ -69,16 +68,16 @@ const firefoxSrc = './src/extension-firefox/**/*';
|
||||||
|
|
||||||
const joinSrc = (...args) => [...args, ...excluded];
|
const joinSrc = (...args) => [...args, ...excluded];
|
||||||
|
|
||||||
gulp.task('_cp-mini', function(cb) {
|
const copyMini = function(cb) {
|
||||||
|
|
||||||
gulp.src(joinSrc(commonSrc, miniSrc))
|
gulp.src(joinSrc(commonSrc, miniSrc))
|
||||||
//.pipe(changed(miniDst))
|
//.pipe(changed(miniDst))
|
||||||
.pipe(templatePlugin(contexts.mini))
|
.pipe(templatePlugin(contexts.mini))
|
||||||
.pipe(gulp.dest(miniDst))
|
.pipe(gulp.dest(miniDst))
|
||||||
.on('end', cb);
|
.on('end', cb);
|
||||||
});
|
};
|
||||||
|
|
||||||
gulp.task('_cp-full', function(cb) {
|
const copyFull = function(cb) {
|
||||||
|
|
||||||
gulp.src(joinSrc(commonSrc, fullSrc))
|
gulp.src(joinSrc(commonSrc, fullSrc))
|
||||||
//.pipe(changed(fullDst))
|
//.pipe(changed(fullDst))
|
||||||
|
@ -86,19 +85,9 @@ gulp.task('_cp-full', function(cb) {
|
||||||
.pipe(gulp.dest(fullDst))
|
.pipe(gulp.dest(fullDst))
|
||||||
.on('end', cb);
|
.on('end', cb);
|
||||||
|
|
||||||
});
|
};
|
||||||
|
|
||||||
gulp.task('_cp-firefox', function(cb) {
|
const copyBeta = function(cb) {
|
||||||
|
|
||||||
gulp.src(joinSrc(commonSrc, fullSrc, firefoxSrc))
|
|
||||||
//.pipe(changed(fullDst))
|
|
||||||
.pipe(templatePlugin(contexts.firefox))
|
|
||||||
.pipe(gulp.dest(firefoxDst))
|
|
||||||
.on('end', cb);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('_cp-beta', function(cb) {
|
|
||||||
|
|
||||||
gulp.src(joinSrc(commonSrc, fullSrc))
|
gulp.src(joinSrc(commonSrc, fullSrc))
|
||||||
//.pipe(changed(fullDst))
|
//.pipe(changed(fullDst))
|
||||||
|
@ -106,8 +95,13 @@ gulp.task('_cp-beta', function(cb) {
|
||||||
.pipe(gulp.dest(betaDst))
|
.pipe(gulp.dest(betaDst))
|
||||||
.on('end', cb);
|
.on('end', cb);
|
||||||
|
|
||||||
});
|
};
|
||||||
|
|
||||||
gulp.task('build:all', ['_cp-mini', '_cp-full', '_cp-beta', '_cp-firefox']);
|
const buildAll = gulp.parallel(copyMini, copyFull, copyBeta);
|
||||||
gulp.task('build:beta', ['_cp-beta']);
|
const buildBeta = copyBeta;
|
||||||
gulp.task('build:firefox', ['_cp-firefox']);
|
|
||||||
|
module.exports = {
|
||||||
|
default: buildAll,
|
||||||
|
buildAll,
|
||||||
|
buildBeta,
|
||||||
|
};
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -8,8 +8,8 @@
|
||||||
"test": "mocha --recursive ./src/**/test/*",
|
"test": "mocha --recursive ./src/**/test/*",
|
||||||
"subpages": "cd ./src/extension-common/pages/options/ && npm run build && cd -",
|
"subpages": "cd ./src/extension-common/pages/options/ && npm run build && cd -",
|
||||||
"subpages:dev": "cd ./src/extension-common/pages/options/ && npm run build:dev:nocomp && cd -",
|
"subpages:dev": "cd ./src/extension-common/pages/options/ && npm run build:dev:nocomp && cd -",
|
||||||
"start": "npm run subpages:dev && npm run gulp build:beta",
|
"start": "npm run subpages:dev && npm run gulp buildAll",
|
||||||
"release": "npm run subpages && npm run gulp build:all"
|
"release": "npm run subpages && npm run gulp buildAll"
|
||||||
},
|
},
|
||||||
"author": "Ilya Ig. Petrov",
|
"author": "Ilya Ig. Petrov",
|
||||||
"license": "GPLv3",
|
"license": "GPLv3",
|
||||||
|
@ -23,8 +23,9 @@
|
||||||
"symlink-to": "^0.0.4"
|
"symlink-to": "^0.0.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"del": "^2.2.2",
|
"del": "^3.0.0",
|
||||||
"gulp": "^3.9.1",
|
"gulp": "^4.0.0",
|
||||||
"through2": "^2.0.3"
|
"plugin-error": "^1.0.1",
|
||||||
|
"through2": "^3.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,14 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Due to History
|
||||||
|
|
||||||
|
- *Async suffix usually means that function requires a cb.
|
||||||
|
It may not be related to async (returning a Promise).
|
||||||
|
This naming is confusing and should be reconsidered.
|
||||||
|
*/
|
||||||
|
|
||||||
{ // Private namespace starts.
|
{ // Private namespace starts.
|
||||||
|
|
||||||
const mandatory = window.utils.mandatory;
|
const mandatory = window.utils.mandatory;
|
||||||
|
@ -50,7 +58,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
const setPacAsync = function setPacAsync(
|
const setPacAsync = function setPacAsync(
|
||||||
pacData = mandatory(), cb = throwIfError
|
pacData = mandatory(), cb = throwIfError,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
|
@ -72,7 +80,7 @@
|
||||||
|
|
||||||
console.warn('Failed, other extension is in control.');
|
console.warn('Failed, other extension is in control.');
|
||||||
return cb(
|
return cb(
|
||||||
new Error( window.utils.messages.whichExtensionHtml() )
|
new Error( window.utils.messages.whichExtensionHtml() ),
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -91,20 +99,20 @@
|
||||||
|
|
||||||
cb = asyncLogGroup(
|
cb = asyncLogGroup(
|
||||||
'Getting IPs for PAC hosts...',
|
'Getting IPs for PAC hosts...',
|
||||||
cb
|
cb,
|
||||||
);
|
);
|
||||||
window.utils.fireRequest('ip-to-host-update-all', cb);
|
window.utils.fireRequest('ip-to-host-update-all', cb);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const setPacScriptFromProviderAsync = async function setPacScriptFromProviderAsync(
|
const setPacScriptFromProviderAsync = function setPacScriptFromProviderAsync(
|
||||||
provider, lastModifiedStr = mandatory(), cb = throwIfError
|
provider, lastModifiedStr = mandatory(), cb = throwIfError,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
const pacUrl = provider.pacUrls[0];
|
const pacUrl = provider.pacUrls[0];
|
||||||
cb = asyncLogGroup(
|
cb = asyncLogGroup(
|
||||||
'Getting PAC script from provider...', pacUrl,
|
'Getting PAC script from provider...', pacUrl,
|
||||||
cb
|
cb,
|
||||||
);
|
);
|
||||||
|
|
||||||
const warnings = [];
|
const warnings = [];
|
||||||
|
@ -119,9 +127,8 @@
|
||||||
addWarning(
|
addWarning(
|
||||||
\`
|
\`
|
||||||
Не найдено СВОИХ прокси. Этот PAC-скрипт
|
Не найдено СВОИХ прокси. Этот PAC-скрипт
|
||||||
<a href="https://github.com/anticensority/runet-censorship-bypass/issues/10#issuecomment-387436191">теперь</a>
|
|
||||||
работает только со <a href="https://git.io/ac-own-proxy">СВОИМИ прокси</a>
|
работает только со <a href="https://git.io/ac-own-proxy">СВОИМИ прокси</a>
|
||||||
(по умолчанию используется локальный <a href="https://git.io/ac-tor">TOR</a> и прокси "Антизапрет", для их отключения: Свои прокси -> откл. "Использовать прокси PAC-скрипта").
|
(по умолчанию будет использоваться локальный <a href="https://git.io/ac-tor">Tor</a>).
|
||||||
\`,
|
\`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -131,15 +138,14 @@
|
||||||
httpLib.ifModifiedSince(pacUrl, lastModifiedStr, (err, newLastModifiedStr) => {
|
httpLib.ifModifiedSince(pacUrl, lastModifiedStr, (err, newLastModifiedStr) => {
|
||||||
|
|
||||||
if (!newLastModifiedStr) {
|
if (!newLastModifiedStr) {
|
||||||
const res = {lastModified: lastModifiedStr};
|
|
||||||
const ifWasEverModified = lastModifiedStr !== new Date(0).toUTCString();
|
const ifWasEverModified = lastModifiedStr !== new Date(0).toUTCString();
|
||||||
if (ifWasEverModified) {
|
if (ifWasEverModified) {
|
||||||
|
|
||||||
addWarning(
|
addWarning(
|
||||||
'Ваш PAC-скрипт не нуждается в обновлении. Его дата: ' +
|
'Ваш PAC-скрипт не нуждается в обновлении. Его дата: ' +
|
||||||
lastModifiedStr
|
lastModifiedStr,
|
||||||
);
|
);
|
||||||
|
const res = {lastModified: lastModifiedStr};
|
||||||
return cb(null, res);
|
return cb(null, res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -150,11 +156,11 @@
|
||||||
() => new Promise(
|
() => new Promise(
|
||||||
(resolve, reject) => httpLib.get(
|
(resolve, reject) => httpLib.get(
|
||||||
url,
|
url,
|
||||||
(newErr, pacData) => newErr ? reject(newErr) : resolve(pacData)
|
(newErr, pacData) => newErr ? reject(newErr) : resolve(pacData),
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
Promise.reject()
|
),
|
||||||
|
),
|
||||||
|
Promise.reject(),
|
||||||
);
|
);
|
||||||
|
|
||||||
pacDataPromise.then(
|
pacDataPromise.then(
|
||||||
|
@ -166,7 +172,7 @@
|
||||||
(err, res) => cb(
|
(err, res) => cb(
|
||||||
err,
|
err,
|
||||||
Object.assign(res || {}, {lastModified: newLastModifiedStr}),
|
Object.assign(res || {}, {lastModified: newLastModifiedStr}),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -223,7 +229,7 @@
|
||||||
order: 99,
|
order: 99,
|
||||||
pacUrls: [
|
pacUrls: [
|
||||||
'data:application/x-ns-proxy-autoconfig,' + escape('function FindProxyForURL(){ return "DIRECT"; }'),
|
'data:application/x-ns-proxy-autoconfig,' + escape('function FindProxyForURL(){ return "DIRECT"; }'),
|
||||||
]
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -239,6 +245,12 @@
|
||||||
Do something, e.g. initiate PAC sync.
|
Do something, e.g. initiate PAC sync.
|
||||||
*/
|
*/
|
||||||
ifFirstInstall: false,
|
ifFirstInstall: false,
|
||||||
|
/* We have .lastPacUpdateStamp and ._currentPacProviderLastModified.
|
||||||
|
LastModified is received from a server, we kind of don't trust it,
|
||||||
|
just use it for cache and maybe show to the user.
|
||||||
|
UpdateStamp is got from client and we base our timers on it,
|
||||||
|
malicious server can't interfere with it.
|
||||||
|
*/
|
||||||
lastPacUpdateStamp: 0,
|
lastPacUpdateStamp: 0,
|
||||||
|
|
||||||
setTitle() {
|
setTitle() {
|
||||||
|
@ -251,7 +263,7 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_currentPacProviderLastModified: 0, // Not initialized.
|
_currentPacProviderLastModified: 0,
|
||||||
|
|
||||||
getLastModifiedForKey(key = mandatory()) {
|
getLastModifiedForKey(key = mandatory()) {
|
||||||
|
|
||||||
|
@ -284,7 +296,7 @@
|
||||||
|
|
||||||
setCurrentPacProviderKey(
|
setCurrentPacProviderKey(
|
||||||
newKey = mandatory(),
|
newKey = mandatory(),
|
||||||
lastModified = new Date().toUTCString()
|
lastModified = new Date().toUTCString(),
|
||||||
) {
|
) {
|
||||||
|
|
||||||
this.mustBeKey(newKey);
|
this.mustBeKey(newKey);
|
||||||
|
@ -324,7 +336,7 @@
|
||||||
chrome.storage.local.clear(
|
chrome.storage.local.clear(
|
||||||
() => chrome.storage.local.set(
|
() => chrome.storage.local.set(
|
||||||
onlySettable,
|
onlySettable,
|
||||||
chromified(cb)
|
chromified(cb),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -368,8 +380,8 @@
|
||||||
|
|
||||||
const ipsErrorPromise = new Promise(
|
const ipsErrorPromise = new Promise(
|
||||||
(resolve, reject) => updatePacProxyIps(
|
(resolve, reject) => updatePacProxyIps(
|
||||||
resolve
|
resolve,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
Promise.all([pacSetPromise, ipsErrorPromise]).then(
|
Promise.all([pacSetPromise, ipsErrorPromise]).then(
|
||||||
|
@ -383,7 +395,7 @@
|
||||||
warns.push(ipsErr);
|
warns.push(ipsErr);
|
||||||
}
|
}
|
||||||
this.pushToStorageAsync(
|
this.pushToStorageAsync(
|
||||||
(pushErr) => cb(pacErr || pushErr, null, ...warns)
|
(pushErr) => cb(pacErr || pushErr, null, ...warns),
|
||||||
);
|
);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -410,7 +422,7 @@
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
'Next PAC update is scheduled on',
|
'Next PAC update is scheduled on',
|
||||||
new Date(nextUpdateMoment).toLocaleString('ru-RU')
|
new Date(nextUpdateMoment).toLocaleString('ru-RU'),
|
||||||
);
|
);
|
||||||
|
|
||||||
chrome.alarms.create(
|
chrome.alarms.create(
|
||||||
|
@ -453,11 +465,11 @@
|
||||||
}
|
}
|
||||||
this.setCurrentPacProviderKey(null);
|
this.setCurrentPacProviderKey(null);
|
||||||
this.pushToStorageAsync(
|
this.pushToStorageAsync(
|
||||||
() => handlers.updateControlState(cb)
|
() => handlers.updateControlState(cb),
|
||||||
);
|
);
|
||||||
|
|
||||||
})
|
}),
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -485,7 +497,7 @@
|
||||||
if (alarm.name === antiCensorRu._periodicUpdateAlarmReason) {
|
if (alarm.name === antiCensorRu._periodicUpdateAlarmReason) {
|
||||||
console.log(
|
console.log(
|
||||||
'Periodic PAC update triggered:',
|
'Periodic PAC update triggered:',
|
||||||
new Date().toLocaleString('ru-RU')
|
new Date().toLocaleString('ru-RU'),
|
||||||
);
|
);
|
||||||
antiCensorRu.syncWithPacProviderAsync(() => {/* swallow */});
|
antiCensorRu.syncWithPacProviderAsync(() => {/* swallow */});
|
||||||
}
|
}
|
||||||
|
@ -525,7 +537,7 @@
|
||||||
|| antiCensorRu._currentPacProviderLastModified;
|
|| antiCensorRu._currentPacProviderLastModified;
|
||||||
console.log(
|
console.log(
|
||||||
'Last PAC update was on',
|
'Last PAC update was on',
|
||||||
new Date(antiCensorRu.lastPacUpdateStamp).toLocaleString('ru-RU')
|
new Date(antiCensorRu.lastPacUpdateStamp).toLocaleString('ru-RU'),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
"icons": {
|
"icons": {
|
||||||
"128": "/icons/default-128.png"
|
"128": "/icons/default-128.png"
|
||||||
},
|
},
|
||||||
"author": "ilyaigpetrov@gmail.com",
|
"author": "anticensority+owners@googlegroups.com",
|
||||||
|
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"proxy"
|
"proxy"
|
||||||
|
|
|
@ -1096,7 +1096,8 @@
|
||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"aproba": {
|
"aproba": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
|
@ -1147,7 +1148,8 @@
|
||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "0.4.2",
|
"version": "0.4.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"bcrypt-pbkdf": {
|
"bcrypt-pbkdf": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
|
@ -1162,6 +1164,7 @@
|
||||||
"version": "0.0.9",
|
"version": "0.0.9",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"inherits": "~2.0.0"
|
"inherits": "~2.0.0"
|
||||||
}
|
}
|
||||||
|
@ -1170,6 +1173,7 @@
|
||||||
"version": "2.10.1",
|
"version": "2.10.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"hoek": "2.x.x"
|
"hoek": "2.x.x"
|
||||||
}
|
}
|
||||||
|
@ -1178,6 +1182,7 @@
|
||||||
"version": "1.1.7",
|
"version": "1.1.7",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"balanced-match": "^0.4.1",
|
"balanced-match": "^0.4.1",
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
|
@ -1186,7 +1191,8 @@
|
||||||
"buffer-shims": {
|
"buffer-shims": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"caseless": {
|
"caseless": {
|
||||||
"version": "0.12.0",
|
"version": "0.12.0",
|
||||||
|
@ -1203,12 +1209,14 @@
|
||||||
"code-point-at": {
|
"code-point-at": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"combined-stream": {
|
"combined-stream": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"delayed-stream": "~1.0.0"
|
"delayed-stream": "~1.0.0"
|
||||||
}
|
}
|
||||||
|
@ -1216,22 +1224,26 @@
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"console-control-strings": {
|
"console-control-strings": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"cryptiles": {
|
"cryptiles": {
|
||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"boom": "2.x.x"
|
"boom": "2.x.x"
|
||||||
}
|
}
|
||||||
|
@ -1271,7 +1283,8 @@
|
||||||
"delayed-stream": {
|
"delayed-stream": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"delegates": {
|
"delegates": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -1303,7 +1316,8 @@
|
||||||
"extsprintf": {
|
"extsprintf": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"forever-agent": {
|
"forever-agent": {
|
||||||
"version": "0.6.1",
|
"version": "0.6.1",
|
||||||
|
@ -1325,12 +1339,14 @@
|
||||||
"fs.realpath": {
|
"fs.realpath": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"fstream": {
|
"fstream": {
|
||||||
"version": "1.0.11",
|
"version": "1.0.11",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"graceful-fs": "^4.1.2",
|
"graceful-fs": "^4.1.2",
|
||||||
"inherits": "~2.0.0",
|
"inherits": "~2.0.0",
|
||||||
|
@ -1386,6 +1402,7 @@
|
||||||
"version": "7.1.2",
|
"version": "7.1.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"fs.realpath": "^1.0.0",
|
"fs.realpath": "^1.0.0",
|
||||||
"inflight": "^1.0.4",
|
"inflight": "^1.0.4",
|
||||||
|
@ -1398,7 +1415,8 @@
|
||||||
"graceful-fs": {
|
"graceful-fs": {
|
||||||
"version": "4.1.11",
|
"version": "4.1.11",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"har-schema": {
|
"har-schema": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
|
@ -1426,6 +1444,7 @@
|
||||||
"version": "3.1.3",
|
"version": "3.1.3",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"boom": "2.x.x",
|
"boom": "2.x.x",
|
||||||
"cryptiles": "2.x.x",
|
"cryptiles": "2.x.x",
|
||||||
|
@ -1436,7 +1455,8 @@
|
||||||
"hoek": {
|
"hoek": {
|
||||||
"version": "2.16.3",
|
"version": "2.16.3",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"http-signature": {
|
"http-signature": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
|
@ -1453,6 +1473,7 @@
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"once": "^1.3.0",
|
"once": "^1.3.0",
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
|
@ -1461,7 +1482,8 @@
|
||||||
"inherits": {
|
"inherits": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"ini": {
|
"ini": {
|
||||||
"version": "1.3.4",
|
"version": "1.3.4",
|
||||||
|
@ -1473,6 +1495,7 @@
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"number-is-nan": "1.0.1"
|
"number-is-nan": "1.0.1"
|
||||||
}
|
}
|
||||||
|
@ -1486,7 +1509,8 @@
|
||||||
"isarray": {
|
"isarray": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"isstream": {
|
"isstream": {
|
||||||
"version": "0.1.2",
|
"version": "0.1.2",
|
||||||
|
@ -1559,12 +1583,14 @@
|
||||||
"mime-db": {
|
"mime-db": {
|
||||||
"version": "1.27.0",
|
"version": "1.27.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"mime-types": {
|
"mime-types": {
|
||||||
"version": "2.1.15",
|
"version": "2.1.15",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"mime-db": "1.27.0"
|
"mime-db": "1.27.0"
|
||||||
}
|
}
|
||||||
|
@ -1573,6 +1599,7 @@
|
||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "1.1.7"
|
"brace-expansion": "1.1.7"
|
||||||
}
|
}
|
||||||
|
@ -1580,12 +1607,14 @@
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"mkdirp": {
|
"mkdirp": {
|
||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "0.0.8"
|
||||||
}
|
}
|
||||||
|
@ -1640,7 +1669,8 @@
|
||||||
"number-is-nan": {
|
"number-is-nan": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"oauth-sign": {
|
"oauth-sign": {
|
||||||
"version": "0.8.2",
|
"version": "0.8.2",
|
||||||
|
@ -1658,6 +1688,7 @@
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
|
@ -1687,7 +1718,8 @@
|
||||||
"path-is-absolute": {
|
"path-is-absolute": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"performance-now": {
|
"performance-now": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
|
@ -1698,7 +1730,8 @@
|
||||||
"process-nextick-args": {
|
"process-nextick-args": {
|
||||||
"version": "1.0.7",
|
"version": "1.0.7",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"punycode": {
|
"punycode": {
|
||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
|
@ -1736,6 +1769,7 @@
|
||||||
"version": "2.2.9",
|
"version": "2.2.9",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"buffer-shims": "~1.0.0",
|
"buffer-shims": "~1.0.0",
|
||||||
"core-util-is": "~1.0.0",
|
"core-util-is": "~1.0.0",
|
||||||
|
@ -1780,6 +1814,7 @@
|
||||||
"version": "2.6.1",
|
"version": "2.6.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"glob": "^7.0.5"
|
"glob": "^7.0.5"
|
||||||
}
|
}
|
||||||
|
@ -1787,7 +1822,8 @@
|
||||||
"safe-buffer": {
|
"safe-buffer": {
|
||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "5.3.0",
|
"version": "5.3.0",
|
||||||
|
@ -1811,6 +1847,7 @@
|
||||||
"version": "1.0.9",
|
"version": "1.0.9",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"hoek": "2.x.x"
|
"hoek": "2.x.x"
|
||||||
}
|
}
|
||||||
|
@ -1844,6 +1881,7 @@
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"code-point-at": "^1.0.0",
|
"code-point-at": "^1.0.0",
|
||||||
"is-fullwidth-code-point": "^1.0.0",
|
"is-fullwidth-code-point": "^1.0.0",
|
||||||
|
@ -1854,6 +1892,7 @@
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "^5.0.1"
|
"safe-buffer": "^5.0.1"
|
||||||
}
|
}
|
||||||
|
@ -1868,6 +1907,7 @@
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
}
|
}
|
||||||
|
@ -1882,6 +1922,7 @@
|
||||||
"version": "2.2.1",
|
"version": "2.2.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"block-stream": "*",
|
"block-stream": "*",
|
||||||
"fstream": "^1.0.2",
|
"fstream": "^1.0.2",
|
||||||
|
@ -1937,7 +1978,8 @@
|
||||||
"util-deprecate": {
|
"util-deprecate": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"uuid": {
|
"uuid": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
|
@ -1966,7 +2008,8 @@
|
||||||
"wrappy": {
|
"wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -69,31 +69,21 @@
|
||||||
|
|
||||||
const reinit = function reinit() {
|
const reinit = function reinit() {
|
||||||
|
|
||||||
// Defaults.
|
|
||||||
const _antizapret = {
|
|
||||||
/* Don't use directly, please.
|
/* Don't use directly, please.
|
||||||
Encoded to counter abuse. */
|
Encoded to counter abuse.
|
||||||
host: '\x70\x72\x6f\x78\x79\x2e\x61\x6e\x74\x69\x7a\x61\x70\x72\x65\x74\x2e\x70\x72\x6f\x73\x74\x6f\x76\x70\x6e\x2e\x6f\x72\x67',
|
*/
|
||||||
};
|
privates._strToHostObj = [
|
||||||
const proxyForRanges =
|
// antizapret.prostovpn.org:
|
||||||
'\x63\x63\x61\x68\x69\x68\x61\x2e\x61\x6e\x74\x69\x7a\x61\x70\x72\x65\x74\x2e\x70\x72\x6f\x73\x74\x6f\x76\x70\x6e\x2e\x6f\x72\x67';
|
'\x70\x72\x6f\x78\x79\x2e\x61\x6e\x74\x69\x7a\x61\x70\x72\x65\x74\x2e\x70\x72\x6f\x73\x74\x6f\x76\x70\x6e\x2e\x6f\x72\x67', // Antizapret old.
|
||||||
privates._strToHostObj = {
|
'\x63\x63\x61\x68\x69\x68\x61\x2e\x61\x6e\x74\x69\x7a\x61\x70\x72\x65\x74\x2e\x70\x72\x6f\x73\x74\x6f\x76\x70\x6e\x2e\x6f\x72\x67', // Antizapret for ranges.
|
||||||
[_antizapret.host]: _antizapret,
|
'\x70\x72\x6f\x78\x79\x2d\x73\x73\x6c\x2e\x61\x6e\x74\x69\x7a\x61\x70\x72\x65\x74\x2e\x70\x72\x6f\x73\x74\x6f\x76\x70\x6e\x2e\x6f\x72\x67', // Antizapret SSL.
|
||||||
[proxyForRanges]: { host: proxyForRanges },
|
'\x70\x72\x6f\x78\x79\x2d\x6e\x6f\x73\x73\x6c\x2e\x61\x6e\x74\x69\x7a\x61\x70\x72\x65\x74\x2e\x70\x72\x6f\x73\x74\x6f\x76\x70\x6e\x2e\x6f\x72\x67', // Antizapret w/o SSL.
|
||||||
['localhost']: { host: 'localhost' },
|
].reduce((acc, hostname) => ({...acc, [hostname]: { host: hostname }}), {
|
||||||
};
|
// Defaults:
|
||||||
|
localhost: { host: 'localhost' },
|
||||||
|
});
|
||||||
|
|
||||||
privates._ipToHostObj = {};
|
privates._ipToHostObj = {};
|
||||||
for( const ip of [
|
|
||||||
// IPs of Antizapret.
|
|
||||||
'195.123.209.38',
|
|
||||||
'137.74.171.91',
|
|
||||||
'51.15.39.201',
|
|
||||||
'2001:bc8:4700:2300::1:d07',
|
|
||||||
'2a02:27ac::10',
|
|
||||||
] ) {
|
|
||||||
privates._ipToHostObj[ip] = _antizapret;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Persisted.
|
// Persisted.
|
||||||
const ipToHost = _state(ip2host);
|
const ipToHost = _state(ip2host);
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
to "loading".
|
to "loading".
|
||||||
So if you set a title earlier it may be cleared by browser.
|
So if you set a title earlier it may be cleared by browser.
|
||||||
It pertains not only to page refesh but to newly opened pages too.
|
It pertains not only to page refesh but to newly opened pages too.
|
||||||
Also on loosing title see:
|
|
||||||
https://github.com/ilyaigpetrov/repository-for-chrome-bugs/blob/master/browserAction-title-lost-after-setting/background.js
|
|
||||||
Crazy parallel Chrome.
|
Crazy parallel Chrome.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ const pacUrls = [
|
||||||
];
|
];
|
||||||
|
|
||||||
const commonContext = {
|
const commonContext = {
|
||||||
version: '1.29',
|
version: '1.30',
|
||||||
anticensorityPacUrls: [
|
anticensorityPacUrls: [
|
||||||
...pacUrls,
|
...pacUrls,
|
||||||
],
|
],
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "opencollective postinstall"
|
"postinstall": "opencollective postinstall"
|
||||||
},
|
},
|
||||||
"author": "ilyaigpetrov",
|
"author": "anticensority+owners@googlegroups.com",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"opencollective": "^1.0.3"
|
"opencollective": "^1.0.3"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user