mobile-shell / mobile-shell/mosh
Roaming from internal to external server address
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 14.5k
- Forks
- 865
- PR merge metrics
- No merged PRs in 30d
Description
Mosh doesn't allow the server to roam. But there's one common situation where this would be extremely useful.
I have a server behind a home NAT router. Sometimes my laptop is on my home WiFi, and I can access the server by its internal (RFC 1918) IP address. If I'm outside my home, I instead use the NAT router's public IP, along with a different set of SSH and Mosh ports, which are forwarded to that server. I would like to roam smoothly between these two situations.
Right now I can do it by always using the public IP, even when I'm at home. This introduces extra network latency, but perhaps that's acceptable. It's especially silly when the client and server share a wired Ethernet link but the Internet gateway is connected wirelessly (which is sometimes the case at my house).
In this roaming scenario, the server and client change IP address (as observed from each other) at the same time. So I don't expect a fully automatic solution. Perhaps we can give mosh-client a list of server (IP,port) pairs to try, round-robin, when packets don't seem to be getting through.
An explicit list also mitigates the DoS vulnerability of full server roaming where someone captures a legitimate packet sent by the server and retransmits it from a bogus address to make you roam there. The attacker can only spoof an inactive server address, and perhaps the round-robin behavior limits how much service they can deny.
I'd be interested in playing with this feature, even if we don't have mosh wrapper support for it.
This problem is similar to the IPv6 roaming problem (#81) and the two may have similar solutions.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with mosh-client and compare this request with the similar IPv6 roaming problem in issue #81. Investigate how server addresses and ports are selected, then define how trying an explicit list of (IP,port) pairs would behave when packets stop arriving; done requires a decided design and support for the described internal-to-external transition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100