Package Details: sslh-git 2.0.1.r23.g3117c15-2

Git Clone URL: https://aur.archlinux.org/sslh-git.git (read-only, click to copy)
Package Base: sslh-git
Description: Network port multiplexer. Allows sharing of HTTP, SSL, SSH, OpenVPN, tinc, XMPP, etc. on the same port
Upstream URL: http://www.rutschle.net/tech/sslh.shtml
Licenses: GPLv2
Conflicts: sslh
Provides: sslh
Submitter: mortzu
Maintainer: gilcu3
Last Packager: gilcu3
Votes: 6
Popularity: 0.026183
First Submitted: 2010-08-30 11:21 (UTC)
Last Updated: 2024-01-29 14:42 (UTC)

Latest Comments

1 2 Next › Last »

gilcu3 commented on 2023-10-28 09:43 (UTC)

@Nebulosa added changes, should be good now, thanks for pointing things out

Nebulosa commented on 2023-10-27 20:49 (UTC) (edited on 2023-10-27 20:58 (UTC) by Nebulosa)

You right, I didn't catch that.

So we need make override systemd file In case using -select and -ev and remove making a link from PKGBUILD.

Like that:

In PKGBUILD:

prepare() {
  cd ${pkgname%-git}
  sed -i 's|ExecStart=/usr/sbin/sslh --foreground $DAEMON_OPTS|ExecStart=/usr/bin/sslh-fork --foreground --config=/etc/sslh.cfg|;/EnvironmentFile/d' scripts/systemd.sslh.service
  sed '29 s|443|7443|;30 s|443|8443|;s|thelonious|0.0.0.0|;/user:/d;/pidfile:/d;s|^\(# example.cfg\)|\1 in /usr/share/doc/'${pkgname%-git}' folder|' < basic.cfg > sslh.cfg
}

In install file:

post_install() {
    echo "/etc/sslh.cfg editing is required!"
    echo "Details: https://github.com/yrutschle/sslh/blob/master/doc/config.md"
    echo "Don't forget execute 'systemctl daemon-reload' and 'systemctl restart sslh.socket' after editing."
    echo "/usr/bin/sslh-fork is using by default."
    echo "If you want using sslh-select or sslh-ev you should make systemd override file for you own, e.g."
    echo "/etc/systemd/system/sslh.service.d/exec.conf"
    echo "[Service]"
    echo "ExecStart=/usr/bin/sslh-select --foreground --config=/etc/sslh.cfg"
}

gilcu3 commented on 2023-10-27 20:14 (UTC)

Yes, I get that, but modifying a symlink doesn't seem like the right choice, seems better to have several systemd services. The symlink would be overwritten with every update :|

Nebulosa commented on 2023-10-27 20:10 (UTC) (edited on 2023-10-27 20:19 (UTC) by Nebulosa)

As I wrote before, in item #5 - symlink to required executable file. Sslh.service always start /usr/bin/sslh - so you need only one .service file. I think that, at first, you decide which type of executable you need, linked it, and after configure sslh.cfg. You use only one executable and config.

It's like Apache (fork process for each client) and Nginx (one process for all clients), as I understood, so, no need launch all of them simultaneously .

gilcu3 commented on 2023-10-27 09:42 (UTC) (edited on 2023-10-27 09:44 (UTC) by gilcu3)

@Nebulosa thanks for the changes, they have not been trivial to digest for me. One question though, if I make a single systemd service file as you suggest, how would a user that uses sslh-select by default configure it? I cannot see any nice option that would survive package updates

PS: there is a proposal here for enhancing systemd support https://github.com/yrutschle/sslh/pull/231 but it seems it is not going to be added anytime soon

Nebulosa commented on 2023-10-26 17:28 (UTC) (edited on 2023-10-27 20:14 (UTC) by Nebulosa)

@gilcu3 thank you for accepting my edits!

But! :)

My point was in that you don't need any extra files, only PKGBUILD and install file - keep vanilla files as possible as can, KISS principe. As you can see by yourself in gitlab history, maintaner of official package just had taken your PKGBUILD and other files and implemented them. So, if you change the logic here it syncronized in official package too)

Anyway, go further: function prepare() now is useless (because of #66 string) and contain typo: -F/etc/sslh.conf

Made a new version of my PKGBUILD with described items below, according AUR guidelines, namcap and clean buildroot. https://0x0.st/Hy8q.txt

Install file https://0x0.st/Hyc8.txt

gilcu3 commented on 2023-10-25 11:13 (UTC)

@Nebula thank you for the changes. I just implemented all of them, except a couple that would make this package less similar to the official sslh package.

Nebulosa commented on 2023-10-23 20:54 (UTC) (edited on 2023-10-24 09:17 (UTC) by Nebulosa)

Didn't notice that it already had a non-git version of sslh (lol!) and made my own PKGBUILD file:

Features are:

1) All files for package takes only from sources.

2) Making sslh.cfg from basic.cfg (without fork-bomb, when 443 port point to 443 again below).

3) Added sslh-ev in package

4) conf2struct not a required dependence for compiling.

5) Idea that /usr/bin/sslh linked to /usr/bin/sslh-fork is quite right. In install file I made comment about that. There is no need three service files, you need only link on needed execitable and update daemon-reload and systemctl will launch sshl.socket automatically

Could you please update main PKGBUILD file?