ps

proxy-setup

Configure setting of web-proxy.

Showing:

Popularity

Downloads/wk

1

GitHub Stars

6

Maintenance

Last Commit

7yrs ago

Contributors

0

Package

Dependencies

2

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

proxy-setup

Configure setting of web-proxy. It's available on both script and terminal. Currently, works on Mac and Windows, not Linux. On Mac, need to enter a password of superuser. On Windows, need to restart IE after configuring.

Install

npm install -g proxy-setup

Usage

script

var ps = require('proxy-setup');

// set web-proxy
ps.web.server = 'localhost:8080';
ps.web.server = '127.0.0.1';

// clear web-proxy
ps.web.server = '';

// enable and disable
ps.web.enabled = true;
ps.web.enabled = false;


// save current setting and restore it

console.log(ps.web.enabled) //=> false
console.log(ps.web.server)  //=> ''

ps.web.save();

ps.web.enabled = true;
ps.web.server = 'temp-server:9999';

console.log(ps.web.enabled) //=> true
console.log(ps.web.server)  //=> temp-server:9999

ps.web.restore();

console.log(ps.web.enabled) //=> false
console.log(ps.web.server)  //=> ''

terminal

# get information current web-proxy
proxysetup #=> { enabled: true, server: 'localhost:8080' }

# enable web-proxy
proxysetup -e

# disable web-proxy
proxysetup -d

# set web-proxy
proxysetup -h localhost:8080
proxysetup -h 127.0.0.1

# clear web-proxy
proxysetup -h

# set web-proxy and enable
proxysetup -e -h localhost:8080

Test

npm test

License

Licensed under the MIT license.

Special thanks to

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100