MCPcopy Create free account
hub / github.com/anomalyco/opencode / ensureLoopbackNoProxy

Function ensureLoopbackNoProxy

packages/desktop/src/main/sidecar.ts:91–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89}
90
91function ensureLoopbackNoProxy() {
92 const loopback = ["127.0.0.1", "localhost", "::1"]
93 const upsert = (key: string) => {
94 const items = (process.env[key] ?? "")
95 .split(",")
96 .map((value: string) => value.trim())
97 .filter((value: string) => Boolean(value))
98
99 for (const host of loopback) {
100 if (items.some((value: string) => value.toLowerCase() === host)) continue
101 items.push(host)
102 }
103
104 process.env[key] = items.join(",")
105 }
106
107 upsert("NO_PROXY")
108 upsert("no_proxy")
109}
110
111function useSystemCertificates() {
112 try {

Callers 1

startFunction · 0.70

Calls 1

upsertFunction · 0.70

Tested by

no test coverage detected