Advertisement
Guest User

PAC-script example for browsers

a guest
Mar 2nd, 2014
560
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.57 KB | None | 0 0
  1. function FindProxyForURL(url, host)
  2. {
  3.  proxies = [
  4.  
  5.   ["127.0.0.1:4444", "i2p"],
  6.  
  7.   ["127.0.0.1:9050", "onion"],
  8.  
  9.   ["proxy.antizapret.prostovpn.org:3128",
  10.    "anilist.co",
  11.    "desuchan.net",
  12.    "neko-sentai.com",
  13.    "nihonomaru.com",
  14.    "sankakucomplex.com"
  15.   ],
  16.  
  17.   ["caelum-gw.chickenkiller.com:8080",
  18.    "gelbooru.com"
  19.   ]
  20.  
  21.  ];
  22.  
  23.  for (var x = 0; x < proxies.length; x++)
  24.   for (var y = 1; y < proxies[x].length; y++)
  25.    if (host == proxies[x][y] || shExpMatch(host, "*." + proxies[x][y]))
  26.     return "PROXY " + proxies[x][0];
  27.  
  28.  return "DIRECT";
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement