# proxy-setup

> Configure setting of web-proxy.

Latest version **1.0.3** (published 2015-01-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install proxy-setup
pnpm add proxy-setup
yarn add proxy-setup
bun add proxy-setup
```

Provides the command `proxysetup`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2015-01-12 |
| First published | 2015-01-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | takanopontaro |
| Maintainers | takanopontaro |
| Keywords | proxy, networksetup |

## Links

- npm: https://www.npmjs.com/package/proxy-setup
- Repository: https://github.com/takanopontaro/node-proxy-setup
- Issues: https://github.com/takanopontaro/node-proxy-setup/issues
- npm.io page: https://npm.io/package/proxy-setup

## Dependencies (2)

- [minimist](https://npm.io/package/minimist.md) ^1.1.0
- [fallback-exec-sync](https://npm.io/package/fallback-exec-sync.md) 0.0.1

## Recent versions

- 1.0.3 (latest) — 2015-01-12
- 1.0.2 — 2015-01-03
- 1.0.1 — 2015-01-03

## 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

```shell
npm install -g proxy-setup
```


## Usage

### script

```js
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

```shell
# 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

```shell
npm test
```


## License

Licensed under the MIT license.


## Special thanks to

* [Keiko Kitagawa](http://official.stardust.co.jp/keiko/)

---
_Source: https://npm.io/package/proxy-setup · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
