add domains with .ru .ir .cn .tr as ignore list
This commit is contained in:
@@ -420,6 +420,16 @@ func BuildConfig(opt ConfigOptions, input option.Options) (*option.Options, erro
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
options.DNS.Rules = append(
|
||||||
|
options.DNS.Rules,
|
||||||
|
option.DNSRule{
|
||||||
|
Type: C.RuleTypeDefault,
|
||||||
|
DefaultOptions: option.DefaultDNSRule{
|
||||||
|
DomainSuffix: []string{"." + opt.Region},
|
||||||
|
Server: DNSDirectTag,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
)
|
||||||
options.Route.RuleSet = append(options.Route.RuleSet, option.RuleSet{
|
options.Route.RuleSet = append(options.Route.RuleSet, option.RuleSet{
|
||||||
Type: C.RuleSetTypeRemote,
|
Type: C.RuleSetTypeRemote,
|
||||||
Tag: "geoip-" + opt.Region,
|
Tag: "geoip-" + opt.Region,
|
||||||
@@ -450,8 +460,15 @@ func BuildConfig(opt ConfigOptions, input option.Options) (*option.Options, erro
|
|||||||
Outbound: OutboundDirectTag,
|
Outbound: OutboundDirectTag,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
options.Route.Rules = append([]option.Rule{routeRuleIp}, options.Route.Rules...)
|
options.Route.Rules = append([]option.Rule{routeRuleIp}, options.Route.Rules...)
|
||||||
|
routeRuleLocalDomain := option.Rule{
|
||||||
|
Type: C.RuleTypeDefault,
|
||||||
|
DefaultOptions: option.DefaultRule{
|
||||||
|
Domain: []string{"." + opt.Region},
|
||||||
|
Outbound: OutboundDirectTag,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
options.Route.Rules = append([]option.Rule{routeRuleLocalDomain}, options.Route.Rules...)
|
||||||
}
|
}
|
||||||
if opt.BlockAds {
|
if opt.BlockAds {
|
||||||
options.Route.RuleSet = append(options.Route.RuleSet, option.RuleSet{
|
options.Route.RuleSet = append(options.Route.RuleSet, option.RuleSet{
|
||||||
|
|||||||
Reference in New Issue
Block a user