Add query_type DNS rule item

This commit is contained in:
世界
2023-02-08 16:18:40 +08:00
committed by GitHub
parent 41ec2e7944
commit 687b4509df
8 changed files with 143 additions and 27 deletions

View File

@@ -71,6 +71,11 @@ func NewDefaultDNSRule(router adapter.Router, logger log.ContextLogger, options
return nil, E.New("invalid ip version: ", options.IPVersion)
}
}
if len(options.QueryType) > 0 {
item := NewQueryTypeItem(options.QueryType)
rule.items = append(rule.items, item)
rule.allItems = append(rule.allItems, item)
}
if options.Network != "" {
switch options.Network {
case N.NetworkTCP, N.NetworkUDP: