Björn Ketelaars d57a155bf4 Fix (some) failing tests
Found a couple of failing tests on Alpine Linux and OpenBSD. For the
tests to even run `ip4-localhost` has to be changed to an IP-address
(127.0.0.1). `ip4-localhost` is typically not part of `/etc/hosts`.

Output failing tests:

```
not ok 5
udp: 0
prefix: tls:
listen [1]:
    host: localhost
    port: 9025
flushing deferred data to fd 9
selecting... max_fd=11 num_probing=0
activity on fd8
closing fd 8
closing fd 9
selecting... max_fd=11 num_probing=0
#   Failed test at ./t line 59.
#          got: '1'
#     expected: 'sslh-select: Connect and write nothing'
```

```
not ok 22 - sslh-select:ssh: probe connected correctly
#   Failed test 'sslh-select:ssh: probe connected correctly'
#   at ./t line 59.
#          got: 'regex'
#     expected: 'ssh'
```

```
not ok 68 - sslh-select:ssh: probe connected correctly
#   Failed test 'sslh-select:ssh: probe connected correctly'
#   at ./t line 59.
#          got: 'regex'
#     expected: 'ssh'
```

Diff works around issues causing tests 22 and 68 to fail. As of yet, no
workaround for test 5 has been found.
2021-10-27 19:52:06 +02:00
2013-09-16 22:02:29 +02:00
2020-01-02 09:24:32 +00:00
2021-09-27 13:28:21 +02:00
2021-10-02 21:27:31 +02:00
2014-03-30 18:09:16 +02:00
2019-04-06 17:26:08 +05:00
2021-09-27 13:28:21 +02:00
2021-09-27 12:51:37 +02:00
2021-10-02 21:23:39 +02:00
2021-09-15 21:51:11 +02:00
2021-09-27 13:28:21 +02:00
2021-10-02 15:38:22 +02:00
2021-10-02 15:38:22 +02:00
2021-10-02 21:23:17 +02:00
2021-09-27 13:28:21 +02:00
2021-10-02 15:38:22 +02:00
2021-10-27 19:52:06 +02:00
2021-09-27 13:16:30 +02:00
2013-10-06 12:09:52 +02:00
2021-09-27 12:43:03 +02:00
2020-12-06 15:50:08 +01:00

sslh -- A ssl/ssh multiplexer

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, 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, chroot, logging, IPv4 and IPv6, TCP and UDP, a fork-based and a select-based model, and more.

Install

Please refer to the install guide.

Configuration

Please refer to the configuration guide.

Docker image

How to use


Build docker image

make docker
docker container run \
  --rm \
  -it \
  --listen=0.0.0.0:443 \
  --ssh=hostname:22 \
  --tlshostname:443 \
  sslh:latest

docker-compose example

---
version: "3"

services:
  sslh:
    image: sslh:latest
    hostname: sslh
    ports:
      - 443:443/tcp
    command: --listen=0.0.0.0:443 --tlshostname:443 --openvpn=openvpn:1194
    depends_on:
      - nginx
      - openvpn

  nginx:
    image: nginx
    hostname: nginx

  openvpn:
    image: openvpn:latest
    hostname: openvpn

Comments? Questions?

You can subscribe to the sslh mailing list here: https://lists.rutschle.net/mailman/listinfo/sslh

This mailing list should be used for discussion, feature requests, and will be the preferred channel for announcements.

Of course, check the FAQ first!

Description
No description provided
Readme 3.9 MiB
Languages
C 91.6%
Perl 4.8%
Shell 2.3%
Makefile 0.8%
Scilab 0.3%
Other 0.2%