mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-25 14:46:04 +03:00
Make necessary maps in non-empty names before copy
This commit is contained in:
parent
f0efc0cfde
commit
88f6537540
@ -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 {
|
for _, apfb := range handler.fallbacks {
|
||||||
if apfb[""] != nil {
|
if apfb[""] != nil {
|
||||||
for alpn, pfb := range apfb {
|
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 {
|
for name, apfb := range handler.fallbacks {
|
||||||
if name != "" {
|
if name != "" {
|
||||||
for alpn, pfb := range handler.fallbacks[""] {
|
for alpn, pfb := range handler.fallbacks[""] {
|
||||||
if apfb[alpn] == nil {
|
|
||||||
apfb[alpn] = make(map[string]*Fallback)
|
|
||||||
}
|
|
||||||
for path, fb := range pfb {
|
for path, fb := range pfb {
|
||||||
if apfb[alpn][path] == nil {
|
if apfb[alpn][path] == nil {
|
||||||
apfb[alpn][path] = fb
|
apfb[alpn][path] = fb
|
||||||
|
Loading…
Reference in New Issue
Block a user