apify / proxy-chain

Node.js implementation of a proxy server (think Squid) with support for SSL, authentication and upstream proxy chaining.

Home Page:https://www.npmjs.com/package/proxy-chain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

https request identification

elpaxel opened this issue · comments

When I am sending request to HTTPS page through proxy-chain with prepareRequestFunction there is no useful info about request for identification.
For example if I am opening one HTTPS website two times in a row I want it to be passed through different proxies. But next time when I will open this website two times I need it to use the same proxies.

Actually, there is no such thing as HTTPS proxy. HTTPS traffic goes over a normal HTTP proxy using the HTTP CONNECT tunnel. Have you tried using http://username:password@proxy.example.com:3128 ?

Thanks for your answer, but I'm solved my previous problem with https://github.com/sjitech/proxy-login-automator. I've edited my question.
My new question about this issue: https://github.com/GoogleChrome/puppeteer/issues/678#issuecomment-389096077
When I'm opening HTTPS page I don't see anything useful in request.headers. It's because HTTPS cannot be intercepted I think. So how can I pass some usefull info and catch it in prepareRequestFunction ?

The only parameters you can see in the prepareRequestFunction are: proxy username and password, hostname, port. For example, Apify Proxy uses username to pass configuration settings.

Potentially we could also process headers passed to HTTP CONNECT request, but AFAIK there is no easy way to pass these headers from Chrome.

I'm closing this issue for now, please reopen it if needed.