Page MenuHomePhabricator

port anon-ws-disable-stacked-tor to systemd socket activation
Closed, ResolvedPublic


Rather than having loads of socat listeners idling around where lots of them don't get used, it may be better to use systemd socket activation.

systemd-socket-proxyd might help.

Otherwise stackexchange claims socat also works with systemd socket activation.

Ideally, we could avoid having one systemd unit file per port redirection. Perhaps systemd template unit files can be used.



Event Timeline

As per the package would not be that cleanly implemented. Disadvantage: lots of systemd unit files. One per port. (Also one per unix domain socket file.)

systemd feature request:
make ListenStream= port number available as ${PORT} for ExecStart

Patrick changed the task status from Open to testing-in-next-build-required.Feb 11 2018, 12:12 AM
Patrick edited projects, added Whonix 14; removed Whonix 15.

Had to be done for Whonix 14 to stop wasting RAM by too many socat instances.

Patrick claimed this task.

@HulaHoop in T544#16070

How are we doing on RAM use? Is it any more or less efficient than socat after you cut down the number of spawned instances?

I haven't compared

  • a) systemd-socket-proxyd in combination with socat
  • vs b) systemd-socket-proxyd in combination with systemd-socket-proxyd.

b) is is implemented since that was more straight forward, already documented and more "standard" solution.)

As long as the socket is not being used, no systemd-socket-proxyd is being spawned, since this is using systemd socket activation, which results in low RAM usage for most use cases.

I would expect systemd socket activation and systemd-socket-proxyd to be the most modern and RAM efficient.