# hsync

> client for hsync-server

Latest version **0.33.0** (published 2026-01-19) · ISC license · 0 weekly downloads

## Install

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

Provides the commands `hsync`, `sh-hsync`.

## Health

**Score 50/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.33.0 |
| Published | 2026-01-19 |
| First published | 2013-02-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 2.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Luis Montes |
| Maintainers | monteslu |
| Keywords | iot, json-rpc, ngrok, websocket, mqtt, proxy, reverse-proxy, vpn, tunnel |

## Links

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

## Dependencies (8)

- [mqtt](https://npm.io/package/mqtt.md) ^5.14.1
- [rawr](https://npm.io/package/rawr.md) ^0.19.0
- [b64id](https://npm.io/package/b64id.md) ^1.1.1
- [debug](https://npm.io/package/debug.md) ^4.4.3
- [buffer](https://npm.io/package/buffer.md) ^6.0.3
- [net-web](https://npm.io/package/net-web.md) ^0.3.0
- [commander](https://npm.io/package/commander.md) ^14.0.2
- [mqtt-packet](https://npm.io/package/mqtt-packet.md) ^9.0.2

## 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.33.0 (latest) — 2026-01-19
- 0.32.0 — 2026-01-16
- 0.31.0 — 2026-01-16
- 0.30.2 — 2024-12-11
- 0.30.1 — 2024-10-09
- 0.30.0 — 2024-04-27
- 0.29.0 — 2024-04-24
- 0.28.0 — 2024-04-24
- 0.27.0 — 2024-04-24
- 0.26.0 — 2024-04-24
- 0.25.0 — 2024-04-24
- 0.24.0 — 2023-10-31
- 0.23.0 — 2023-10-20
- 0.21.0 — 2023-10-16
- 0.20.0 — 2023-08-28
- … 18 more at https://npm.io/package/hsync/versions

## README

# hsync

[![CI](https://github.com/monteslu/hsync/actions/workflows/ci.yml/badge.svg)](https://github.com/monteslu/hsync/actions/workflows/ci.yml)
[![NPM](https://nodei.co/npm/hsync.svg)](https://nodei.co/npm/hsync/)

hsync is a [reverse-proxy](https://en.wikipedia.org/wiki/Reverse_proxy) client for node.js and browsers that connects to an [hsync-server](https://github.com/monteslu/hsync-server).

You can share your local webserver as a secure public URL, as well as tunnel whatever tcp/ip traffic you'd like between two hsync clients.

## installation

### npm
`npm i -g hsync`

### or add to a webpage
```
<script src="https://cdn.jsdelivr.net/npm/hsync/dist/hsync.min.js"></script>
```
this gives you a `hsync` global variable.


## run
`hsync`

## run with npx

`npx hsync`

## run inside of a webpage

```javascript
const hsyncCon = await hsync.dynamicConnect();
```

## configuration

by default hsync will connect to the default hsync.tech server and allow a connection for up to 4 hours.

However you can pass flags to the command line or configure env variables:

| flag | long flag              | type    | env variable       | description                                                |
| ---- | ---------------------  | ------- | ------------------ | ---------------------------------------------------------- |
| -p   | -port                  | number  | PORT               | port for local webserver                                   |  
| -d   | --dynamic-host         | url     | HSYNC_DYNAMIC_HOST | host to get a dynamic connection from                      |
| -s   | --hsync-server         | url     | HSYNC_SERVER       | hsync-server location ex: https://sub.mydomain.com           |
| -hs  | --hsync-secret         | string  | HSYNC_SECRET       | password to connect to hsync-server                        |
| -llp | --listener-local-port  | number  | HSYNC_LLP          | local port to open for listener                            |
| -lth | --listener-target-host | url     | HSYNC_LTH          | target host for listener                                   |
| -ltp | --listener-target-port | number  | HSYNC_LTP          | target port for listener                                   |
| -rip | --relay-inbound-port   | number  | HSYNC_RIP          | inbound port for remote relay requests                     |
| -rth | --relay-target-host    | url     | HSYNC_RTH          | target host for relay to open tcp connection on            |
| -rtp | --relay-target-port    | number  | HSYNC_RTP          | target port for relay to open tcp connection on            |

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