# socket.io-cap

> Proxy server for capturing and modifying socket.io data

Latest version **4.0.2** (published 2020-07-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install socket.io-cap
pnpm add socket.io-cap
yarn add socket.io-cap
bun add socket.io-cap
```

## 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 | 4.0.2 |
| Published | 2020-07-23 |
| First published | 2018-09-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | shia |
| Maintainers | subns |
| Keywords | socket.io, socketio, proxy, mitm, capture, intercept, debug, fiddler, wssip |

## Links

- npm: https://www.npmjs.com/package/socket.io-cap
- Repository: https://github.com/subgb/socket.io-cap
- Homepage: https://github.com/subgb/socket.io-cap#readme
- Issues: https://github.com/subgb/socket.io-cap/issues
- npm.io page: https://npm.io/package/socket.io-cap

## Dependencies (5)

- [chalk](https://npm.io/package/chalk.md) ^2.4.1
- [hoxyws](https://npm.io/package/hoxyws.md) ^3.6.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.19
- [shiajs](https://npm.io/package/shiajs.md) ^1.1.0
- [socket.io](https://npm.io/package/socket.io.md) ^2.3.0

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

- 4.0.2 (latest) — 2020-07-23
- 4.0.1 — 2020-07-23
- 4.0.0 — 2020-07-23
- 3.0.2 — 2020-07-21
- 3.0.1 — 2020-07-21
- 3.0.0 — 2020-07-15
- 2.0.4 — 2020-04-24
- 2.0.3 — 2020-04-01
- 2.0.2 — 2018-09-24
- 2.0.1 — 2018-09-24
- 2.0.0 — 2018-09-24
- 1.0.0 — 2018-09-23

## README

# socket.io-cap

Proxy server for capturing socket.io data.

## Installation

```bash
npm install socket.io-cap
```

## Example


```js
const fs = require('fs');
const IOProxy = require('socket.io-cap');

const hoxyOpts = {
  certAuthority: {
    key: fs.readFileSync('./ca-key.pem'),
    cert: fs.readFileSync('./ca-crt.pem'),
  }
};
const proxy = new IOProxy(hoxyOpts).listen(8889);

proxy.on('conn', ctx => {
  //ctx.proxy = 'socks://localhost:1080';
  proxy.showConn(ctx, {
    showHeader: false,
  });
});

proxy.on('engine', ctx => {
  proxy.showEnginePacket(ctx, {
    showUrl: true,
    showRaw: false,
    showParsed: true,
    skipMessage: true,
  });
});

proxy.on('socket', ctx => {
  proxy.showSocketPacket(ctx, {
    showUrl: true,
    showRaw: false,
    showParsed: true,
    skipMessage: true,
  });
});

proxy.on('message', ctx => {
  proxy.showMessage(ctx, {
    showUrl: true,
    showArgs: true,
  });
});
```

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