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
@@ -0,0 +1,18 @@
//go:build windows
package config
import (
"errors"
"os"
)
func replaceSharedProxyConfigFile(tempPath, targetPath string) error {
if err := os.Rename(tempPath, targetPath); err == nil {
return nil
}
if err := os.Remove(targetPath); err != nil && !errors.Is(err, os.ErrNotExist) {
return err
}
return os.Rename(tempPath, targetPath)
}