soheilhy/cmux
Connection multiplexer for GoLang: serve different services on the same port! observed · 2026-08-28
Health v2 · maintenance only
62/100
- Activity 86
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4053
- days_rel: n/a
- days_push: 86
- n_releases_24m: 0
Adoption not part of the score
2767 stars · 206 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
cmux is a Go library that multiplexes TCP connections based on their payload, allowing multiple protocols like gRPC, HTTP, HTTPS, and SSH to be served on the same port. It matches the first bytes of each connection and routes it to the appropriate protocol-specific listener.
Use cases
- serve grpc and http on the same port
- multiplex multiple protocols on one tcp listener
- run ssh and https behind a single port
- route connections by protocol payload in go
- expose rest and grpc apis on one endpoint
- share a port between multiple go servers
When to choose
- you need to serve multiple protocols on a single port behind a firewall or load balancer
- you want to combine gRPC and HTTP/REST on one endpoint in Go
- you need lightweight protocol sniffing with negligible overhead on long-lived connections
When to avoid
- you need http.Request.TLS populated in handlers for HTTPS
- a single connection must switch between protocols mid-stream
- you use Java gRPC clients and cannot use MatchWithWriters
Facets
library · maturity maintenance
networking middleware http-server rpc networking backend developer-tools apis go cross-platform connection-multiplexing tcp grpc protocol-matching single-port
1 source
- readme: https://github.com/soheilhy/cmux · fetched 2026-08-28 · a6fd152351cc
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| soheilhy/cmux | main | 62 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem