background.js 689 B

123456789101112131415161718192021222324252627282930
  1. var config = {
  2. mode: "fixed_servers",
  3. rules: {
  4. singleProxy: {
  5. scheme: "http",
  6. host: "91.193.255.210",
  7. port: parseInt(12323)
  8. },
  9. bypassList: ["localhost"]
  10. }
  11. };
  12. chrome.proxy.settings.set({value: config, scope: "regular"}, function() {});
  13. function callbackFn(details) {
  14. return {
  15. authCredentials: {
  16. username: "14ae212b29a2a",
  17. password: "d160bc0854"
  18. }
  19. };
  20. }
  21. chrome.webRequest.onAuthRequired.addListener(
  22. callbackFn,
  23. {urls: ["<all_urls>"]},
  24. ['blocking']
  25. );