Last active
April 30, 2022 15:08
-
-
Save amane-katagiri/4ab0a27508147a5c862997c2d1b19450 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
// https://developer.mozilla.org/ja/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_PAC_file | |
function FindProxyForURL(url, host) | |
{ | |
if (isPlainHostName(host) || isInNet(host, "127.0.0.1", "255.255.255.255")) { | |
return "DIRECT"; | |
} else { | |
return "SOCKS5 localhost:3128; DIRECT"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment