Files
magpie/internal/netproxy/system_darwin.go
T

14 lines
309 B
Go

package netproxy
import "os/exec"
// system reads what System Settings → Network → Proxies says, through
// scutil (the same dictionary CFNetwork uses).
func system() Proxy {
out, err := exec.Command("scutil", "--proxy").Output()
if err != nil {
return Proxy{}
}
return parseScutil(string(out))
}