Guest User

Untitled

a guest
Sep 24th, 2020
97
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var domains = {
  2. "ocsp.int-x3.letsencrypt.org":1,
  3. "ocsp.apple.com":1,
  4. "gdmf.apple.com":1,
  5. "mesu.apple.com":1,
  6. "swscan.apple.com":1,
  7. "appldnld.apple.com":1,
  8. "world-gen.g.aaplimg.com":1
  9. };
  10.  
  11. var proxy = "PROXY 127.0.0.1:1080;";
  12.  
  13. var direct = 'DIRECT;';
  14.  
  15. function FindProxyForURL(url, host) {
  16. var lastPos;
  17. do {
  18. if (domains.hasOwnProperty(host)) {
  19. return proxy;
  20. }
  21. lastPos = host.indexOf('.') + 1;
  22. host = host.slice(lastPos);
  23. } while (lastPos >= 1);
  24. return direct;
  25. }
RAW Paste Data