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

Added an option to connect through a UNIX socket #38

Closed
wants to merge 2 commits into from

Conversation

bpiwowar
Copy link
Contributor

@bpiwowar bpiwowar commented Jun 5, 2015

This patch adds an option (--unixsocket or -s) to use a UNIX socket rather than a TCP socket. This is useful when the remote host is a shared server.

@sorbits
Copy link
Member

sorbits commented Jun 5, 2015

Would it make sense to have the socket default to something like $HOME/.rmate.socket?

I’m even inclined to have rmate test if the socket exists, and prefer the unix socket over TCP when it does.

This should solve issue #15.

@bpiwowar
Copy link
Contributor Author

bpiwowar commented Jun 5, 2015

Yes this would - and it would not break anything anyways. I updated the pull request so that rmate uses ~/.rmate.socket by default if the file exists (it does not check if this is a valid socket though).

@sorbits
Copy link
Member

sorbits commented Jun 7, 2015

Merged as commit 4a55b26, thanks!

I squashed the two commits into one and fixed a few things: reading the environment variable had a to_i (instead of to_s), there was a debug output line, and I changed the README example to use the default socket path in the setup example.

I have unfortunately not been able to test the functionality, as I do not have any servers with openssh 6.7+.

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

Successfully merging this pull request may close these issues.

2 participants