2022-07-14 12:30:57 +00:00
|
|
|
package settings
|
2022-07-14 06:04:57 +00:00
|
|
|
|
|
|
|
import (
|
2022-07-14 12:30:57 +00:00
|
|
|
F "github.com/sagernet/sing/common/format"
|
2022-07-17 07:11:26 +00:00
|
|
|
"github.com/sagernet/sing/common/wininet"
|
2022-07-14 06:04:57 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func ClearSystemProxy() error {
|
2022-07-17 07:11:26 +00:00
|
|
|
return wininet.ClearSystemProxy()
|
2022-07-14 06:04:57 +00:00
|
|
|
}
|
|
|
|
|
2022-07-14 12:30:57 +00:00
|
|
|
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")
|
2022-07-14 06:04:57 +00:00
|
|
|
}
|