mirror of
https://github.com/v2fly/v2ray-core
synced 2024-02-27 03:18:06 +00:00
[app/dispatcher] [proxy/dns] Support domain string validation (#2188)
This commit is contained in:
+5
-2
@@ -15,6 +15,7 @@ import (
|
||||
dns_proto "github.com/v2fly/v2ray-core/v5/common/protocol/dns"
|
||||
"github.com/v2fly/v2ray-core/v5/common/session"
|
||||
"github.com/v2fly/v2ray-core/v5/common/signal"
|
||||
"github.com/v2fly/v2ray-core/v5/common/strmatcher"
|
||||
"github.com/v2fly/v2ray-core/v5/common/task"
|
||||
"github.com/v2fly/v2ray-core/v5/features/dns"
|
||||
"github.com/v2fly/v2ray-core/v5/features/policy"
|
||||
@@ -190,8 +191,10 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, d internet.
|
||||
if !h.isOwnLink(ctx) {
|
||||
isIPQuery, domain, id, qType := parseIPQuery(b.Bytes())
|
||||
if isIPQuery {
|
||||
go h.handleIPQuery(id, qType, domain, writer)
|
||||
continue
|
||||
if domain, err := strmatcher.ToDomain(domain); err == nil {
|
||||
go h.handleIPQuery(id, qType, domain, writer)
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user