-
-
Save lovmoon3k/8a263e644b2e5649d524540bc16669ac to your computer and use it in GitHub Desktop.
ProxyExt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = { | |
mode: "fixed_servers", | |
rules: { | |
singleProxy: { | |
scheme: "http", | |
host: "{host}", | |
port: "{port}" | |
}, | |
bypassList: ["localhost"] | |
} | |
}; | |
chrome.proxy.settings.set({value: config,scope: "regular"}, function () {}); | |
function callbackFn(details) { | |
return { | |
authCredentials: { | |
username: "{username}", | |
password: "{password}" | |
} | |
}; | |
} | |
chrome.webRequest.onAuthRequired.addListener(callbackFn, {urls: ["<all_urls>"]}, ['blocking']); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "1.0.0", | |
"manifest_version": 2, | |
"name": "ChromeProxy", | |
"permissions": [ | |
"proxy", | |
"<all_urls>", | |
"webRequest", | |
"webRequestBlocking" | |
], | |
"background": { | |
"scripts": [ | |
"background.js" | |
] | |
}, | |
"minimum_chrome_version": "22.0.0" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment