Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
1,033
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 KB | None | 0 0
  1. // proxy.pac file for eduProxy
  2. // For version: 1.4-14.el6
  3. // Generated on host: 8715prx01
  4.  
  5. function FindProxyForURL(url, host) {
  6.  
  7. // Normalize the URL for pattern matching
  8. url = url.toLowerCase();
  9. host = host.toLowerCase();
  10.  
  11. // Send plain hostnames out directly
  12. if (isPlainHostName(host)) return "DIRECT";
  13.  
  14. // Send requests for myself directly to myself
  15. if (shExpMatch(host, "eduproxy") || shExpMatch(host, "8715prx01") || shExpMatch(host, "8715prx01.services.education.vic.gov.au")) return "DIRECT";
  16.  
  17. // Force requests for eduSTAR CDN through eduProxy, regardless of IP detection checks
  18. if (shExpMatch(host, "cdn.edustar.vic.edu.au")) return "PROXY 10.129.80.19:8080";
  19.  
  20. // If the user has entered something that looks like an IP address, go direct
  21. reip = /^\d+\.\d+\.\d+\.\d+$/g;
  22. if (reip.test(host)) {
  23. if (isInNet(host, "10.0.0.0", "255.0.0.0") || isInNet(host, "192.168.0.0", "255.255.0.0")) return "DIRECT";
  24. }
  25.  
  26. // Full hostname must have been entered - attempt DNS lookup and if destination host is on private IP, go direct
  27. var resolved_ip = dnsResolve(host);
  28. if (
  29. isInNet(resolved_ip, "10.0.0.0", "255.0.0.0") ||
  30. isInNet(resolved_ip, "172.16.0.0", "255.240.0.0") ||
  31. isInNet(resolved_ip, "192.168.0.0", "255.255.0.0") ||
  32. isInNet(resolved_ip, "127.0.0.0", "255.255.255.0")
  33. ) return "DIRECT";
  34.  
  35. // Auto-config mode selected: BASIC
  36.  
  37. // Auto-config domain exclusion list: returning data for 9 domains
  38. if (dnsDomainIs(host, "staff.jdlf.com.au") || (host == "staff.jdlf.com.au")) return 'DIRECT';
  39. if (dnsDomainIs(host, "education.vic.gov.au") || (host == "education.vic.gov.au")) return 'DIRECT';
  40. if (dnsDomainIs(host, "eduweb.vic.gov.au") || (host == "eduweb.vic.gov.au")) return 'DIRECT';
  41. if (dnsDomainIs(host, "edumail.vic.gov.au") || (host == "edumail.vic.gov.au")) return 'DIRECT';
  42. if (dnsDomainIs(host, "sso.clickview.com.au") || (host == "sso.clickview.com.au")) return 'DIRECT';
  43. if (dnsDomainIs(host, ".akamaiedge.net") || (host == ".akamaiedge.net")) return 'DIRECT';
  44. if (dnsDomainIs(host, "akamaiedge.net") || (host == "akamaiedge.net")) return 'DIRECT';
  45. if (dnsDomainIs(host, "sccmconnected-a01.cloudapp.net") || (host == "sccmconnected-a01.cloudapp.net")) return 'DIRECT';
  46. if (dnsDomainIs(host, "ticketmaster.com.au") || (host == "ticketmaster.com.au")) return 'DIRECT';
  47. if (dnsDomainIs(host, ".vcaa.vic.edu.au") || (host == ".vcaa.vic.edu.au")) return 'DIRECT';
  48. if (dnsDomainIs(host, "vcaa.vic.edu.au") || (host == "vcaa.vic.edu.au")) return 'DIRECT';
  49. if (dnsDomainIs(host, "roblox.com") || (host == "roblox.com")) return 'DIRECT';
  50. if (dnsDomainIs(host, "roblox.com") || (host == "setup.rbxcdn.com")) return 'DIRECT';
  51. if (dnsDomainIs(host, "roblox.com") || (host == "setup.roblox.com")) return 'DIRECT';
  52. if (dnsDomainIs(host, "roblox.com") || (host == "assetgame.roblox.com")) return 'DIRECT';
  53. if (dnsDomainIs(host, "roblox.com") || (host == "chatsite.roblox.com")) return 'DIRECT';
  54. if (dnsDomainIs(host, "roblox.com") || (host == "chat.roblox.com")) return 'DIRECT';
  55. if (dnsDomainIs(host, "roblox.com") || (host == "versioncompatibility.api.roblox.com")) return 'DIRECT';
  56. if (dnsDomainIs(host, "roblox.com") || (host == "clientsettings.api.roblox.com")) return 'DIRECT';
  57. if (dnsDomainIs(host, "roblox.com") || (host == "api.roblox.com")) return 'DIRECT';
  58.  
  59.  
  60.  
  61.  
  62.  
  63. // Otherwise, use local eduProxy
  64. return "PROXY 10.129.80.19:8080";
  65.  
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement