agent-hyper
v1.0.0
Published
HTTP/HTTPS proxy agents with keep-alive support
Maintainers
Readme
agent-hyper
Based on hpagent by Tomas Della Vedova
Forked for personal needs. I recommend using the original package for most use cases.
HTTP/HTTPS proxy agents with persistent connections.
Installation
npm install agent-hyperUsage
import axios from 'axios'
import { HttpsProxyAgent, getUsualProxyAgentConfig } from 'agent-hyper'
// HttpProxyAgent is also available for HTTP requests
const httpsAgent = new HttpsProxyAgent({
...getUsualProxyAgentConfig(),
proxy: 'http://localhost:8080',
})
const client = axios.create({ httpsAgent })Default Configuration
getUsualProxyAgentConfig() returns:
{
keepAlive: true,
keepAliveMsecs: 1000,
scheduling: 'lifo',
timeout: 5000
}Features
- Keep-alive proxy connections
- Basic authentication support
- Custom proxy headers
- HTTPS proxy support
License
ISC
