You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DNS Lookup does not work by default with gomobile on Android and iOS (only on physical device). We needed to find a workaround until this golang issue is fixed.
At the moment we are using this method which is very hacky.
We could instead:
Define a go interface containing a LookupTXT method
Find a clean way to override the default go-ipfs DNSResolver
The text was updated successfully, but these errors were encountered:
aeddi
changed the title
[gomobile-lib] implement a cleaner workaround for DNS
[gomobile-lib] implement a cleaner workaround for DNS resolver
Jan 21, 2020
Find a clean way to override the default go-ipfs DNSResolver
@Stebalien What do you think would be the best approach to do that? If we could simply implement a DNSResolver interface and have a way to override it, it could be cleaner that implementing the Namesys interface and duplicate all the original code for the sole purpose of overriding the LookupTXT method.
You can enable CGo and let it use the CGo resolver instead. Since CGo is needed anyway when doing gomobile bind it's not really any different build wise.
I thought that gomobile bind did it but you can try to add CGO_ENABLED=1 to the env or disable the build tag netgo.
We've been running with it since day 1, and to us it has never been an issue. There were some quirks with respect to DNS resolution on iOS (stuck resolver on weird network conditions), but I'm not sure they are still there.
DNS Lookup does not work by default with gomobile on Android and iOS (only on physical device). We needed to find a workaround until this golang issue is fixed.
At the moment we are using this method which is very hacky.
We could instead:
The text was updated successfully, but these errors were encountered: