1.0.4 • Published 6 years ago

set-browser-proxy v1.0.4

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

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