Skip to content

Instantly share code, notes, and snippets.

@hieu-v
Last active March 21, 2024 10:05
Show Gist options
  • Save hieu-v/50f3035b60aeb10b0205726d95d0cb94 to your computer and use it in GitHub Desktop.
Save hieu-v/50f3035b60aeb10b0205726d95d0cb94 to your computer and use it in GitHub Desktop.
function FindProxyForURL (url, host) {
if (shExpMatch(host, "*.google.com")) return "SOCKS 127.0.0.1:1337";
if (shExpMatch(host, "*.amazonaws.com")) return "SOCKS 127.0.0.1:1337";
if (shExpMatch(host, "*.amazon.com")) return "SOCKS 127.0.0.1:1337";
if (shExpMatch(host, "*.gitlab.upft.jp")) return "SOCKS 127.0.0.1:1337";
if (shExpMatch(host, "gitlab.upft.jp")) return "SOCKS 127.0.0.1:1337";
if (shExpMatch(host, "upft.jp")) return "SOCKS 127.0.0.1:1337";
return "DIRECT";
}
@hieu-v
Copy link
Author

hieu-v commented Jan 30, 2023

if (dnsDomainIs(host, ".google.com")) return "SOCKS 127.0.0.1:1337";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment