# proxy-web

> Proxy-web is a proxy that will proxy websites in your browser. It'll proxy all resources (css, images, scripts) as well, replacing the urls with the proxy url.

Latest version **0.0.5** (published 2017-04-01) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2017-04-01 |
| First published | 2016-10-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Michael Villar |
| Maintainers | michaelvillar |
| Keywords | proxy, web |

## Links

- npm: https://www.npmjs.com/package/proxy-web
- Repository: https://github.com/michaelvillar/proxy-web
- Issues: https://github.com/michaelvillar/proxy-web/issues
- npm.io page: https://npm.io/package/proxy-web

## Dependencies (8)

- [ent](https://npm.io/package/ent.md) ^2.2.0
- [lodash](https://npm.io/package/lodash.md) ^4.16.3
- [express](https://npm.io/package/express.md) ^4.14.0
- [request](https://npm.io/package/request.md) ^2.75.0
- [htmlparser2](https://npm.io/package/htmlparser2.md) ^3.9.1
- [babel-polyfill](https://npm.io/package/babel-polyfill.md) ^6.16.0
- [escape-string-regexp](https://npm.io/package/escape-string-regexp.md) ^1.0.5
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.3

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.0.5 (latest) — 2017-04-01
- 0.0.4 — 2016-12-05
- 0.0.3 — 2016-10-06
- 0.0.2 — 2016-10-06
- 0.0.1 — 2016-10-06

## README

# Proxy-web

Proxy-web is a proxy that will proxy websites in your browser. It'll proxy all resources (css, images, scripts) as well, replacing the urls with the proxy url.

## Example with express

```
import proxyWeb from 'proxy-web';
import express from 'express';

const app = express();

const proxyRoute = (req, res) => {
  console.log('Proxying', req.query.url);
  proxyWeb({
    url: req.query.url,
    method: req.method,
    headers: req.headers,
  }, {
    proxyUrl: 'http://localhost:3000/proxy?url=',
  }).then((output) => {
    res.status(output.statusCode)
       .set(output.headers)
       .send(output.body);
  });
};

app.get('/proxy', proxyRoute);
app.post('/proxy', proxyRoute);
app.put('/proxy', proxyRoute);
app.delete('/proxy', proxyRoute);

app.listen(3000, () => {
  console.log(`Listening on 3000`);
});
```

## Testing locally

```
npm run build
node lib/app.js
```

Visit `http://localhost:3000/proxy?url=http://apple.com`

## API

```
proxyWeb(request, options)
- request:
  - url: URL to proxy
  - method: HTTP method (GET, POST,...)
  - headers: HTTP headers
- options:
  - proxyUrl: your proxy's url, i.e. http://example.com/proxy?url=
```

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