Last active
December 6, 2024 22:30
-
-
Save jjtroberts/14c3746dd71867b440d69ab300cd014e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function FindProxyForURL(url, host) { | |
| // List of domains for which the proxy should be used | |
| var proxyDomains = [ | |
| "windowsupdate.microsoft.com", | |
| "*.windowsupdate.microsoft.com", | |
| "*.update.microsoft.com", | |
| "*.windowsupdate.com", | |
| "download.windowsupdate.com", | |
| "download.microsoft.com", | |
| "*.download.windowsupdate.com", | |
| "wustat.windows.com", | |
| "ntservicepack.microsoft.com", | |
| "go.microsoft.com", | |
| "dl.delivery.mp.microsoft.com", | |
| "*.delivery.mp.microsoft.com" | |
| ]; | |
| // Define the proxy server | |
| var proxy = "PROXY 10.2.0.61:443"; // Replace with your proxy address and port | |
| // Check if the host matches any of the domains | |
| for (var i = 0; i < proxyDomains.length; i++) { | |
| if (shExpMatch(host, proxyDomains[i])) { | |
| return proxy; | |
| } | |
| } | |
| // Default to direct connection | |
| return "DIRECT"; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment