antfu/vscode-iconify

can add proxy config?

lanseria opened this issue ยท 3 comments

[ant-design] Downloading from https://raw.githubusercontent.com/iconify/collections-json/master/json//ant-design.json
๐Ÿ› ERROR: Error: getaddrinfo ENOENT raw.githubusercontent.com
Error: getaddrinfo ENOENT raw.githubusercontent.com
	at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26)
antfu commented

Guess maybe it's better to use a global proxy or whitelist your VS Code.

wuyiw commented

FYI: it seems that axios(use by vscode-iconify) can't get https content via http proxy: axios/axios#658 and to make it work with socks5 proxy some extra work is needed: axios/axios#636.

After having proxy issues, I've investigated a little bit:
Seems that axios uses the http_proxy / https_proxy env variables (axios/axios#366) but, like @wuyiw mentioned, it is not possible to get https content via a http proxy (axios/axios#658) which is quite common in bigger networks.
I can't believe that there is no js http client out there that makes things right!?! If somebody knows of a js http client library that handles proxies correct, i would love to create a pr to make the plugin work for all people behind proxies.