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.expected.js 857B

12345678910111213141516171819202122232425
  1. var FindProxyForURL = function (init, profiles) {
  2. return function (url, host) {
  3. 'use strict';
  4. var result = init, scheme = url.substr(0, url.indexOf(':'));
  5. do {
  6. result = profiles[result];
  7. if (typeof result === 'function')
  8. 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))
  16. return '+internal-vf';
  17. return 'DIRECT';
  18. },
  19. '+internal-vf': function (url, host, scheme) {
  20. 'use strict';
  21. if (host === '127.0.0.1' || host === '::1' || host.indexOf('.') < 0)
  22. return 'DIRECT';
  23. return 'PROXY 127.0.0.1:8123';
  24. }
  25. });