Convert functions to HTTP agents
agent-baseskillsetup L2★0
TooTallNate/proxy-agents ↗What it does
Wrap async connect logic as http.Agent
Best for
Route HTTP requests through custom sockets (proxy, SOCKS, PAC agents)
Inputs
- · connect(req, opts) async function returning Duplex or Agent
Outputs
- · custom http.Agent subclass instance
Requires
- · Node.js net/tls modules
Preconditions
Node.js http/https module usage
Failure modes
- · Synchronous connect() hangs if called during socket creation
Trust signals
- · Base class for http-proxy-agent, https-proxy-agent, socks-proxy-agent
- · Detects secureEndpoint to route to tls.Socket vs net.Socket