nodal
nodal copied to clipboard
Can't use Nodal behind corporate proxy
I tried to use nodal poly:login behind a corporate proxy and was unable to connect. I've set various env variables (HTTP_PROXY, http_proxy, HTTPS_PROXY, https_proxy).
That's not good, what's the error you're getting? What corporation? If you e-mail me specifically (keith at polybit) I can get some more information from you and we might be able to solve this a little faster.
The core issue lies with
https://github.com/keithwhor/api-res/blob/master/module.js
which uses the raw http
library which doesn't care about proxy settings.
Consider using the request
package instead for your HTTP requests.
It will automatically pick up any proxy-specific environment variables.
@beders I had a similar issue when trying to use npm and no matter what I tried, I couldn't get it to work behind a corporate proxy. Eventually I installed Fiddler, set my env vars to use Fiddler as a proxy and it all works great. I'm not sure if it will help you in this particular scenario, but it's worth a shot.
For example, here's my .npmrc
:
registry=https://registry.npmjs.org
proxy=http://127.0.0.1:8888
https-proxy=http://127.0.0.1:8888
http-proxy=http://127.0.0.1:8888
strict-ssl=false