systemd directive ListenStream and systemd-socket-proxyd is really useful.
Let's say I want to redirect...
ListenStream=80
ListenStream=81
etc.
ExecStart=/usr/lib/systemd/systemd-socket-proxyd
Is there during ExecStart some way to get the ListenStream port? I.e.
ExecStart=/usr/lib/systemd/systemd-socket-proxyd 10.152.152.10:${PORT}
I mean, if
- ListenStream=80 -> ExecStart=/usr/lib/systemd/systemd-socket-proxyd
10.152.152.10:80
- ListenStream=81 -> ExecStart=/usr/lib/systemd/systemd-socket-proxyd
10.152.152.10:81
etc.
Or can there be a wrapper that has access to the ListenStream port number?
If you are wondering what I am trying to do... I am trying to port
anon-ws-disable-stacked-tor from loads of mostly idle socat listeners to
systemd socket activation. Ideally, rather elegantly without one systemd
unit file per port redirection. [1] [2] [3] [4]
Best regards,
Patrick
[1]
https://github.com/Whonix/anon-ws-disable-stacked-tor/blob/master/etc/anon-ws-disable-stacked-tor.d/30_anon-dist.conf
[2]
https://github.com/Whonix/anon-ws-disable-stacked-tor/blob/master/lib/systemd/system/anon-ws-disable-stacked-tor.service
[3]
https://github.com/Whonix/anon-ws-disable-stacked-tor/blob/master/usr/lib/anon-ws-disable-stacked-tor/socat-unix-sockets
[4] https://github.com/Whonix/anon-ws-disable-stacked-tor
--
You received this message because you are subscribed to the Google Groups
"qubes-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/qubes-devel/a80df828-82bc-ec36-4b47-bd330e734f7d%40riseup.net.
For more options, visit https://groups.google.com/d/optout.