global-proxy

Set system proxy for mac and windows platform.


Keywords
proxy, system, global, mac, win
License
MIT
Install
npm install global-proxy@0.0.4

Documentation

global-proxy

Set system proxy for mac and windows platform.

MIT License

Installation

$ npm install --save global-proxy

Usage

import globalProxy from 'global-proxy';


// globalProxy.enable(hostname, port[, protocol])
globalProxy.enable('127.0.0.1', 9000, 'http')
  .then((stdout) => {
    console.log(stdout);
  })
  .catch((error) => {
    console.log(error);
  });


globalProxy.disable()
  .then((stdout) => {
    console.log(stdout);
  })
  .catch((error) => {
    console.log(error);
  });

Related

Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please create an issue.