I was trying to capture the request I'm making using the node itself, but it doesn't return me anything the proxy-chain event functions, follow the code below:
import ProxyChain from "proxy-chain";
import krop from "krop";
const server = new ProxyChain.Server({ port: 8001 });
server.listen(() => {
console.log(`Proxy server is listening on port ${8001}`);
});
// Emitted when HTTP connection is closed
server.on("connectionClosed", ({ connectionId, stats }) => {
console.log(`Connection ${connectionId} closed`);
console.dir(stats);
});
// Emitted when HTTP request fails
server.on("requestFailed", ({ request, error }) => {
console.log(`Request ${request.url} failed`);
console.error(error);
});
await krop("www.google.com", {
http2: true,
proxy: "127.0.0.1:8001",
});
I was trying to capture the request I'm making using the node itself, but it doesn't return me anything the proxy-chain event functions, follow the code below: