elisescu / tty-share

Share your linux or osx terminal over the Internet.
https://tty-share.com/
MIT License
806 stars 87 forks source link

Add reconnect logic to proxy client #63

Open Mic92 opened 1 year ago

Mic92 commented 1 year ago

From reading the client code there is no support for reconnect if the others side network was dropped. This seems not optimal if the network gets disconnected when using the proxy

elisescu commented 1 year ago

Sorry for the very long delay, @Mic92 . This is something I'd like to add at some point, but it's a bit thicker than it seems. If the connection is dropped, the server needs to identify the client somehow with the right session, and there's no concept like that built in tty-proxy to support it. Right now, the TCP connection lifecycle maps to the lifecycle of a session - if the TCP connection dies, the session is invalidated. Otherwise, the server would need to maintain some more state. I'll keep this open, as I agree - it would be nice to have something like this.