yrutschle/sslh is an open-source project on GitHub with 5.1k stars, written primarily in C. Applicative Protocol Multiplexer (e.g. share SSH and HTTPS on the same port)
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
sslh accepts connections on specified ports, and forwards
them further based on tests performed on the first data
packet sent by the remote client.
Probes for HTTP, TLS/SSL (including SNI and ALPN), SSH, WireGuard,
OpenVPN, tinc, XMPP, SOCKS5, are implemented, and any other
protocol that can be tested using a regular expression, can
be recognised. A typical use case is to allow serving
several services on port 443 (e.g. to connect to SSH from
inside a corporate firewall, which almost never block port
443) while still serving HTTPS on that port.
Hence sslh acts as a protocol demultiplexer, or a
switchboard. With the SNI and ALPN probe, it makes a good
front-end to a virtual host farm hosted behind a single IP
address.
sslh has the bells and whistles expected from a mature
daemon: privilege and capabilities dropping, inetd support,
systemd support, transparent proxying, support for HAProxy's
proxyprotocol, chroot, logging, IPv4 and IPv6, TCP and UDP,
a fork-based, a select-based model, and yet another based on
libev for larger installations.
Install
Please refer to the install guide.
Security
Matthias Gerstner from OpenSUSE has performed a code review
of sslh from a security point of view, which revealed a
number of problems, including two CVE. His findings have
already been taken partly into account for the more critical
ones. The full
review
is well worth reading if you are using sslh in production.
Part of the securing your installation involves configuring
connection limits. This is described in this
guide.
Configuration
Please refer to the configuration guide.
Transparent proxying
Transparent proxying allows the target server to see the
original client IP address, i.e. sslh becomes invisible.
The same result can be achieved more easily by using
proxyprotocol if the backend server supports it. This is a
simple setting to add to the sslh protocol configuration,
usually with an equivalently simple setting to add in
the backend server configuration, so try that first. This is
explained in a separate document.
This means services behind sslh (Apache, sshd and so on)
will see the external IP and ports as if the external world
connected directly to them. This simplifies IP-based access
control (or makes it possible at all), and makes it possible
to use IP-based banning tools such as fail2ban.
There are two methods. One uses additional virtual network
interfaces. The principle and basic setup is described
here, with further
scenarios described there.
There is also a guide to use podman.
Another method uses iptable packet marking features, and is
highly dependent on your network environment and
infrastructure setup. There is no known generic approach,
and if you do not find directions for your exact setup, you
will probably need an extensive knowledge of network
management and iptables setup".
It is described in its own document.
In most cases, you will be better off following the first
method.
Yes — yrutschle/sslh ships under the GPL-2.0 license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/yrutschle/sslh.
What is yrutschle/sslh?
yrutschle/sslh (yrutschle/sslh) is a C project on GitHub. From the project's own README: Applicative Protocol Multiplexer (e.g. share SSH and HTTPS on the same port)
Where do I read more about yrutschle/sslh?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/yrutschle/sslh is the definitive source.
Read full README in the tab above.
Still deciding about sslh?
One click hands the question to an AI along with this page — see what it says about sslh.