daily pastebin goal
20%
SHARE
TWEET

wpad.dat

k3NGuru Feb 4th, 2015 264 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function FindProxyForURL(url, host)
  2. {
  3. #$OldProxy = "PROXY KOM-AD01-TMG.holding.com:8080";
  4. $NewProxy = "ZEPTO.mlvz.local:3128";
  5. #$TestProxy = "PROXY KOM-AD01-TEST.holding.com:3128";
  6. //
  7. // URLs for localhost
  8. if (shExpMatch(host, "127.0.0.1" )) {return "DIRECT";}
  9. if (shExpMatch(host, "*/localhost*" )) {return "DIRECT";}
  10. //
  11. // Local sites by IP
  12. if (isInNet(host, "192.168.91.0", "255.255.255.0")) {return "DIRECT";}
  13. //
  14. // If URL has no dots in host name, send traffic direct4
  15. if (isPlainHostName(host)) {return "DIRECT";}
  16. //
  17. // URLs mathing mask - single host URLs in some domain
  18. if (shExpMatch(url, "*/app1.local2.com*")) {return "DIRECT";}
  19. if (shExpMatch(url, "*/portal.sub-local.su*")) {return "DIRECT";}
  20. if (shExpMatch(url, "*/test-billing.holding.com*")) {return $NewProxy;}
  21. //
  22. // URLs mathing mask - all URLs in some domain
  23. if (shExpMatch(url,"*mlvz.local*")) {return "DIRECT";}
  24. if (shExpMatch(url, "*sygroup.local*")) {return "DIRECT";}
  25. if (shExpMatch(url,"*.sygroup-east.local*")) {return "DIRECT";}
  26. //
  27. // Testing clients
  28. #if (isInNet(myIpAddress(), "10.160.100.20", "255.255.255.255")) {return $TestProxy;}
  29. #if (isInNet(myIpAddress(), "10.160.200.15", "255.255.255.255")) {return $TestProxy;}
  30. //
  31. // Clients for new proxy
  32. if (isInNet(myIpAddress(), "192.168.91.0", "255.255.255.0")) {return $NewProxy;}
  33. //
  34. //Return old proxy for EVERYTHING
  35. return $OldProxy;
  36. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top