# cloudberry

> HTTP/HTTPS middleware driven proxy server

Latest version **0.0.8** (published 2017-09-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install cloudberry
pnpm add cloudberry
yarn add cloudberry
bun add cloudberry
```

Provides the command `cloudberry`.

## 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.8 |
| Published | 2017-09-15 |
| First published | 2016-08-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+16 in 1 direct dependencies) |
| Install scripts | yes |
| Author | monai |
| Maintainers | monai |
| Keywords | http, https, proxy, middleware, tls, decrypt |

## Links

- npm: https://www.npmjs.com/package/cloudberry
- Repository: https://github.com/monai/cloudberry
- Homepage: https://github.com/monai/cloudberry#readme
- Issues: https://github.com/monai/cloudberry/issues
- npm.io page: https://npm.io/package/cloudberry

## Dependencies (5)

- [nan](https://npm.io/package/nan.md) ^2.7.0
- [dezalgo](https://npm.io/package/dezalgo.md) ^1.0.3
- [bindings](https://npm.io/package/bindings.md) ^1.3.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [node-forge](https://npm.io/package/node-forge.md) ^0.7.1

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.8 (latest) — 2017-09-15
- 0.0.7 — 2017-09-15
- 0.0.6 — 2017-09-15
- 0.0.5 — 2017-09-15
- 0.0.4 — 2016-08-06
- 0.0.3 — 2016-08-06
- 0.0.2 — 2016-08-06
- 0.0.1 — 2016-08-06

## README

# cloudberry

[![NPM Version](http://img.shields.io/npm/v/cloudberry.svg)](https://www.npmjs.org/package/cloudberry)

Cloudberry is HTTP/HTTPS middleware driven proxy server.

## Generate CA signing identity

Generate signing identity:

```shell
cloudberry
```

Generate signing identity and save to macOS default keychain:

```shell
cloudberry -K
```

## Usage

```js
const proxy = require('cloudberry');

const key =
`-----BEGIN RSA PRIVATE KEY-----
<...>
-----END RSA PRIVATE KEY-----`;

const cert =
`-----BEGIN CERTIFICATE-----
<...>
-----END CERTIFICATE-----`;

proxy.keychain.getDefaultIdentity((error, identity) => {
  if (error) {
    identity = { key, cert }; // if not on macOS
  }

  const ca = proxy.ca(identity);
  const server = proxy.createServer({
    SNICallback: ca.SNICallback()
  }, (req, res) => {
    console.log('>', req.url);
    proxy.request(ca)(req, res).on('error', console.error);
  });

  proxy(server).listen(8000);
});
```

## License

ISC

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