caddy-l4
caddy-l4 copied to clipboard
feature request: reverse proxy ssh via username
It would be cool if the ssh matcher allowed matching against a user, and if the handler allowed you to pass the request on to a different user. ie,
[email protected] -> caddy-l4 -> [email protected]
[email protected] -> caddy-l4 -> [email protected]
basically exactly what tg123/sshpiper does. i think itd be cool if caddy-l4 could support reverse proxying ssh in this manner by default.
apologies in advance if this doesnt seem feasible or its outside of the scope of this plugin !
Ah yeah, that'd be cool. I'd never heard of sshpiper; thanks for the link. I wonder if it can be used as a library.
I don't think I have much bandwidth in the near future to implement this, but I could prioritize it if a business wants to sponsor its development, or I'd welcome pull requests and could review those no problem!
you can either use sshpiper as a lib or drop a plugin along with sshpiperd
https://github.com/tg123/sshpiper/blob/master/CONTRIBUTING.md#understanding-how-sshpiper-works
sshpiper seasoned cryto ssh lib The crypto folder contains the source code of the sshpiper seasoned cryto ssh lib. It based on crypto/ssh and with a drop-in sshpiper.go to expose all low level sshpiper required APIs.
Very nice! Thanks for the tip @tg123. That's very helpful.