Update some default vaule for me usecase

This commit is contained in:
Puqns67 2024-11-23 19:36:40 +08:00
parent f7224b3d60
commit 0a1889c438
Signed by: Puqns67
GPG Key ID: 9669DF042554F536
2 changed files with 9 additions and 10 deletions

View File

@ -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
}

View File

@ -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,