This would solve...
Currently, I'm working on gh and copilot CLIs, and we use undici in the latter. We had a report that gh supported schema-less HTTP_PROXY (e.g. HTTP_PROXY=localhost:9000 gh ...) but copilot did not.
When I looked into this, I saw that the EnvHttpProxyAgent passes the env vars verbatim to the underlying client. However, in Go, which gh is written in the proxy env var behaviour is as follows:
The environment values may be either a complete URL or a "host[:port]", in which case the "http" scheme is assumed. An error is returned if the value is a different form.
I'm not sure whether this is behavior you really want, since it may be surprising, but I thought I'd bring it to your attention with a point of comparison for your consideration. Cheers.
This would solve...
Currently, I'm working on
ghandcopilotCLIs, and we useundiciin the latter. We had a report thatghsupported schema-lessHTTP_PROXY(e.g.HTTP_PROXY=localhost:9000 gh ...) butcopilotdid not.When I looked into this, I saw that the
EnvHttpProxyAgentpasses the env vars verbatim to the underlying client. However, in Go, whichghis written in the proxy env var behaviour is as follows:I'm not sure whether this is behavior you really want, since it may be surprising, but I thought I'd bring it to your attention with a point of comparison for your consideration. Cheers.