tomerfiliba / plumbum

Plumbum: Shell Combinators
https://plumbum.readthedocs.io
MIT License
2.8k stars 182 forks source link

Add support for OpenSSH forwarding Unix sockets #550

Closed lbenezriravin closed 3 years ago

lbenezriravin commented 3 years ago

I tried to make the interface as sane as possible while maintaining as a small diff and backwards compatibility. Let me know if you'd like it to look different. Thanks for working on this project!

OpenSSH clients can forward Unix sockets instead of TCP ports with the same -L flag using a slightly modified argument. This patch should allow users to take advantage of the full syntax. From the man pages:

     -L [bind_address:]port:host:hostport
     -L [bind_address:]port:remote_socket
     -L local_socket:host:hostport
     -L local_socket:remote_socket

This patch also adds a protection for the feature.

coveralls commented 3 years ago

Coverage Status

Coverage decreased (-0.01%) to 82.298% when pulling b3ed5027b4151138f5069149722de4aa0bccaa88 on StarryInternet:lihu/af_unix into e6412b2521fb49a2cd01d72c62ef84fd6dcf6620 on tomerfiliba:master.

lbenezriravin commented 3 years ago

@henryiii Is this a feature you're open to?

henryiii commented 3 years ago

Yes, I just hadn't reviewed it yet. Could you add an entry to the changelog?

lbenezriravin commented 3 years ago

Sure thing. Thanks for taking a look.

henryiii commented 3 years ago

Thanks!