fix: warp configs, add warp delay, fix network switch

This commit is contained in:
Hiddify
2024-02-21 19:51:49 +01:00
parent bdd91a08b7
commit 70157d1ac6
8 changed files with 111 additions and 35 deletions

View File

@@ -116,8 +116,17 @@ func readConfigOptionsAt(path string) (*config.ConfigOptions, error) {
}
var options config.ConfigOptions
err = json.Unmarshal(content, &options)
if err != nil {
return nil, err
}
if options.Warp.WireguardConfigStr != "" {
err := json.Unmarshal([]byte(options.Warp.WireguardConfigStr), &options.Warp.WireguardConfig)
if err != nil {
p
return nil, err
}
}
return &options, nil
}