Last active
May 24, 2019 22:00
-
-
Save timdream/5fa889aca1b4fe19d1b0402c544c7889 to your computer and use it in GitHub Desktop.
calypso.localhost
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 (host === 'cdn.apple-mapkit.com' && url.indexOf('mk') !== -1) { | |
return "PROXY 127.0.0.1:443"; | |
} | |
if (host === 'calypso.localhost') { | |
return 'PROXY 127.0.0.1:3000'; | |
} | |
return FindProxyForURL_Automattic(url, host); | |
} | |
function FindProxyForURL_Automattic( url, host ) { | |
if ( isPlainHostName( host ) ) { | |
return 'DIRECT'; | |
} | |
if ( dnsDomainIs( host, '.local' ) || dnsDomainIs( host, '.dev' ) ) { | |
return 'DIRECT'; | |
} | |
if ( dnsDomainIs( host, '.hadoop.dfw.wordpress.com' ) ) { | |
return 'SOCKS 127.0.0.1:8080'; | |
} | |
if ( dnsDomainIs( host, '.wordpress.com' ) ) { | |
return 'SOCKS 127.0.0.1:8080'; | |
} | |
if ( 'vip.my.salesforce.com' == host ) { | |
return 'SOCKS 127.0.0.1:8080'; | |
} | |
if ( 'login.salesforce.com' == host ) { | |
return 'SOCKS 127.0.0.1:8080'; | |
} | |
if ( 'vip-support.automattic.com' == host ) { | |
return 'SOCKS 127.0.0.1:8080'; | |
} | |
if ( 'hackerone.com' == host || 'www.hackerone.com' == host ) { | |
return 'SOCKS 127.0.0.1:8080'; | |
} | |
if ( 'www.paypal.com' == host ) { | |
return 'SOCKS 127.0.0.1:8080'; | |
} | |
if ( dnsDomainIs( host, '.bruteprotect.com' ) ) { | |
return 'SOCKS 127.0.0.1:8080'; | |
} | |
if ( 'betadownload.jetpack.me' == host ) { | |
return 'SOCKS 127.0.0.1:8080'; | |
} | |
if ( dnsDomainIs( host, '.nominet.org.uk' ) ) { | |
return 'SOCKS 127.0.0.1:8080'; | |
} | |
if ( dnsDomainIs( host, '.opensrs.com' ) ) { | |
return 'SOCKS 127.0.0.1:8080'; | |
} | |
if ( dnsDomainIs( host, '.sawbuck.com' ) ) { | |
return 'SOCKS 127.0.0.1:8080'; | |
} | |
if ( dnsDomainIs( host, '.verisign.com' ) ) { | |
return 'SOCKS 127.0.0.1:8080'; | |
} | |
var resolved_ip = dnsResolve( host ); | |
if ( | |
isInNet( resolved_ip, '10.0.0.0', '255.0.0.0' ) | |
|| | |
isInNet( resolved_ip, '172.16.0.0', '255.240.0.0' ) | |
|| | |
isInNet( resolved_ip, '192.168.0.0', '255.255.0.0' ) | |
|| | |
isInNet( resolved_ip, '127.0.0.0', '255.255.255.0') | |
) { | |
return 'DIRECT'; | |
} | |
if ( | |
isInNet( resolved_ip, '76.74.255.0', '255.255.255.128' ) | |
|| | |
isInNet( resolved_ip, '76.74.248.133', '255.255.255.255' ) | |
|| | |
isInNet( resolved_ip, '192.0.64.0', '255.255.254.0' ) | |
|| | |
isInNet( resolved_ip, '192.0.67.0', '255.255.255.0' ) | |
|| | |
isInNet( resolved_ip, '192.0.68.0', '255.255.252.0' ) | |
|| | |
isInNet( resolved_ip, '66.155.8.4', '255.255.255.255' ) | |
|| | |
isInNet( resolved_ip, '192.0.80.0', '255.255.240.0' ) | |
|| | |
isInNet( resolved_ip, '192.0.96.0', '255.255.240.0' ) | |
|| | |
isInNet( resolved_ip, '192.0.112.0', '255.255.248.0' ) | |
|| | |
isInNet( resolved_ip, '192.0.123.0', '255.255.255.0' ) | |
|| | |
isInNet( resolved_ip, '192.0.124.0', '255.255.254.0' ) | |
|| | |
isInNet( resolved_ip, '185.64.140.0', '255.255.252.0' ) | |
|| | |
isInNet( resolved_ip, '103.62.32.0', '255.255.254.0' ) | |
|| | |
isInNet( resolved_ip, '200.9.112.0', '255.255.255.0' ) | |
|| | |
isInNet( resolved_ip, '198.181.118.0', '255.255.255.0' ) | |
|| | |
isInNet( resolved_ip, '185.138.28.0', '255.255.254.0' ) | |
|| | |
isInNet( resolved_ip, '196.41.85.0', '255.255.255.0' ) | |
|| | |
isInNet( resolved_ip, '185.138.30.0', '255.255.255.0' ) | |
) { | |
return 'SOCKS 127.0.0.1:8080'; | |
} | |
if ( | |
isInNet( resolved_ip, '192.0.72.0', '255.255.248.0' ) | |
|| | |
isInNet( resolved_ip, '198.181.116.0', '255.255.252.0' ) | |
|| | |
isInNet( resolved_ip, '192.0.66.0', '255.255.255.0' ) | |
) { | |
return 'SOCKS 127.0.0.1:8080'; | |
} | |
if ( | |
isInNet( resolved_ip, '54.215.149.82', '255.255.255.255' ) | |
) { | |
return 'SOCKS 127.0.0.1:8080'; | |
} | |
return 'DIRECT'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment