# simple-hyperproxy

> P2P proxy built on top of [Hyperswarm DHT.](https://github.com/hyperswarm/dht)

Latest version **0.0.7** (published 2023-03-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install simple-hyperproxy
pnpm add simple-hyperproxy
yarn add simple-hyperproxy
bun add simple-hyperproxy
```

Provides the command `simple-hyperproxy`.

## 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.7 |
| Published | 2023-03-22 |
| First published | 2022-07-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | rafapaezbas |
| Maintainers | rafapaezbas |

## Links

- npm: https://www.npmjs.com/package/simple-hyperproxy
- Repository: https://github.com/rafapaezbas/simple-hyperproxy
- Homepage: https://github.com/rafapaezbas/simple-hyperproxy#readme
- Issues: https://github.com/rafapaezbas/simple-hyperproxy/issues
- npm.io page: https://npm.io/package/simple-hyperproxy

## Dependencies (5)

- [b4a](https://npm.io/package/b4a.md) ^1.5.3
- [streamx](https://npm.io/package/streamx.md) ^2.12.4
- [hyperdht](https://npm.io/package/hyperdht.md) ^6.5.2
- [@hyperswarm/dht](https://npm.io/package/@hyperswarm/dht.md) ^6.2.0
- [sodium-universal](https://npm.io/package/sodium-universal.md) ^3.1.0

## Recent versions

- 0.0.7 (latest) — 2023-03-22
- 0.0.6 — 2023-03-21
- 0.0.5 — 2023-03-20
- 0.0.4 — 2023-03-09
- 0.0.3 — 2022-07-17
- 0.0.2 — 2022-07-17
- 0.0.1 — 2022-07-17

## README

# Simple-Hyperproxy

P2P proxy built on top of [Hyperswarm DHT.](https://github.com/hyperswarm/dht)

```bash
npm install -g simple-hyperproxy
```

Requires Node version >= v14.17.0

## Usage

```bash
simple-hyperproxy expose [port]
# Exposed port on key [key]
```

```bash
simple-hyperproxy bind key
# Binded key on port [port] 
```

## Example

```js
const axios = require('axios');
const SimpleHyperProxy = require('simple-hyperproxy')
const proxy = new SimpleHyperProxy()

const server = http.createServer((req, res) => {
  // Define server
})

server.listen(8081, '127.0.0.1', () => {
})

const key = await proxy.expose(8081)
const bindPort = await proxy.bind(key)
console.log(await axios.get('http://localhost:' + bindPort))
```

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