npm Internal NTLM Proxy Authentication


(Wallas F. Morais ∴) #1

Continuando a discussão do Common proxy and networking problems:

I couldn’t find a way to make this work. I have tried so much possibles solutions from everywhere without any success.

I really do not know how much trouble could be implement a way to configure ntml proxy functionality on npm config set https_proxy and the not https one. But, just for the record, neither using cntml, ntmaps, and others types of reverse proxy or any other proxy solution (that isn’t the company official one) is completely forbidden. (but i could tried, again without success).

The only way, right now that i could continuing using was using my S8+ phone as a internet provider (what isn’t allowed to, at least wasn’t mentioned to me yet that is forbidden).

And the company do not have a whitelisting domains for developers on my unit.

With all informations mentioned here in mind, i ask, is possible or viable to implement a npm ntml authentication internal solution? or on Windows (sadly or not) using the system connection proxy authentication?


(Wallas F. Morais ∴) #2

I changed from support to ideas, because after think more about this seems to be more a improvement over a issue. Even that this could be a trouble to me and many other users behind NTML Proxies (A lot companies that a I know use).


(Kat Marchán) #3

All the proxy stuff is handled by make-fetch-happen and the various proxy libraries it uses. Maybe one of those libraries supports NTML? If it doesn’t add a lot of weight, I’d totally take a patch that adds support for this. I don’t really know what it takes and I haven’t looked into it.


(Wallas F. Morais ∴) #4

I’ll analyse the package mentioned. And if I realize something I’ll share here.


(Wallas F. Morais ∴) #5

As far i can tell by looking on all libraries used by make-fetch-happen and the sub-package of, are not able to do NTLM authentication neither v1 or v2.

The agent-base used by https-proxy-agent and http-proxy-agent only implements, as quote copy-paste-from-git:

http-proxy-agent: An HTTP(s) proxy http.Agent implementation for HTTP endpoints
https-proxy-agent: An HTTP(s) proxy http.Agent implementation for HTTPS endpoints
pac-proxy-agent: A PAC file proxy http.Agent implementation for HTTP and HTTPS
socks-proxy-agent: A SOCKS (v4a) proxy http.Agent implementation for HTTP and HTTPS

verified from index.js.

From the Introduce Your Self topic i could see someone that worked on a package request-ntlm-lite from @jehy that could help.

I found that i have misspelled NTLM everywhere :blush: sry about that.


(Kat Marchán) #6

Sounds like you have a way forward, then. I look forward to your PR. :slight_smile:


(Jehy) #7

Hi, it’s Jehy, author of request-ntlm-lite here.
This is a fork of older ntlm module without extra dependencies and with up to date code.
We use it heavily in production and everything seems okay - feel free to use it : )


(Wallas F. Morais ∴) #8

@zkat I will try to,… I’ll keep here updated.
@jehy ty so much… #help-needed #help-wanted i tried (1x only so far) create a Agent in the https-proxy-agent but i was overwhelmed by all information needed (https-proxy-agent, agent-base, request-ntlm-lite, etc) and frozen out.


(system) #9

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.