2.0.0 • Published 9 years ago

system-proxy v2.0.0

Weekly downloads
6
License
-
Repository
github
Last release
9 years ago

system-proxy: Set system proxy for mac & windows platform

Installing:

 npm install system-proxy

Usage:

var proxy = require('system-proxy');

proxy.setProxyOn(p[0], p[1])
  .then(function() {
    console.log('Proxy on ok!');
  })
  .catch(function() {
    console.log('fail');
  });

proxy.setProxyOff()
  .then(function() {
    console.log('Proxy off ok!');
  })
  .catch(function() {
    console.log('fail');
  });

terminal

# disable web-proxy
system-proxy -d

# set web-proxy
system-proxy -h localhost:8080