Files
FireflyGo_Proxy/system_proxy_linux.go
T
2026-09-02 13:14:41 +07:00

20 lines
399 B
Go

//go:build linux
// +build linux
package main
func setProxy(enable bool, host string, port string) error {
if enable {
ENV_CONFIG = []string{
"HTTP_PROXY=http://" + host + ":" + port,
"http_proxy=http://" + host + ":" + port,
"HTTPS_PROXY=http://" + host + ":" + port,
"https_proxy=http://" + host + ":" + port,
}
} else {
ENV_CONFIG = nil
}
return nil
}