Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support forward to unix socket #238

Open
tmds opened this issue Jun 21, 2017 · 2 comments
Open

Support forward to unix socket #238

tmds opened this issue Jun 21, 2017 · 2 comments

Comments

@tmds
Copy link

tmds commented Jun 21, 2017

OpenSSH supports forwarding to unix sockets: https://lwn.net/Articles/609321/.

For example, a mysql server on remotehost using socket /var/lib/mysql/mysql.sock can be made accessible on the local machine on TCP port 5000:

ssh -L 127.0.0.1:5000:/var/lib/mysql/mysql.sock remotehost
@LightCC
Copy link

LightCC commented Nov 6, 2017

Are you just talking about a normal forwarded port using SSH? This functionality is already built-in. See an example here: https://stackoverflow.com/questions/41152737/c-sharp-ssh-net-tunnel-mysql-client-ioexception.

Check out ForwardedPort (base class), ForwardedPortLocal, ForwardedPortRemote, and ForwardedPortDynamic classes.

There are a few quirks though...

@drieseng
Copy link
Member

drieseng commented Nov 6, 2017

@LightCC No, he's talking about unix domain sockets.

Don't hesitate to file issues for those "quirks".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants