Closed yovanoc closed 1 year ago
What do you mean by "rotating proxies"? Can you show some example code?
Like https://smartproxy.com/.
Its a simple proxy that redirect to a fresh proxy for each request, but here, I think when he switch from the first to the second the socket is closed instead of following to the real proxy
News for this, only happened with node 14, on node 12 all is fine! I didn't dig deeper this but only changing node version "fix" this issue
Hi @yovanoc, can you provide an example of how you got it working? I am currently trying to work with rotating proxies in Node.js and I am getting some errors related to socket.
@leonardomso I use Got with http2 option and this to proxy https://github.com/szmarczak/http2-wrapper
@yovanoc can you show me an example, please?
import got from "got";
import http2 from "http2-wrapper";
const agent = new http2.proxies.Http2OverHttp({
url: "http://username:password@ip:port", // YOUR PROXY HERE
proxyOptions: {
// If the proxy doesn't process TLS sockets automatically, set this to `true`.
raw: true
}
});
const client = got.extend({
http2: true,
agent: {
http2: agent
},
});
@yovanoc thanks!
This module has gone through a large refactor and modernization. I am closing this issue as a bit of house cleaning. If you feel that this issue still exists in the latest release, feel free to open a new issue.
Hello,
I tried to use rotating proxies with this agent.
I get a "Socket is closed". My opinion is that when the agent request the service to get another proxy the socket is closed here and not follow the real proxy
But when I use this lib https://github.com/koichik/node-tunnel all is working good. But i would like to use https-proxy-agent. Rotating proxy is really working or not?