Skip to content

Set system proxy for mac and windows platform.

License

Notifications You must be signed in to change notification settings

musistudio/global-proxy

 
 

Repository files navigation

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.

About

Set system proxy for mac and windows platform.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%