diff --git a/bypass-lan-and-china.pac b/bypass-lan-and-china.pac index e137f42..e8e88af 100644 --- a/bypass-lan-and-china.pac +++ b/bypass-lan-and-china.pac @@ -27,6 +27,9 @@ var proxy = "__PROXY__"; var direct = "DIRECT"; function FindProxyForURL(url, host) { + if (!isResolvable(host)) { + return proxy; + } var remote = dnsResolve(host); if (belongsToSubnet(remote, WHITELIST)) { return direct; diff --git a/code.js b/code.js index 01db4b1..f6b037e 100644 --- a/code.js +++ b/code.js @@ -32,6 +32,9 @@ function isLan(host) { } function FindProxyForURL(url, host) { + if (!isResolvable(host)) { + return proxy; + } var remote = dnsResolve(host); if (isLan(remote) || isChina(remote)) { return "DIRECT";