Hi Team,
I am porting a systemd socket service to s6. The socket unit listens on an inet socket domain and trigger the systemd service on receiving traffic on the socket. The systemd service further redirect the data to another inet socket using systemd-proxy tool.
Do we have any such facility in s6? I have gone through s6-tcpserver but do we have any other ways to perform the same operation in s6 services? Please help.
Waking up when receiving traffic through the socket? Good question. That's something I would expect the daemon to do and not s6 itself. I'm not familiar with how exactly the socket files/services work in systemd so I don't know if it does anything particularly special with them.
The s6 documentation has this to say on socket activation...
https://skarnet.org/software/s6/socket-activation.html
But how to port forward? I need to listen on a specific inet socket and on receiving traffic, I need to transfer the data to another inet socket which inturn may send data to the initial listening inet socket.
Using s6-tcpserver4 I am able to listen and trigger any program upon receiving the traffic on the specified socket. But not sure, how to bidirectionally transfer the data using s6 tools.
You might want to ask the skarnet mailing list and/or the #s6 IRC that question. I don't know the answer. Feel free to let me know if s6 in Artix is missing something you need to accomplish this though. We should have s6-networking, but perhaps there's some other puzzle piece missing.
In the link posted earlier, there is a section and further links ...