Skip to content

Instantly share code, notes, and snippets.

@kevinkirkup
Created February 5, 2025 21:28
Show Gist options
  • Save kevinkirkup/d09c128a376823861d96b929d23db0f2 to your computer and use it in GitHub Desktop.
Save kevinkirkup/d09c128a376823861d96b929d23db0f2 to your computer and use it in GitHub Desktop.
SOCK5 Proxy PAC file
function FindProxyForURL(url, host) {
// Exclude (support|venus|mercury).*.opdt.cc from the SOCKS5 proxy
if (
shExpMatch(host, "support.*.opdt.cc")
|| shExpMatch(host, "venus.*.opdt.cc")
|| shExpMatch(host, "mercury.*.opdt.cc")
|| shExpMatch(host, "api.*.opdt.cc")
) {
return "DIRECT"; // Use direct connection for support.*.opdt.cc
}
// Route other *.opdt.cc domains through the SOCKS5 proxy
if (dnsDomainIs(host, ".opdt.cc")) {
// Replace with your proxy address and port
// If you followed the Confluence page, the below is correct.
return "SOCKS5 localhost:1080";
}
// For all other domains, use direct connection
return "DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment