fix: wrong dns splitting

This commit is contained in:
mzz2017 committed 2021-08-05 16:03:57 +08:00
1 parent 37461ad5ea
commit aa135b389a
1 file changed
+1 -1
+1 -1
View File
@@ -679,7 +679,7 @@ func (t *Template) SetDNS(vs []vmessInfo.VmessInfo, setting *configure.Setting,
// we believe all lines are legal
var addr = parseDnsAddr(dns.Val)
if net.ParseIP(addr.host) == nil {
if net.ParseIP(addr.host) != nil {
routing = append(routing, RoutingRule{
Type: "field", InboundTag: []string{"dns"}, OutboundTag: dns.Out, IP: []string{addr.host}, Port: addr.port,
})