I have a situation where I need to use socat to tunnel the unix socket
that tmux uses.  However tmux isn't happy at all with socat tunneling
stuff.  Tmux server log reports "fatal: server_client_msg_dispatch:
MSG_IDENTIFY missing fd"  So obviously socat isn't quite passing the
data as tmux expects.  Here's how I did a test (non-tcp) tunnel:

tmux -v -S /tmp/testsocket # start the tmux server on test socket

Then I did a test socat tunnel:
socat UNIX-LISTEN:/tmp/tmux-1066/default UNIX:/tmp/testsocket

Now I have the real socket in a nonstandard place with socat creating a
tunneled socket in the standard place.  However, "tmux attach" causes
the server process to terminate immediately with the above-mentioned error.

As a sanity check to make sure socat could actually do what I want, I
did this in an xterm:
xhost +
socat socat UNIX-LISTEN:/tmp/.X11-unix/X2 UNIX:/tmp/.X11-unix/X0

I was then able to run an X11 program against the :2 display, which
socat tunneled back to :0, so for some unix socket applications socat
works just fine.

Does anyone have any idea how I get this to work with tmux?  I think the
problem is probably how socat is fragmenting the messages.  I've been in
the tmux code somewhat but haven't really figured out yet if this is the
problem.

The long term goal is to use socat to transport the tmux socket over an
SSL tcp/ip socket.  That way the folks I support can make a socat
connection to me through firewalls and so forth and in essence share a
terminal with me.  This would eliminate the need for me to have any real
access to the networks and servers in question.  For the most part socat
would be able to do all of these things without modifying tmux... if
tmux wasn't erring out.




------------------------------------------------------------------------------

_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to