sing-box/common/settings/proxy_windows.go

15 lines
321 B
Go
Raw Normal View History

package settings
import (
F "github.com/sagernet/sing/common/format"
2022-07-17 07:11:26 +00:00
"github.com/sagernet/sing/common/wininet"
)
func ClearSystemProxy() error {
2022-07-17 07:11:26 +00:00
return wininet.ClearSystemProxy()
}
func SetSystemProxy(port uint16, mixed bool) error {
2022-07-17 07:11:26 +00:00
return wininet.SetSystemProxy(F.ToString("http://127.0.0.1:", port), "local")
}