Last active
July 28, 2021 08:45
-
-
Save weargoggles/7aa9e683b9433fd1179432d6fd628397 to your computer and use it in GitHub Desktop.
This file contains 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
"use strict"; | |
var LAB = /(?:^|\.)lab\.cloud\.ecg\.so$/; | |
var CLOUD = [ | |
/(?:^|\.)ix3-control\.cloud\.ecg\.so$/, | |
/(?:^|\.)dus2-control\.cloud\.ecg\.so$/, | |
/^172\.16\./, | |
/^172\.18\./, | |
/(?:^|\.)ams1\.cloud\.ecg\.so$/, | |
/(?:^|\.)dus1\.cloud\.ecg\.so$/, | |
/repositories\.cloud\.ecg\.so$/, | |
/underlay\.cloud$/, | |
/init1\.cloud$/, | |
] | |
function FindProxyForURL(url, host) { | |
if (host === "[::1]" || host === "localhost" || host === "127.0.0.1") return "DIRECT"; | |
for (var i = 0; i < CLOUD.length; i++) { | |
if (CLOUD[i].test(host)) { | |
return "HTTPS ops-proxy.ix3-control.cloud.ecg.so:443"; | |
} | |
} | |
// fallback to DIRECT | |
return "DIRECT"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment