Skip to content

restyler/simple-proxy-agent

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-proxy-agent

Build status Package version NPM downloads Make a pull request License: MIT

An simple agent for HTTP and HTTPS through HTTP and SOCKS proxies

Todo

  • Proxy authentication

Table of Contents

Install

npm install simple-proxy-agent

Usage

const fetch = require('node-fetch');
const ProxyAgent = require('simple-proxy-agent');

fetch('example.com', {
  agent: new ProxyAgent('http://0.0.0.0:8080', {
    // Options, with all defaults
    tunnel: true, // If true, will tunnel all HTTPS using CONNECT method
    timeout: 5000, // Time in milli-seconds, to maximum wait for proxy connection to establish
  })
})
.then(res => res.text())
.then(body => console.log(body))
.catch(err => console.error(err))

License

MIT

About

Simple agent for sending HTTP and HTTPS traffik through HTTP and SOCKS proxies

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%