Skip to content

Instantly share code, notes, and snippets.

@lk-geimfari
Last active September 24, 2019 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lk-geimfari/cacd9aeaaf27d9b0a2e78dece4ecec29 to your computer and use it in GitHub Desktop.
Save lk-geimfari/cacd9aeaaf27d9b0a2e78dece4ecec29 to your computer and use it in GitHub Desktop.
function FindProxyForURL(url, host) {
if ( host.indexOf('linkedin') !== -1 || host.indexOf('telegram.org') !== -1) {
return "PROXY devproxy.roskomsvoboda.org:3129";
} else {
return "DIRECT";
}
}
const extraInfoSpecBlocking = ['blocking'];
const requestFilter = {urls: ['<all_urls>'], types: ['main_frame']};
chrome.webRequest.onAuthRequired.addListener((details, asyncCallback) => {
return {
authCredentials: {
username: window.atob('cmtz'),
password: window.atob('TVRneFpEazQ'),
};
},
requestFilter, extraInfoSpecBlocking,
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment