Jigsaw-Code / Intra

An experimental tool that allows you to test new DNS-over-HTTPS services on Android
Apache License 2.0
1.54k stars 260 forks source link

[Feature request] Show app name in the log #432

Open HamidZaeri opened 2 years ago

HamidZaeri commented 2 years ago

Hi It's good to see name of the app (and icons) requested the dns query in the log (recent queries).

bemasc commented 2 years ago

Unfortunately this is extremely difficult, and perhaps impossible. DNS queries are emitted by the system itself, not by applications, and Intra has no direct way to link each query to the application that generated it. Thanks to the system DNS cache, many queries produced by apps will never reach Intra at all.

It may be possible to infer an indirect linkage using the contents of /proc/net/tcp, but this mapping is not precise and can be delayed.

HamidZaeri commented 2 years ago

Then how does split tunneling works?!

Unfortunately this is extremely difficult, and perhaps impossible. DNS queries are emitted by the system itself, not by applications, and Intra has no direct way to link each query to the application that generated it. Thanks to the system DNS cache, many queries produced by apps will never reach Intra at all.

It may be possible to infer an indirect linkage using the contents of /proc/net/tcp, but this mapping is not precise and can be delayed.

bemasc commented 2 years ago

Apps can be excluded or included in the VPN by an explicit Android API. If an app is excluded from the VPN, its traffic is never visible to Intra at all.