2.3.2 • Published 11 months ago

cross-os-proxy v2.3.2

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

cross-os-proxy

configure system proxy settings

support platforms:

  • windows
  • macOS

Install

$ npm i --save cross-os-proxy

Usage

const osProxy = require('cross-os-proxy');

(async () => {
    await osProxy.setProxy('127.0.0.1', 9999); // set http and https proxy
    console.log('done');
})();

(async () => {
    await osProxy.closeProxy(); // close http and https proxy
    console.log('done');
})();

or you want to set authenticated proxy, just pass username and password as the third and fourth parameter

(async () => {
    await osProxy.setProxy('127.0.0.1', 9999, 'username', 'password');
    console.log('done');
})();

Using on the command line

$ npm i cross-os-proxy -g
Usage: osProxy on <host> <port> [<username>] [<password>]
Usage: osProxy off

example

osProxy on 127.0.0.1 1234 name password
osProxy off
2.3.0

11 months ago

2.2.0

11 months ago

2.3.2

11 months ago

2.3.1

11 months ago

2.0.1

2 years ago

2.0.0

3 years ago

1.0.0

3 years ago