Description
DNS resolution is something that is different between different distros and platforms that NET supports.
While most Linux distributions use /etc/resolv.conf, not all do (Android). And even when they do use /etc/resolv.conf they seem to have different capabilities. For example, this Kubernetes issue talks about a workaround that can be done in in glibc-based distributions but not on Alpine which is musl-libc based because of a missing feature in musl-libc.
As I alluded to earlier, Android is its own thing, and does things differently. It queries the data over UDS (/dev/socket/dnsproxyd). This is actually a good thing for the user, so whenever we port to Android it makes sense to have the default be OS provided capability.
Having a built-in capability (that is perhaps not the default) to have portability across platforms and distros will be very valuable.
In fact, the Go language ecosystem has already done this and were able to effectively mitigate the aforementioned Kubernetes bug by making a change in their resolver code. golang/go@dbc1703
Furthermore, with the recent ConnectCallback
feature in SocketsHttpHandler, a new API to do DNS resolutions (or a config switch) will work nicely.
I haven't yet made up my mind on whether this as an app-level config/setting is more valuable than just a new API or capability. It could be argued that the app-level config/setting is more valuable because it will just work with existing code. Something to discuss ...