MCPcopy Index your code
hub / github.com/getlantern/sysproxy / Off

Function Off

sysproxy.go:77–94  ·  view source on GitHub ↗

Off immediately unsets the proxy at addr as the system proxy.

(addr string)

Source from the content-addressed store, hash-verified

75
76// Off immediately unsets the proxy at addr as the system proxy.
77func Off(addr string) error {
78 host, port, err := net.SplitHostPort(addr)
79 if err != nil {
80 return fmt.Errorf("unable to parse address %v: %v", addr, err)
81 }
82
83 mu.Lock()
84 defer mu.Unlock()
85 if be == nil {
86 return fmt.Errorf("call EnsureHelperToolPresent() first")
87 }
88
89 cmd := be.Command("off", host, port)
90 if err := run(cmd); err != nil {
91 return err
92 }
93 return verify("")
94}
95
96type resultType struct {
97 out []byte

Callers

nothing calls this directly

Calls 2

runFunction · 0.85
verifyFunction · 0.85

Tested by

no test coverage detected