1

I need to set proxy. I use it, but now I need to set proxy with login and password. How can I do it?

manifest.json

  "permissions": [
            "tabs",
            "http://*/*",
            "https://*/*",
            "notifications",
            "contextMenus",
            "history",
            "background",
            "proxy"
        ],

and background.js

chrome.windows.onCreated.addListener(function() {

var config = {
  mode: "fixed_servers",
  rules: {
    singleProxy: {
      scheme: "http",
      host: "127.0.0.1",
      port: 8000
    },
    bypassList: ["foobar.com"]
  }
};
chrome.proxy.settings.set(
    {value: config, scope: 'regular'},
    function() {});

});
James Z
  • 12,209
  • 10
  • 24
  • 44

0 Answers0