Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.
/ auto-tunnel Public archive

Simple HTTP(S) proxy tunnelling agents.

License

Notifications You must be signed in to change notification settings

stevenvachon/auto-tunnel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

auto-tunnel NPM Version Build Status

Simple HTTP(S) proxy tunnelling agents.

Installation

Node.js >= 4 is required. To install, type this at the command line:

npm install auto-tunnel

Usage

const http = require('http');
const tunnel = require('auto-tunnel');

http.get({
    agent: tunnel('http://hostname/'),
    host: 'hostname',
    path: '/'
}, function(response) {
    
});

You can override the internal environmental variable (HTTP_PROXY, etc) check with proxyUrl:

tunnel('http://hostname/', {
    proxyUrl: 'http://proxy/'
})

You can supply headers to the proxy with proxyHeaders:

tunnel('http://hostname/', {
    proxyHeaders: {
        'user-agent': 'my app'
    }
})

About

Simple HTTP(S) proxy tunnelling agents.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published