global-proxy
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

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.

Package Sidebar

Install

npm i global-proxy

Weekly Downloads

2

Version

0.0.4

License

MIT

Unpacked Size

8.44 kB

Total Files

11

Last publish

Collaborators

  • bubkoo