pacien / tincapp

Android binding and user interface for the tinc mesh VPN daemon.
https://tincapp.euxane.net
GNU General Public License v3.0
165 stars 31 forks source link

Android treats tinc connection over WiFi as metered #114

Closed danielb42 closed 1 year ago

danielb42 commented 2 years ago

Android seems to treat VPN/WiFi connections as metered unless the VPN app tells it otherwise. Most Android apps don't give the user a fine-grained choice about which connection types are allowed to use and so one can often only select if metered connections are allowed generally or not. Now I do NOT want to allow metered connections in most cases as I don't want to use my mobile data connection for, say, large downloads. But disallowing metered connections then also prevents the use of WiFi with tinc enabled as it is considered a metered connection.

Maybe you could look into marking the tinc connection over WiFi as unmetered, while leaving the metered property of the mobile data connection intact?

Thanks!

pacien commented 2 years ago

VPN apps seem to be marked as offering a metered connection by default.

I think it would be possible to add an option in network.conf to override this. This would allow the user to mark a particular tinc network as metered or unmetered for the Android system and other apps.

Would that be good for you?

(Automatically determining whether the VPN should be metered or not depending on the underlying connections seems tricky, because multiple ones can be used at the same time by the VPN. The Android API does not seem to allow changing the "metered" marker without disconnecting and reconnecting the VPN either).

danielb42 commented 2 years ago

Hi pacien, yes I think that would be a good solution. Thanks for looking into it.

pacien commented 1 year ago

Starting with v0.36, the VPN connection will be marked as metered only when the underlying link is metered.