I have create a GUI to take user information and use it for proxy authentication
proxy = self.pr.text()
port = self.po.text()
username = self.un.text()
pw = self.pw.text()
these are the variables assigned.
i want to use these variables in
background_js = """
var config = {
mode: "fixed_servers",
rules: {
singleProxy: {
scheme: "http",
host: PROXY,
port: parseInt(PORT)
},
bypassList: ["foobar.com"]
}
};
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']
);
"""
As i have used those variables here(CAPITALISED) but this doen not seem to work
Any suggestions?
proxy = self.pr.text()
port = self.po.text()
username = self.un.text()
pw = self.pw.text()
these are the variables assigned.
i want to use these variables in
background_js = """
var config = {
mode: "fixed_servers",
rules: {
singleProxy: {
scheme: "http",
host: PROXY,
port: parseInt(PORT)
},
bypassList: ["foobar.com"]
}
};
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']
);
"""
As i have used those variables here(CAPITALISED) but this doen not seem to work
Any suggestions?