mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-04-11 17:47:20 +10:00
dns: remove dead lookupStrategyAllowsQueryType helper
This commit is contained in:
@@ -584,17 +584,6 @@ func (r *Router) resolveLookupStrategy(options adapter.DNSQueryOptions) C.Domain
|
||||
return r.defaultDomainStrategy
|
||||
}
|
||||
|
||||
func lookupStrategyAllowsQueryType(strategy C.DomainStrategy, qType uint16) bool {
|
||||
switch strategy {
|
||||
case C.DomainStrategyIPv4Only:
|
||||
return qType == mDNS.TypeA
|
||||
case C.DomainStrategyIPv6Only:
|
||||
return qType == mDNS.TypeAAAA
|
||||
default:
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
func withLookupQueryMetadata(ctx context.Context, qType uint16) context.Context {
|
||||
ctx, metadata := adapter.ExtendContext(ctx)
|
||||
metadata.QueryType = qType
|
||||
|
||||
Reference in New Issue
Block a user