feat(config): 支持共享代理配置文件,发布 0.5.2
This commit is contained in:
@@ -143,6 +143,11 @@ func (a *App) SaveSettings(cfg types.Config) types.ErrorResult {
|
||||
logger.LogEvent("配置", "error", "配置保存失败: %v", err)
|
||||
return types.ErrorResult{Error: "配置保存失败: " + err.Error()}
|
||||
}
|
||||
if cfg.SharedProxyConfigFile != oldCfg.SharedProxyConfigFile && strings.TrimSpace(cfg.SharedProxyConfigFile) != "" {
|
||||
if err := config.SaveSharedProxyConfigPointer(cfg.SharedProxyConfigFile); err != nil {
|
||||
logger.LogEvent("配置", "warn", "保存共享代理配置路径失败: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
traceChanged := cfg.TraceEnabled != oldCfg.TraceEnabled || cfg.TraceMaxBody != oldCfg.TraceMaxBody
|
||||
proxyChanged := cfg.ProxyEnabled != oldCfg.ProxyEnabled || cfg.ProxyURL != oldCfg.ProxyURL
|
||||
|
||||
Reference in New Issue
Block a user