-
Notifications
You must be signed in to change notification settings - Fork 963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DNS transport not working on Android #2064
Comments
First off, rust-libp2p supporting Android would be neat! Mind sharing what you are up to?
Would using a custom |
Actyx has been running rust-libp2p in production for quite some time now on different hosts, namely Linux, Windows, and Android. We're providing a p2p platform for building and running resilient apps in factories.
No, as we want to rely on the system resolver (so |
Puuh, this (termux/termux-packages#1174) indeed seems to be a can of worms.
I am a bit afraid of introducing yet another option to |
The naive thing would be to provide something similar to what was implemented before #1927 using If it has to work with What's your take on that? Do you see other issues? |
Can we just add a 2nd DNS transport? It sounds like we don't need to support both modes at runtime so simply composing a different DNS transport would fix the issue, wouldn't it? In other words, have:
|
Yeah, I think that's the basic idea. My question was about the functionality offered by |
From what I know today, this would be my preference:
|
We're going to work around this by passing in the nameservers during construction, as there's no way for dynamic nameserver changes with I guess this ticket could be closed then; maybe add the limitations of the dns transport to its README? |
I was not aware of this.
Would you mind creating a small pull request @wngr? |
See for example https://github.com/bluejekyll/trust-dns/issues/1016#issuecomment-583895735.
Sure I will do that, soon-ish :-) |
#1927 changed the DNS transport to use the trust_dns_resolver crate rather than the system's libc functions. This means, the DNS resolution is completely in process now. The standard configuration tries to read
/etc/resolv.conf
to parse the host's DNS settings and use them.This doesn't work on Android (see https://github.com/bluejekyll/trust-dns/issues/652). Supporting Android looks like a can of worms (termux/termux-packages#1174), which is probably why that issue is also stalled.
I think rust-libp2p should offer a fallback to use the system resolver via libc and bring back the old code -- what do you say?
The text was updated successfully, but these errors were encountered: