Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
  
    function FindProxyForURL(url, host) {
	
	// Specify your proxy here: e.g. "Proxy 11.22.33.4:80"
	var agatProxy = "PROXY <Bastion IP>:<Bastion Port>"
	
	var proxylist = new Array(
			"*.sharepoint.com",
			"*.sharepointonline.com",
			"teams.microsoft.com",
			"*.ng.msg.teams.microsoft.com",
		    "pipe.skype.com",
			"*.notifications.teams.microsoft.com",
			"*.asyncgw.teams.microsoft.com",
			"*.agatskype.net",
			"*.msgapi.teams.microsoft.com",
			"substrate.office.com",
			"graph.microsoft.com",
            "*.trouter.teams.microsoft.com"
			);
			
	//One subdomain under teams
	if (shExpMatch(host, "*.teams.microsoft.com") && dnsDomainLevels(host) == 3){
		return agatProxy;
	}
	
	// Return our proxy name for matched domains/hosts
	for (var i = 0; i < proxylist.length; i++) {
		var value = proxylist[i];
		if (shExpMatch(host, value)) {
			return agatProxy;
		}
	}

	return "DIRECT";
}

...