Add set_system_proxy for linux and android

This commit is contained in:
世界
2022-07-14 20:30:57 +08:00
parent 1d9913604c
commit a257c481c3
12 changed files with 182 additions and 47 deletions

View File

@@ -20,12 +20,18 @@ func FindPath(name string) (string, bool) {
if path := filepath.Join(dir, dirName, name); rw.FileExists(path) {
return path, true
}
if path := filepath.Join(dir, name); rw.FileExists(path) {
return path, true
}
}
return name, false
}
func init() {
resourcePaths = append(resourcePaths, ".")
if home := os.Getenv("HOME"); home != "" {
resourcePaths = append(resourcePaths, home)
}
if userConfigDir, err := os.UserConfigDir(); err == nil {
resourcePaths = append(resourcePaths, userConfigDir)
}