Advertisement
seadog007

KAS Sonar Auto Proxy Configuration Script

Sep 16th, 2014
406
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. Tue Sep 16 13:02:24 2014
  2. TCP 172.27.0.2:80 --> 172.27.107.79:50938 | AP
  3.  
  4. HTTP/1.1 200 OK
  5. Content-Type: application/x-ns-proxy-autoconfig
  6. Last-Modified: Fri, 08 Aug 2014 06:22:35 GMT
  7. Accept-Ranges: bytes
  8. ETag: "b53eee24d1b2cf1:0"
  9. Server: Microsoft-IIS/8.5
  10. Date: Tue, 16 Sep 2014 05:02:03 GMT
  11. Content-Length: 866
  12.  
  13. function FindProxyForURL(url, host) {
  14.  
  15. var proxy = "PROXY 172.27.254.1:8080";
  16.  
  17. pacver = "Sonar Auto Proxy Configuration Script 6/8/2014 10AM";
  18.  
  19. // Dont request proxy when accessing localhost.
  20. if (isInNet(host, "127.0.0.1", "255.255.0.0") || isInNet(host, "172.27.0.0", "255.255.0.0")){
  21. return "DIRECT";.
  22. }
  23. // Local URLs from the domains below example.com don't need a proxy:
  24. if (shExpMatch(host, "*.example.com")){
  25. return "DIRECT";
  26. }
  27. // Utility
  28. if ((host == "proxyinfo.sonar")){
  29. alert("Selected Proxy is: " + proxy);
  30. alert("Local IP address is: " + myIpAddress());
  31. alert("PAC File Version: " + pacinfo);
  32. }
  33. // All other requests go through port 8080 of proxy.example.com
  34. // should that fail to respond, go directly to the WWW:
  35. return "PROXY 172.27.254.1:8080";
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement