diff --git a/proxy/vless/inbound/inbound.go b/proxy/vless/inbound/inbound.go index 1dbbd32b..264f1e1f 100644 --- a/proxy/vless/inbound/inbound.go +++ b/proxy/vless/inbound/inbound.go @@ -109,6 +109,17 @@ func New(ctx context.Context, config *Config, dc dns.Client) (*Handler, error) { } */ } + if handler.fallbacks[""] != nil { + for name, apfb := range handler.fallbacks { + if name != "" { + for alpn := range handler.fallbacks[""] { + if apfb[alpn] == nil { + apfb[alpn] = make(map[string]*Fallback) + } + } + } + } + } for _, apfb := range handler.fallbacks { if apfb[""] != nil { for alpn, pfb := range apfb { @@ -126,9 +137,6 @@ func New(ctx context.Context, config *Config, dc dns.Client) (*Handler, error) { for name, apfb := range handler.fallbacks { if name != "" { for alpn, pfb := range handler.fallbacks[""] { - if apfb[alpn] == nil { - apfb[alpn] = make(map[string]*Fallback) - } for path, fb := range pfb { if apfb[alpn][path] == nil { apfb[alpn][path] = fb