Deprecate Socksaddr.IsFqdn: do not reject potentially valid domain names

This commit is contained in:
世界
2026-03-16 09:36:24 +08:00
parent d3768cca36
commit d2fa21d07b
16 changed files with 29 additions and 29 deletions

View File

@@ -349,7 +349,7 @@ func (r *Router) PreMatch(metadata adapter.InboundContext, routeContext tun.Dire
}
directRouteOutbound = defaultOutbound.(adapter.DirectRouteOutbound)
}
if metadata.Destination.IsFqdn() {
if metadata.Destination.IsDomain() {
if len(metadata.DestinationAddresses) == 0 {
var strategy C.DomainStrategy
if metadata.Source.IsIPv4() {
@@ -790,7 +790,7 @@ func (r *Router) actionSniff(
}
func (r *Router) actionResolve(ctx context.Context, metadata *adapter.InboundContext, action *R.RuleActionResolve) error {
if metadata.Destination.IsFqdn() {
if metadata.Destination.IsDomain() {
var transport adapter.DNSTransport
if action.Server != "" {
var loaded bool