Meshly
Meshly is a P2P reverse proxy and port-forwarding tool built on Iroh and QUIC — expose and consume services without port forwarding, accounts or root.
Meshly replaces the classic frpc ↔ frps ↔ visitor model with something much simpler:
a peer-to-peer mesh where every machine can both expose a local service and
consume a service published by a peer.
It is built on Iroh for QUIC connections, automatic NAT traversal and end-to-end encryption. There is no TUN/TAP, so it runs without root or administrator privileges.
Architecture
┌──────────────────────┐ ┌──────────────────────┐
│ provider client │ │ consumer client │
│ [[expose]] :18081 │ │ [[consume]] :19090 │
└──────────┬───────────┘ └──────────┬───────────┘
│ QUIC (Iroh) │ QUIC (Iroh)
│ direct P2P whenever possible │
└───────────────┬─────────────────┘
│ (fallback only)
┌──────────▼───────────┐
│ meshly-core-server │
│ control plane + │
│ service registry + │
│ data-plane relay │
└──────────────────────┘Three moving parts:
| Component | Binary | Role |
|---|---|---|
| Server | meshly-core-server | Owns the control plane (service registry) and a fallback data-plane relay |
| Provider client | meshly-core-client | Publishes a local service to the group ([[expose]], [[static]], [[ssh]]) |
| Consumer client | meshly-core-client | Subscribes to a peer's service and binds it on a local port ([[consume]], [[ssh_forward]]) |
The same client binary is both provider and consumer — which side it plays is
decided by the tables in its client.toml.
Wire model
- One Iroh connection per service, on ALPN
meshly-core/<service-name>. - Identity is an Iroh NodeID (a key pair stored at
<config_dir>/meshly-core/identity.key, or wherever[common].identity_pathpoints). - Auth is the NodeID plus a per-service shared secret, proven with an HMAC-SHA256 nonce handshake on the first bi-stream of a connection.
- A group token is required both to register and to subscribe.
- Data plane is a plain byte bridge — TCP in, TCP out — which is why every
service kind tunnels identically and the
kindlabel is only advisory metadata for humans and UIs.
Direct first, relay second
Clients dial peers directly over QUIC and let Iroh handle hole punching. When a direct path cannot be established, the connection falls back to the server's relay — the control plane never carries your bytes unless it has to. Relay bandwidth can be capped per consumer (see Self-hosting).
Scope
Today Meshly is TCP only, with NodeID identity, per-service shared secrets and group tokens. Not in scope yet: UDP, HTTP virtual hosting, TUN/TAP, per-stream auth, hot reload, ACLs and Prometheus metrics.
Where to go next
- Install — one-click CLI install, building from source, desktop app
- Quick start — write a
client.tomland connect two machines - Services —
[[expose]],[[static]],[[ssh]],[[ssh_forward]] - Pairing — accountless QR pairing
- Self-hosting — run your own
meshly-core-server
Source: wms-why/meshly · core: wms-why/meshly-core