Add set system proxy support for macOS

This commit is contained in:
世界
2022-08-04 22:01:20 +08:00
parent 64dbac8138
commit f691bd5ce1
21 changed files with 225 additions and 174 deletions

View File

@@ -13,3 +13,9 @@ func runCommand(name string, args ...string) error {
command.Stderr = os.Stderr
return command.Run()
}
func readCommand(name string, args ...string) ([]byte, error) {
command := exec.Command(name, args...)
command.Env = os.Environ()
return command.CombinedOutput()
}