I need your help!
I'm not a profissional, but I'm trying to create a proxy Chrome Extension, and It is working fine! However, I'd like it works only for some specifics website, not for all. Currently, It is working for all website, how could I set it to work only for youtube, google and netflix?
function startProxy() {
var config = {
mode: "fixed_servers",
rules: {
singleProxy: {
scheme: "http",
host: "IP", // Proxy IP or URL: type -> string
port: 80 // Proxy port : type -> int
},
bypassList: ["localhost"]
}
};
chrome.proxy.settings.set({value: config, scope: "regular"}, function() {});
}
function callbackFn(details) {
return {
authCredentials: {
username: "USER",
password: "PW"
}
};
}
chrome.webRequest.onAuthRequired.addListener(
callbackFn,
{urls: ["<all_urls>"]},
['blocking']
);
startProxy();