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

@@ -1,14 +1,13 @@
//go:build !windows && !linux
//go:build !(windows || linux || darwin)
package settings
import "github.com/sagernet/sing-box/log"
import (
"os"
func ClearSystemProxy() error {
return nil
}
"github.com/sagernet/sing-box/adapter"
)
func SetSystemProxy(port uint16, mixed bool) error {
log.Warn("set system proxy: unsupported operating system")
return nil
func SetSystemProxy(router adapter.Router, port uint16, isMixed bool) (func() error, error) {
return nil, os.ErrInvalid
}