Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: The default configuration is invalid (sslhcfg: invalid option "--ssl") #473

Open
Colk-tech opened this issue Sep 28, 2024 · 2 comments

Comments

@Colk-tech
Copy link

Colk-tech commented Sep 28, 2024

When I tried to install sslh on Ubuntu 22.04 via apt, I noticed that the --ssl option in the default configuration is invalid.
Shouldn't it be --tls instead?
I'm sorry if this is already fixed in new versions.

Version

sslh-fork 1.22c-1

default config

DAEMON=/usr/sbin/sslh

DAEMON_OPTS="--user sslh --listen <change-me>:443 --ssh 127.0.0.1:22 --ssl 127.0.0.1:443"

log

Sep 28 19:18:17 160-251-7-236 systemd[1]: Started sslh.service - SSL/SSH multiplexer.
Sep 28 19:18:17 160-251-7-236 sslh[5587]: sslhcfg: invalid option "--ssl"
Sep 28 19:18:17 160-251-7-236 sslh[5587]: sslhcfg: unexpected argument "127.0.0.1:443"
Sep 28 19:18:17 160-251-7-236 sslh[5587]:  [-Vfin] [-F <file>] [-v <n>] [--transparent] [-t <n>] [-u <str>] [-P <file>] [-C <path>] [--syslog-facility=<str>] [--on-timeout=<str>] [--prefix=<str>] [-p <host:port>>
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   -F, --config=<file>              Specify configuration file
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   -v, --verbose=<n>
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   -V, --version                    Print version information and exit
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   -f, --foreground                 Run in foreground instead of as a daemon
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   -i, --inetd                      Run in inetd mode: use stdin/stdout instead of network listen
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   -n, --numeric                    Print IP addresses and ports as numbers
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   --transparent                    Set up as a transparent proxy
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   -t, --timeout=<n>                Set up timeout before connecting to default target
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   -u, --user=<str>                 Username to change to after set-up
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   -P, --pidfile=<file>             Path to file to store PID of current instance
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   -C, --chroot=<path>              Root to change to after set-up
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   --syslog-facility=<str>          Facility to syslog to
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   --on-timeout=<str>               Target to connect to when timing out
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   --prefix=<str>                   Reserved for testing
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   -p, --listen=<host:port>         Listen on host:port
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   --ssh=<host:port>                Set up ssh target
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   --tls=<host:port>                Set up TLS/SSL target
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   --openvpn=<host:port>            Set up OpenVPN target
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   --tinc=<host:port>               Set up tinc target
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   --xmpp=<host:port>               Set up XMPP target
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   --http=<host:port>               Set up HTTP (plain) target
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   --adb=<host:port>                Set up ADB (Android Debug) target
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   --socks5=<host:port>             Set up socks5 target
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   --syslog=<host:port>             Set up syslog target
Sep 28 19:18:17 160-251-7-236 sslh[5587]:   --anyprot=<host:port>            Set up default target
Sep 28 19:18:17 160-251-7-236 systemd[1]: sslh.service: Main process exited, code=exited, status=6/NOTCONFIGURED
Sep 28 19:18:17 160-251-7-236 systemd[1]: sslh.service: Failed with result 'exit-code'.
@ftasnetamot
Copy link
Contributor

You must have another Ubuntu 22.04 than me.
I my Ubuntu 22.04.5 LTS I get an sslh 1.20-1, when installing it with apt.
And yes, the configuration option in /etc/default/sslh has the obsolete --ssl option in the template.
However you need to open a bug with ubuntu, as this is part of their packaging.

@stokito
Copy link
Contributor

stokito commented Oct 18, 2024

Duplicate of #416

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants