TooTallNate / proxy-agents

Node.js HTTP Proxy Agents Monorepo
https://proxy-agents.n8.io
872 stars 229 forks source link

Any method to listen for data on proxy server? #257

Closed ghost closed 4 months ago

ghost commented 8 months ago

Hello.

I would like to know if there is any method to add listener to log data for proxy package.

Thanks.

TooTallNate commented 8 months ago

Which kind of data are you interested in? Are the debug logs sufficient? Try starting the proxy with the DEBUG env var set:

DEBUG=proxy:* proxy
ghost commented 8 months ago

@TooTallNate Would like to parse data chunk inside the socket received from the proxy server, how would it be possible? Where should I add the listener and concat those incoming data?