socketry / async-http

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Username and password proxy support

jonnynux opened this issue · comments

It can be useful to implement support for proxies that need authentication.

Do you mean the proxy-authenticate header?

We use a proxy with NTLM authentication, setting the proper headers is enough?

It should be!

Please, can you add in the readme how to send requests through a proxy?
For example I want to make multiple async requests for some URLs through a proxy "proxy.local" port 8080.

I will add an example, in the mean time you can refer to the specs: https://github.com/socketry/async-http/blob/master/spec/async/http/proxy_spec.rb

The proxy authentication using NTLM is much more than a straight header authentication:

https://docs.microsoft.com/en-us/openspecs/office_protocols/ms-grvhenc/b9e676e7-e787-4020-9840-7cfe7c76044a

It needs to get a challenge from the proxy, reply with a response (now with a header), then move on. The question is: does your software support NTLM proxy auth, or should we implement it ourselves then pass the authentication header to the Proxy object? Thanks.

Nope, async-http doesn't support NTLM proxy authentication. If this is a commercial project, I am happy to provide consulting services to implement this feature.

We found another gem, more suitable for our purpose, I close the issue.

What gem are you using that supports NTLM proxy authentication?

There are many gems that support it. We've evidence that RestClient supports it and I am inclined to think that httparty supports it as well. But to have async requests with NTLM proxy auth we're trying em-http-request.

Good luck with EventMachine. Last time I tried it, it core dumped when using IPv6.