set-browser-proxy

1.0.4 • Public • Published

browser-proxy

auto set your browser proxy.

Usage

const {setBrowserProxy} = require('set-browser-proxy');
 
setBrowserProxy({
    // if don't specify this, won't open http proxy
    http: {
        host: '127.0.0.1',
        port: '3000'
    },
    // same as above
    https: {
        host: '127.0.0.3',
        port: '8084'
    }
});

maybe you need close the proxy after

const {closeBrowserProxy} = require('set-browser-proxy');
 
closeBrowserProxy()
 
// or
closeBrowserProxy({
    http: false,        // if true, close http proxy, default true
    https: false        // same as above
});

Demo

example

Readme

Keywords

Package Sidebar

Install

npm i set-browser-proxy

Weekly Downloads

1

Version

1.0.4

License

ISC

Unpacked Size

4.33 kB

Total Files

5

Last publish

Collaborators

  • challenget