Created
June 25, 2015 12:26
-
-
Save Kubuxu/768735a1c39ce0f5ec03 to your computer and use it in GitHub Desktop.
PAC file for cjdns proxy
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
function FindProxyForURL(url, host) { | |
// If we can't resolve this means that this host is IPv4 only. Trying cjdns won't hurt. | |
// It also make IPv4 only hosts connect ot clearnet IPv6 hosts if proxy is IPv6 capable. | |
// If we can resolve check if the host is insice cjdns network space. | |
if (shExpMatch(host, "fc*:*") || !dnsResolve(host) || shExpMatch(dnsResolve(host), "fc*:*")) { | |
return "SOCKS5 localhost:8080"; | |
} | |
return "DIRECT"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment