d2 icon indicating copy to clipboard operation
d2 copied to clipboard

CLI Support for forward proxies

Open damnhandy opened this issue 1 year ago • 1 comments

I'm trying to use the D2 CLI and VSCode extension from behind a corporate proxy. Anytime a remote icon is referenced, it results in a Bad Gateway response. It would seem that the CLI doesn't honor the http_proxy or HTTP_PROXY environment variables and attempts to go directly to the internet, which ultimately fails. It would be great to add this support either by reading the environment variables or via a command flag such as --http-proxy=myproxy.corp --no-proxy=127.0.0.0,*.corp.

damnhandy avatar Jul 08 '24 14:07 damnhandy

The CLI doesn't overwrite it in any way. If the remote icon uses https, you need HTTPS_PROXY.

alixander avatar Jul 18 '24 22:07 alixander