Skip to content

Add support for dynamic IP hosts - #600

Closed
nogy wants to merge 3 commits into
mobile-shell:masterfrom
nogy:dynamicIP
Closed

nogy wants to merge 3 commits into
mobile-shell:masterfrom
nogy:dynamicIP

Conversation

@nogy

@nogy nogy commented Apr 28, 2015

Copy link
Copy Markdown

Until now every time the hosts IP changed, the mosh-server would
keep running with the mosh-client unable to reconnect.
now Ctrl+^ r will re-lookup the dns entry and adjust the address
information accordingly. That way the connection can be revived.

Until now every time the hosts IP changed, the mosh-server would
keep running with the mosh-client unable to reconnect.
now Ctrl+^ r will re-lookup the dns entry and adjust the address
information accordingly. That way the connection can be revived.
@normanr

normanr commented Sep 14, 2015

Copy link
Copy Markdown

Instead of adding a new host arg, why not just support passing hostname or ip as the first arg?

@normanr

normanr commented Sep 14, 2015

Copy link
Copy Markdown

Actually it looks like this goes some way towards fixing #210 and #212 :-)

@andersk

andersk commented Sep 15, 2015

Copy link
Copy Markdown
Member

@normanr: The extra argument is important to make sure we use the same IP to which we connected over SSH. If we were to re-resolve the same hostname immediately, which might get a different address family that we can’t connect over, or a different host behind a round-robin DNS load balancer.

The same concerns apply to this patch as written, but at least this will only happen if the user invokes the functionality manually. If they do, though, they might not have a good way to recover. What we really want the client to do is to try both the old and new IP addresses until it starts getting valid responses from the new one.

@nogy

nogy commented Sep 15, 2015

Copy link
Copy Markdown
Author

@andersk You are right with the load balancer. The way of trying both old and new IP addresses would indeed resolve this. I was a bit afraid about the multiple resolve attempts clogging up the possibly slow connection at the times where a slow connection keeps you from getting responses from the old IP in the first place. So deciding when to start the re-lookup process automagically is what keeps me from finishing this. Manually I have a good guess on when my server changed its IP.

# Conflicts:
#	scripts/mosh
#	src/frontend/mosh-client.cc
#	src/frontend/stmclient.cc
#	src/frontend/stmclient.h
#	src/network/network.h
@jkoop

jkoop commented Apr 19, 2022

Copy link
Copy Markdown

Hey just curious why this hasn't been merged, yet. Is there a UI problem? Is it compilation? Documentation? DNS round-robin?

DNS round-robin can be delt with by just mentioning (in the manual) that this feature may not work well with such domain names, since it sounds like it's totally up to the user anyway.

I'd love this to be merged, since my server is behind DDNS.

@nogy

nogy commented Apr 20, 2022 via email

Copy link
Copy Markdown
Author

@achernya

achernya commented Aug 8, 2023

Copy link
Copy Markdown
Collaborator

We're going to solve this more generally with the plans in #212 and #1214. Since this has merge conflicts, closing in its current form.

@achernya achernya closed this Aug 8, 2023
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.

5 participants