NotJamie A few seconds later I saw a lot of parallel connections in RethinkDNS from ANDROID to hundreds of IPs
ANDROID
is a preset system user 0
(see this discussion on our github).
NotJamie How to find out what is causing this, what is the source?
At times, when getting owner UID for a socket, the Android APIs return ANDROID
instead of the actual owner UID (in your case, you've empirically deduced that it was Syncthing). Rethink doesn't know any better and trusts what the Android API tells it.
NotJamie I don't have a good feeling about this.
This doesn't happen often, but I've predominantly seen it with apps that create a LOT of ephemeral (very short-lived) UDP sockets. Syncthing could be doing that for NAT traversal? I am not sure, you could clarify with the Syncthing developers.
n3t_admin I believe RethinkDNS is buggy with how it displays the origin of established connections or DNS lookups.
There may be bugs that we haven't fixed or don't know about, but for the most part Rethink is pretty accurate (given the Android APIs that Rethink uses are accurate) in accounting for network packets.
n3t_admin I see this mostly with my own domain, where supposed requests will go out to different subdomains, that are definitely in no way related to that app
The way domains <> IPs are mapped is what's problematic. A single group of IPs can be shared by multiple domains (common with Games and BigTech apps, like Google apps). It is also possible for a single domain to point to different group of IPs each time it is queried for. Rethink may end up mixing domains <> IPs mapping in a bid to be consistent with what the DNS layer in Android may have cached. That is, the "implementation details" (of the interaction between dnsproxyd
in Android and Rethink's resolver) are what brings about the issues you're reporting.
For the next version, v055o
(due in weeks from now... but I've been saying this since Sept 2024 ;), we'll see if there's a better way (without disabling caching in dnsproxyd
) to keep dnsproxyd
(and by extension, all Android apps that use it) happy and not incur this mixup.