Files
sing-box-extended-mirror/common/settings/proxy_windows.go
T

15 lines
321 B
Go
Raw Normal View History

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