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()
|
disableTun := t.DisableTUN && !metadata.Platform.TunOnly()
|
||||||
if !disableTun {
|
if !disableTun {
|
||||||
if options.Route == nil {
|
|
||||||
options.Route = &option.RouteOptions{}
|
|
||||||
}
|
|
||||||
options.Route.AutoDetectInterface = true
|
options.Route.AutoDetectInterface = true
|
||||||
|
|
||||||
var inet6Address []netip.Prefix
|
var inet6Address []netip.Prefix
|
||||||
|
@ -15,9 +15,6 @@ func (t *Template) renderOutbounds(metadata M.Metadata, options *option.Options,
|
|||||||
if defaultTag == "" {
|
if defaultTag == "" {
|
||||||
defaultTag = DefaultDefaultTag
|
defaultTag = DefaultDefaultTag
|
||||||
}
|
}
|
||||||
if options.Route == nil {
|
|
||||||
options.Route = &option.RouteOptions{}
|
|
||||||
}
|
|
||||||
options.Route.Final = defaultTag
|
options.Route.Final = defaultTag
|
||||||
directTag := t.DirectTag
|
directTag := t.DirectTag
|
||||||
if directTag == "" {
|
if directTag == "" {
|
||||||
|
@ -45,6 +45,10 @@ func (t *Template) Render(metadata M.Metadata, profileName string, outbounds [][
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, E.Cause(err, "render dns")
|
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)
|
err = t.renderInbounds(metadata, &options)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, E.Cause(err, "render inbounds")
|
return nil, E.Cause(err, "render inbounds")
|
||||||
@ -53,10 +57,6 @@ func (t *Template) Render(metadata M.Metadata, profileName string, outbounds [][
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, E.Cause(err, "render outbounds")
|
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)
|
err = t.renderExperimental(metadata, &options, profileName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, E.Cause(err, "render experimental")
|
return nil, E.Cause(err, "render experimental")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user