rethink-app icon indicating copy to clipboard operation
rethink-app copied to clipboard

Low battery mode

Open ignoramous opened this issue 3 years ago • 5 comments

Currently, the battery consumption is uber high. Power consumption hasn't been analyzed but it highly likely it is due to all the traffic filtering that occurs in the name of Firewall and the full-tunnel VPN in-use (routing 0.0.0.0).

Split-tunnel DNS:

If the user needs just the DNS (without firewall), probably it is best to add only port 53 (split-tunnel) to the routes when vpn-service is built / started / re-started. This might be a preferable default, too?

VPN Blackhole:

If the user just needs Firewall (without connection tracking #3 and #16 and DNS), VPN could be run as a blackhole (without creating a forwarding tunnel) wherein all incoming packets from allowed apps end up going exactly no where.

App Kill:

Kill apps that are firewalled. The connections from the app are blocked anyway and so if those apps aren't in the foreground they only end up draining extra power by retrying repeatedly to connect.

The UI might be tricky to get right, I am thinking, probably a user preference in the DNS and Firewall screen to enable low battery mode, with a prompt on the homescreen with a clickable chip to enable it (when device battery is low).

ignoramous avatar Aug 22 '20 13:08 ignoramous

Only the Blackhole implementation is pending... but does anyone ever want just the Firewall in a battery saver mode? May be folks who use firewall to track and limit data use over metered connections.

ignoramous avatar Mar 21 '21 10:03 ignoramous

https://github.com/celzero/rethink-app/commit/d0d162fc11ab3eeac8a22da28ca72c07c3ea110a (battery saver with split tunnel)

ignoramous avatar Mar 21 '21 11:03 ignoramous

https://github.com/celzero/rethink-app/commit/4ea7e30d46e2c8f6238b574f6372732ddc2b896c (app kill which doesn't work always due to Android restrictions).

ignoramous avatar Mar 21 '21 11:03 ignoramous

Blackhole mode of firewall is great idea.

The "glasswire" app in android already do that.

(It doesn't have internet permission yet it blocks apps by creating a local vpn)

Also i have some more suggestions, you can add an option to disable anything that can increase battery usage like showing website icons, estimating dns response time, and disabling reverse dns (if you have it to estimate and show what website is using an ip)

Best regards.

0xRustlang avatar Dec 01 '21 20:12 0xRustlang

Thanks.

Just to clarify, RethinkDNS does not do PTR ("reverse DNS") lookups. It simply correlates incoming DNS answers with outgoing TCP and UDP connections. #301

And estimation of DNS response time is as light weight as we could make it, but sure it might be a CPU drain, just that little bit. Though, I doubt turning it off presents any major gains. The drain is really due to the userspace firewall impl ~ab~using the VPN API itself. Blackholed VPN would be a drastic improvement, in that regard.

ignoramous avatar Dec 01 '21 22:12 ignoramous

app kill, since it doesn't work, has been removed in v053k (released today).

ignoramous avatar Oct 14 '22 12:10 ignoramous

any update on firewall with Blackhole?

aykirito avatar Jul 17 '23 03:07 aykirito

Not yet. Perhaps after we get v055 out the door (#52).

ignoramous avatar Jul 17 '23 04:07 ignoramous