Mosh-like port forwarding

forwardingportudp

This is on linux, connecting to linux servers:

I love mosh, but it doesn't support port forwarding, and likely won't for a while since it's been almost a year now and it hasn't happened yet.

port forwarding over ssh is great, but because my laptop moves between networks several times a day, my ssh sessions die, and so do the port forwards.

I could script/hack something to detect hung ssh and reconnect to get my port forwards back, but before I do this, is there another way to do long lasting port forwards when your source IP changes several times daily (because you go on different networks)?

I'm thinking an ssh over UDP would do the trick but of course ssh is over TCP.

Best Answer

You could try tinc: http://www.tinc-vpn.org/ which would let you connect directly despite the changing IPs.