system-proxy
v2.0.0
Published
Set system proxy for mac and windows platform
Downloads
204
Readme
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