coreybutler/nvm-windows

[Issue]: connectex behind proxy

Opened this issue · 5 comments

What happened?

image
image
PROBLEMS DETECTED

Connection to nodejs.org cannot be established. Check your proxy (none) and your physical internet connection.

Could not connect to nodejs under network proxy while curl works fine.

What did you expect to happen?

no exception

Version

1.1.11 or newer (Default)

Which version of Windows?

Windows 11+

Which locale?

English (Default)

Which shell are you running NVM4W in?

PowerShell

User Permissions?

Administrative Privileges, Elevated

Is Developer Mode enabled?

None

Relevant log/console output

$ nvm ls available

Could not retrieve https://nodejs.org/dist/index.json.


Get "https://nodejs.org/dist/index.json": proxyconnect tcp: dial tcp 172.18.100.92:8080: connectex: An attempt was made to access a socket in a way forbidden by its access permissions.

Debug Output

Running NVM for Windows with administrator privileges.

Administrator: PowerShell
Windows Version: 10.0 (Build 22631)

NVM4W Version:      1.1.12
NVM4W Path:         C:\Users\xxx\AppData\Roaming\nvm\nvm.exe
NVM4W Settings:     C:\Users\xxx\AppData\Roaming\nvm\settings.txt
NVM_HOME:           C:\Users\xxx\AppData\Roaming\nvm
NVM_SYMLINK:        C:\Program Files\nodejs
Node Installations: C:\Users\xxx\AppData\Roaming\nvm

Total Node.js Versions: 5
Active Node.js Version: v20.14.0

PROBLEMS DETECTED
-----------------
Connection to nodejs.org cannot be established. Check your proxy (none) and your physical internet connection.


Find help at https://github.com/coreybutler/nvm-windows/wiki/Common-Issues

Anything else?

No response

This could be something as simple as curl being recognized/allow-listed by the proxy while NVM for Windows is not. Regardless, this is a proxy problem, not an NVM for Windows problem. That said, if I knew what is forbidden, and if there is a possibility I could add something to NVM for Windows to make it more compatible with common proxies, I'd be open to doing so.

Hi,
I'm having a problem behind the proxy.
Actually my problem is that i'm behind an authenticated proxy.
I dont know how to do it in GO language, en .net is an option to use the windows user identity to authenticate to the proxy.
Is there any chance to add something like that?.

@GuillermoOdoneYPF you don't need to program anything. There are two approaches:

1. Using NVM for Windows

nvm proxy http://username:password@proxy-server:port

2. Using Environment Veriables

You can set HTTP_PROXY (or HTTPS_PROXY) to http://username:password@proxy-server:port

Hi, the thing is it uses IWA; it dont accept username:password. (uses NTLM)

This isn't something I can easily add support for, but it is something we can put on the Runtime roadmap.

In the meantime, you'd likely need an intermediary. A quick ChatGPT session suggested cntlm.