fix config orders

This commit is contained in:
Hiddify
2024-02-15 18:14:48 +01:00
parent a006c94cdf
commit b5fddcd24b

View File

@@ -97,11 +97,10 @@ func patchConfig(content []byte, name string) ([]byte, error) {
if res, err := b.WaitAndGetResult(); err != nil { if res, err := b.WaitAndGetResult(); err != nil {
return nil, err return nil, err
} else { } else {
options.Outbounds = []option.Outbound{} for i, base := range options.Outbounds {
for s := range res { options.Outbounds[i] = *res[base.Tag].Value
fmt.Println(s)
options.Outbounds = append(options.Outbounds, *res[s].Value)
} }
} }
content, _ = json.MarshalIndent(options, "", " ") content, _ = json.MarshalIndent(options, "", " ")