forked from mirror/serenity
Fix render sequence
This commit is contained in:
parent
871aa3919d
commit
06cea13da6
@ -26,9 +26,6 @@ func (t *Template) renderInbounds(metadata M.Metadata, options *option.Options)
|
||||
}
|
||||
disableTun := t.DisableTUN && !metadata.Platform.TunOnly()
|
||||
if !disableTun {
|
||||
if options.Route == nil {
|
||||
options.Route = &option.RouteOptions{}
|
||||
}
|
||||
options.Route.AutoDetectInterface = true
|
||||
|
||||
var inet6Address []netip.Prefix
|
||||
|
@ -15,9 +15,6 @@ func (t *Template) renderOutbounds(metadata M.Metadata, options *option.Options,
|
||||
if defaultTag == "" {
|
||||
defaultTag = DefaultDefaultTag
|
||||
}
|
||||
if options.Route == nil {
|
||||
options.Route = &option.RouteOptions{}
|
||||
}
|
||||
options.Route.Final = defaultTag
|
||||
directTag := t.DirectTag
|
||||
if directTag == "" {
|
||||
|
@ -45,6 +45,10 @@ func (t *Template) Render(metadata M.Metadata, profileName string, outbounds [][
|
||||
if err != nil {
|
||||
return nil, E.Cause(err, "render dns")
|
||||
}
|
||||
err = t.renderRoute(metadata, &options)
|
||||
if err != nil {
|
||||
return nil, E.Cause(err, "render route")
|
||||
}
|
||||
err = t.renderInbounds(metadata, &options)
|
||||
if err != nil {
|
||||
return nil, E.Cause(err, "render inbounds")
|
||||
@ -53,10 +57,6 @@ func (t *Template) Render(metadata M.Metadata, profileName string, outbounds [][
|
||||
if err != nil {
|
||||
return nil, E.Cause(err, "render outbounds")
|
||||
}
|
||||
err = t.renderRoute(metadata, &options)
|
||||
if err != nil {
|
||||
return nil, E.Cause(err, "render route")
|
||||
}
|
||||
err = t.renderExperimental(metadata, &options, profileName)
|
||||
if err != nil {
|
||||
return nil, E.Cause(err, "render experimental")
|
||||
|
Loading…
x
Reference in New Issue
Block a user