[mosh-devel] Something for idea list?
Timo Sirainen
tss at iki.fi
Mon Jul 8 01:37:30 EDT 2013
I think (and I think I've mentioned this a few times :) it's not possible to implement a good (proper, nice, pretty) async DNS library to do *client*-side hostname lookups. Because on the client side you want to read things like /etc/hosts and the default lookup domain (search xx in /etc/resolv.conf). You could maybe kludge these for some specific OSes, but somehow I doubt any non-libc coder actually wants to do that.. Until POSIX (or whatever new standard) defines such a thing, the only possibility is to use libc's gethostbyname() (or whatever) that does the hard work. For async behavior either threads or forking is needed. In mosh's case I think either one works fine, since it's not a library..
On 8.7.2013, at 8.22, Keith Winstein <keithw at mit.edu> wrote:
> Hello Lawrence,
>
> Unfortunately not. (See previous reply.) But you can follow this issue at https://github.com/keithw/mosh/issues/210
>
> The main blocker for this is that we need an asynchronous DNS resolver in mosh-client to be able to discover if the server's IP has changed in the middle of the connection (and whether we should try another IP).
>
> There are a few options here, none of them super-great. (Link with c-ares? Use gethostbyname() from a thread or forked process?)
>
> If you or anybody else has an opinion about the best way to do this, happy to discuss or take a patch to add this support.
>
> Best regards,
> Keith
>
> On Fri, Jun 28, 2013 at 8:34 AM, Lawrence 'The Dreamer' Chen <TheDreamer at lhaven.net> wrote:
> Can Mosh work if the mosh-server IP changes as I roam between networks?
>
> Namely when I'm on campus wifi, I'll have a 10.x.x.x address and the
> hostname for mosh-server will resolve to one as well.
>
> But, when I'm off campus. I'll have whatever IP is assigned by the
> network I'm on, and the hostname for mosh-server will resolve to its NAT
> IP (which I'm told is subject to change, but so far hasn't. I'm the DNS
> administrator, so I should get notice of any changes...)
>
> Not sure if its because the NAT is only on the outside, or that internal
> routing doesn't send the response back out through the NAT...
>
> --
> Name: Lawrence "The Dreamer" Chen Email: TheDreamer at lhaven.net
> Blog: http://lawrencechen.net
>
> _______________________________________________
> mosh-devel mailing list
> mosh-devel at mit.edu
> http://mailman.mit.edu/mailman/listinfo/mosh-devel
>
> _______________________________________________
> mosh-devel mailing list
> mosh-devel at mit.edu
> http://mailman.mit.edu/mailman/listinfo/mosh-devel
More information about the mosh-devel
mailing list