{
"name": "Proxy",
"description": "Build an Extension!",
"version": "1.0.122",
"manifest_version": 3,
/*"incognito": "split",*/
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["contentScript.js"]
}
],
"background": {
"service_worker": "background.js"
},
"permissions": [
"proxy",
"tabs",
"webRequest"
]
}
function setProxy(ip, port, username, password){
var config = {
mode: "fixed_servers",
rules: {
singleProxy: {
scheme: "http",
host: ip,
port: port
},
bypassList: ["localhost"]
}
};
chrome.proxy.settings.set({value: config, scope: "incognito_session_only"}, function() {});
}
chrome.tabs.onCreated.addListener((tab) => {
console.log("ok");
/* if (tab.incognito){
setProxy("195.201.61.51", 8000, "", "");
console.log("Proxy set !");
}*/
});