labtunnel
labtunnel copied to clipboard
socket activation
What do you think about the idea of supporting socket activation?
Use case is this: Sometimes I open a browser for work that is configured to use a proxy listening on localhost:1080. I often forget to explicitly open the tunnel first. What if I didn't need to explicitly open it? What if my system just launched the tunnel the first time a request to :1080 was made.
I just found out that Systemd supports socket activation! https://coreos.com/os/docs/latest/customizing-sshd.html We can absolutely explore this idea.
I looked into it. It's not easy figuring out how to convince systemd to play nice with SSH. I think it would be cool if you could do something like:
systemctl --user enable labtunnel@jumpbox-a:1080.socket
to enable a listener on port 1080 that tunnels to jumpbox-a
If you create a pull request and ping me via email (cedar.ren gmail)/ discord (RAD1ENC3#3283), I will merge it within 3 days or venmo you $50 if i fail to do that (this is my committment device lol)