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 {
|
} else if t.EnableFakeIP {
|
||||||
domainStrategy = option.DomainStrategy(dns.DomainStrategyPreferIPv4)
|
domainStrategy = option.DomainStrategy(dns.DomainStrategyPreferIPv4)
|
||||||
} else {
|
} else {
|
||||||
domainStrategy = option.DomainStrategy(dns.DomainStrategyUseIPv4)
|
domainStrategy = 0
|
||||||
}
|
}
|
||||||
if t.DomainStrategyLocal != option.DomainStrategy(dns.DomainStrategyAsIS) {
|
if t.DomainStrategyLocal != option.DomainStrategy(dns.DomainStrategyAsIS) {
|
||||||
domainStrategyLocal = t.DomainStrategyLocal
|
domainStrategyLocal = t.DomainStrategyLocal
|
||||||
|
if domainStrategyLocal == domainStrategy {
|
||||||
|
domainStrategyLocal = 0
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
domainStrategyLocal = option.DomainStrategy(dns.DomainStrategyPreferIPv4)
|
|
||||||
}
|
|
||||||
if domainStrategyLocal == domainStrategy {
|
|
||||||
domainStrategyLocal = 0
|
domainStrategyLocal = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@ func (t *Template) renderOutbounds(metadata M.Metadata, options *boxOption.Optio
|
|||||||
if defaultTag == "" {
|
if defaultTag == "" {
|
||||||
defaultTag = DefaultDefaultTag
|
defaultTag = DefaultDefaultTag
|
||||||
}
|
}
|
||||||
options.Route.Final = defaultTag
|
|
||||||
directTag := t.DirectTag
|
directTag := t.DirectTag
|
||||||
if directTag == "" {
|
if directTag == "" {
|
||||||
directTag = DefaultDirectTag
|
directTag = DefaultDirectTag
|
||||||
@ -33,16 +32,16 @@ func (t *Template) renderOutbounds(metadata M.Metadata, options *boxOption.Optio
|
|||||||
blockTag = DefaultBlockTag
|
blockTag = DefaultBlockTag
|
||||||
}
|
}
|
||||||
options.Outbounds = []boxOption.Outbound{
|
options.Outbounds = []boxOption.Outbound{
|
||||||
{
|
|
||||||
Tag: directTag,
|
|
||||||
Type: C.TypeDirect,
|
|
||||||
Options: common.Ptr(common.PtrValueOrDefault(t.CustomDirect)),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
Tag: defaultTag,
|
Tag: defaultTag,
|
||||||
Type: C.TypeSelector,
|
Type: C.TypeSelector,
|
||||||
Options: common.Ptr(common.PtrValueOrDefault(t.CustomSelector)),
|
Options: common.Ptr(common.PtrValueOrDefault(t.CustomSelector)),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Tag: directTag,
|
||||||
|
Type: C.TypeDirect,
|
||||||
|
Options: common.Ptr(common.PtrValueOrDefault(t.CustomDirect)),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
if disableRuleAction {
|
if disableRuleAction {
|
||||||
options.Outbounds = append(options.Outbounds,
|
options.Outbounds = append(options.Outbounds,
|
||||||
|
Loading…
Reference in New Issue
Block a user