Update proxy.go

This commit is contained in:
Jason
2020-08-07 13:50:59 +08:00
parent bb6b2c93ba
commit 574515f981

View File

@@ -44,6 +44,11 @@ func RegisterFakeDNS(d D.FakeDNS, h string) {
// Check target if is hijacked address.
func isHijacked(target *net.UDPAddr) bool {
if fakeDNS == nil {
// ignore when fake DNS disabled
return false
}
for _, addr := range hijackDNS {
host, port, err := net.SplitHostPort(addr)
if err != nil {