celzero / rethink-app

DNS over HTTPS / DNS over Tor / DNSCrypt client, WireGuard proxifier, firewall, and connection tracker for Android.
https://rethinkfirewall.com/
Apache License 2.0
2.94k stars 148 forks source link

Please let user configure the hard coded addresses for connectivity check in "ConnectionMonitor.kt" #1141

Closed p-f-w closed 6 months ago

p-f-w commented 11 months ago

Hello,

not everyone would have a connection to addresses like google or whatsapp.

private val ip4probes = listOf( "216.239.32.27", // google org "104.16.132.229", // cloudflare "31.13.79.53" // whatsapp.net ) // probing with domain names is not viable because some domains will resolve to both // ipv4 and ipv6 addresses. So, we use ipv6 addresses for probing ipv6 connectivity. private val ip6probes = listOf( "2001:4860:4802:32::1b", // google org "2606:4700::6810:84e5", // cloudflare "2606:4700:3033::ac43:a21b" // rethinkdns )

Would it be possible to let user configure this ip addresses?

ignoramous commented 11 months ago

I don't think it is prudent to allow users to change. Besides, there's too many knobs and settings already that confuse many users, who then send angry emails, increase the support burden, and leave super nice reviews on social media and the Play Store.

Note that these connectivity checks are NOT done by default; the user has to enable them. Also note that Android has its own connectivity checks.

p-f-w commented 11 months ago

Thanks for your answer, i think, then it would be nice to add a tip to "Network"->"Choose IP version"->"Auto (experimental) connectivity checks are sent to ascertain reachability", to which servers connections are made, when this the only option caused the connections is.

p-f-w commented 11 months ago

Would be important to know what this option really mean without first read the whole sources.

Not everybody is able to check connections made by apps.

ignoramous commented 11 months ago

Not everybody is able to check connections made by apps.

In the upcoming version v055b (#393), you'd be able to monitor Rethink's own traffic; does that work?

p-f-w commented 11 months ago

Don't know, if it would help to understand, and don't know, if it would make RethinkDNS slower, i mean remember that NetGuard excluded NetGuard from monitoring because that.

Or add a tool tip, on "Bypass DNS & Firwall" in App-screen on long touch you have one (why not on all, it is nicer then following notification with its limited time on screen), on "Exclude" is shown an notification after touch it when it is not available because lockdown mode, (but per log is app-"exclude" further possible)

ignoramous commented 11 months ago

Don't know, if it would help to understand, and don't know, if it would make RethinkDNS slower, i mean remember that NetGuard excluded NetGuard from monitoring because that.

NetGuard doesn't do a lot of things for various reasons specific to NetGuard. Rethink can, and so it will (:

Or add a tool tip, on "Bypass DNS & Firwall" in App-screen on long touch you have one (why not on all, it is nicer then following notification with its limited time on screen

Sorry, I don't understand this. And how it relates to current topic? Do you mean to create a new issue? If not, can you be a bit more clearer, please?

p-f-w commented 11 months ago

i mean tool tip like this -->

tooltips screenshots: ![Screenshot_20231121-033633](https://github.com/celzero/rethink-app/assets/81571337/bbc87256-76ce-41e7-b39d-52a198e4ef5a) ![Screenshot_20231121-033414](https://github.com/celzero/rethink-app/assets/81571337/df40a462-2a3a-442a-91e7-c5a5ab512f43)

thats only functional with Rethink's DNS will be only shown in tool tip (may be thats not true, maybe an old tip?)

but tool tips are nice :)

opk12 commented 7 months ago

A heads up that v0.5.5b was released recently.

What about using the connectivity check to "blend in with the crowd"? I think the local authorities are a bigger threat than Google. The test IP can depend on the geographical location, estimated via the phone's IP address. (Another idea is to estimate via the locale, but it deserves a notification at least, if the user is learning a foreign language).

Examples

ignoramous commented 7 months ago

it deserves a notification at least, if the user is learning a foreign language

Connectivity checks aren't sent out of the box, but only after the user makes a conscious choice to enable "Auto" mode from Configure -> Network, which displays that warning already. A notification for every time the app sends connectivity probes would spam the user.

Rethink, in v055b, also has "Loopback" mode, using which users can monitor Rethink's own traffic (as they would of other installed apps).

What about using the connectivity check to "blend in with the crowd"?

The IP endpoints Rethink hits for connectivity (Cloudflare, Google, Microsoft) are already among the top 10 worldwide.

ignoramous commented 7 months ago

The current code is setup so that users can disable connectivity checks even in "Auto" mode (and rely on Android's connectivity checks, instead). We haven't yet exposed this setting to end-users.

If you're building Rethink on your own, you can disable connectivity checks by setting androidValidatedNetworks to true:

https://github.com/celzero/rethink-app/blob/b8f790350bc68d9ef1bd441ca1acb08483a41fea/app/src/main/java/com/celzero/bravedns/service/ConnectionMonitor.kt#L61

The reason Rethink doesn't use it, is it isn't reliable or hasn't proven to be (Rethink used to use it once), or isn't useful to the way Rethink handles network changes.

ignoramous commented 6 months ago

We're not letting users change IPs Rethink probes (it is an unnecessary footgun in a critical path for Auto mode), but instead letting them disable these checks altogether in v055d: The setting to turn OFF is at Configure -> Networks -> Perform connectivity checks (default is OFF in F-Droid, GitHub, Website flavours but ON in Play Store).