forked from mirror/serenity
Update some default vaule for me usecase
This commit is contained in:
parent
f7224b3d60
commit
0a1889c438
@ -32,14 +32,14 @@ func (t *Template) renderDNS(metadata M.Metadata, options *option.Options) error
|
||||
} else if t.EnableFakeIP {
|
||||
domainStrategy = option.DomainStrategy(dns.DomainStrategyPreferIPv4)
|
||||
} else {
|
||||
domainStrategy = option.DomainStrategy(dns.DomainStrategyUseIPv4)
|
||||
domainStrategy = 0
|
||||
}
|
||||
if t.DomainStrategyLocal != option.DomainStrategy(dns.DomainStrategyAsIS) {
|
||||
domainStrategyLocal = t.DomainStrategyLocal
|
||||
if domainStrategyLocal == domainStrategy {
|
||||
domainStrategyLocal = 0
|
||||
}
|
||||
} else {
|
||||
domainStrategyLocal = option.DomainStrategy(dns.DomainStrategyPreferIPv4)
|
||||
}
|
||||
if domainStrategyLocal == domainStrategy {
|
||||
domainStrategyLocal = 0
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,6 @@ func (t *Template) renderOutbounds(metadata M.Metadata, options *boxOption.Optio
|
||||
if defaultTag == "" {
|
||||
defaultTag = DefaultDefaultTag
|
||||
}
|
||||
options.Route.Final = defaultTag
|
||||
directTag := t.DirectTag
|
||||
if directTag == "" {
|
||||
directTag = DefaultDirectTag
|
||||
@ -33,16 +32,16 @@ func (t *Template) renderOutbounds(metadata M.Metadata, options *boxOption.Optio
|
||||
blockTag = DefaultBlockTag
|
||||
}
|
||||
options.Outbounds = []boxOption.Outbound{
|
||||
{
|
||||
Tag: directTag,
|
||||
Type: C.TypeDirect,
|
||||
Options: common.Ptr(common.PtrValueOrDefault(t.CustomDirect)),
|
||||
},
|
||||
{
|
||||
Tag: defaultTag,
|
||||
Type: C.TypeSelector,
|
||||
Options: common.Ptr(common.PtrValueOrDefault(t.CustomSelector)),
|
||||
},
|
||||
{
|
||||
Tag: directTag,
|
||||
Type: C.TypeDirect,
|
||||
Options: common.Ptr(common.PtrValueOrDefault(t.CustomDirect)),
|
||||
},
|
||||
}
|
||||
if disableRuleAction {
|
||||
options.Outbounds = append(options.Outbounds,
|
||||
|
Loading…
Reference in New Issue
Block a user