feat(config): 支持共享代理配置文件,发布 0.5.2

This commit is contained in:
yml
2026-11-20 13:20:12 +08:00
parent 635d80e63e
commit f4b3cfa486
13 changed files with 595 additions and 6 deletions
+5
View File
@@ -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