Add set_system_proxy for linux and android
This commit is contained in:
19
common/settings/command.go
Normal file
19
common/settings/command.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package settings
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/sagernet/sing-box/log"
|
||||
)
|
||||
|
||||
func runCommand(name string, args ...string) error {
|
||||
log.Debug(name, " ", strings.Join(args, " "))
|
||||
command := exec.Command(name, args...)
|
||||
command.Env = os.Environ()
|
||||
command.Stdin = os.Stdin
|
||||
command.Stdout = os.Stderr
|
||||
command.Stderr = os.Stderr
|
||||
return command.Run()
|
||||
}
|
||||
Reference in New Issue
Block a user