mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-23 18:03:44 +03:00
Use data-url instead of blob. Remove debug logs. Remove ccahiha.
This commit is contained in:
parent
94aefc8ddc
commit
5278c65c90
|
@ -541,11 +541,9 @@ ${
|
||||||
|
|
||||||
).then((details) => {
|
).then((details) => {
|
||||||
|
|
||||||
console.log('DEEETAILS:', details); // TODO:
|
|
||||||
if (
|
if (
|
||||||
details && details.levelOfControl === 'controlled_by_this_extension'
|
details && details.levelOfControl === 'controlled_by_this_extension'
|
||||||
) {
|
) {
|
||||||
console.log('TODODOODODODOD:', details); // TODO:
|
|
||||||
const pac = window.utils.getProp(details, 'value.pacScript');
|
const pac = window.utils.getProp(details, 'value.pacScript');
|
||||||
if (pac && pac.data) {
|
if (pac && pac.data) {
|
||||||
return chrome.proxy.settings.set(details, chromified(cb));
|
return chrome.proxy.settings.set(details, chromified(cb));
|
||||||
|
@ -553,7 +551,6 @@ ${
|
||||||
}
|
}
|
||||||
|
|
||||||
kitchenState(ifIncontinence, true);
|
kitchenState(ifIncontinence, true);
|
||||||
console.log('TYYYYPE ERRROR');
|
|
||||||
cb(null, null, new TypeError(
|
cb(null, null, new TypeError(
|
||||||
'Не найдено активного PAC-скрипта! Изменения будут применены при возвращении контроля настроек прокси или установке нового PAC-скрипта.'
|
'Не найдено активного PAC-скрипта! Изменения будут применены при возвращении контроля настроек прокси или установке нового PAC-скрипта.'
|
||||||
));
|
));
|
||||||
|
@ -652,9 +649,7 @@ ${
|
||||||
};
|
};
|
||||||
|
|
||||||
if (window.apis.platform.ifFirefox) {
|
if (window.apis.platform.ifFirefox) {
|
||||||
const autoConfigUrl = URL.createObjectURL(new Blob([cookedData], {
|
const autoConfigUrl = `data:application/x-ns-proxy-autoconfig,${escape(cookedData)}`;
|
||||||
type: 'application/x-ns-proxy-autoconfig',
|
|
||||||
}));
|
|
||||||
return originalSet({
|
return originalSet({
|
||||||
value: {
|
value: {
|
||||||
proxyType: 'autoConfig',
|
proxyType: 'autoConfig',
|
||||||
|
|
|
@ -99,7 +99,6 @@
|
||||||
console.log('Setting chrome proxy settings...');
|
console.log('Setting chrome proxy settings...');
|
||||||
chrome.proxy.settings.set( { value: config }, chromified((err) => {
|
chrome.proxy.settings.set( { value: config }, chromified((err) => {
|
||||||
|
|
||||||
console.log('ERRORR?:', err);
|
|
||||||
if (err) {
|
if (err) {
|
||||||
return cb(err);
|
return cb(err);
|
||||||
}
|
}
|
||||||
|
@ -183,21 +182,18 @@
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Promise.reject(),
|
Promise.reject(),
|
||||||
)/*
|
)
|
||||||
.catch(
|
.catch(
|
||||||
clarifyThen(
|
clarifyThen(
|
||||||
chrome.i18n.getMessage('FailedToDownloadPacScriptFromAddresses') + ': [ '
|
chrome.i18n.getMessage('FailedToDownloadPacScriptFromAddresses') + ': [ '
|
||||||
+ provider.pacUrls.join(' , ') + ' ].',
|
+ provider.pacUrls.join(' , ') + ' ].',
|
||||||
cb,
|
cb,
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
*/
|
|
||||||
);
|
);
|
||||||
|
|
||||||
pacDataPromise.then(
|
pacDataPromise.then(
|
||||||
|
|
||||||
(pacData) => {
|
(pacData) => {
|
||||||
|
|
||||||
setPacAsync(
|
setPacAsync(
|
||||||
pacData,
|
pacData,
|
||||||
(err, res) => cb(
|
(err, res) => cb(
|
||||||
|
@ -206,12 +202,6 @@
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
clarifyThen(
|
|
||||||
chrome.i18n.getMessage('FailedToDownloadPacScriptFromAddresses') + ': [ '
|
|
||||||
+ provider.pacUrls.join(' , ') + ' ].',
|
|
||||||
cb,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,6 @@
|
||||||
privates._strToHostObj = [
|
privates._strToHostObj = [
|
||||||
// antizapret.prostovpn.org:
|
// antizapret.prostovpn.org:
|
||||||
'\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.
|
'\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.
|
||||||
'\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.
|
|
||||||
'\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.
|
'\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.
|
||||||
'\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.
|
'\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.
|
||||||
].reduce((acc, hostname) => Object.assign(acc, { [hostname]: { host: hostname }}), {
|
].reduce((acc, hostname) => Object.assign(acc, { [hostname]: { host: hostname }}), {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user