You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pac-resolver-gh-16.js 832B

1234567891011121314151617181920212223
  1. // FindProxyForURL
  2. var FindProxyForURL = function(init, profiles) {
  3. return function(url, host) {
  4. "use strict";
  5. var result = init, scheme = url.substr(0, url.indexOf(":"));
  6. do {
  7. result = profiles[result];
  8. if (typeof result === "function") result = result(url, host, scheme);
  9. } while (typeof result !== "string" || result.charCodeAt(0) === 43);
  10. return result;
  11. };
  12. }("+google", {
  13. "+google": function(url, host, scheme) {
  14. "use strict";
  15. if (/(?:^|\.)google\.com$/.test(host)) return "+internal-vf";
  16. return "DIRECT";
  17. },
  18. "+internal-vf": function(url, host, scheme) {
  19. "use strict";
  20. if (host === "127.0.0.1" || host === "::1" || host.indexOf(".") < 0) return "DIRECT";
  21. return "PROXY 127.0.0.1:8123";
  22. }
  23. });