AdguardTeam / AdguardForAndroid

Open bug tracker for Android version of AdGuard.
https://adguard.com/
1.36k stars 90 forks source link

Make VPN autopause disabled by default for newer devices #1000

Closed ameshkov closed 7 years ago

ameshkov commented 7 years ago

For Android 6.0 and newer we should make pref.vpn.disable.pause checked by default.

I've been testing it for quite some time and it seems to be working just ok.

TPS commented 7 years ago

I've been using it this way on both my 4.4.2 & 7.0 for a long time & never experienced an issue from it, directly. The only thing I'd suggest is maybe a periodic cache flush - sometimes a bad DNS entry (I think) makes into the cache (mostly due to weak signal), & toggling AG's status resolves it.

ameshkov commented 7 years ago

There're some issues with simply enabling pref.vpn.disable.pause.

For instance, it also controls auto pause in the case of tethering. I guess we should separate these things in two different low-level flags.

Also, it will mess with the app auto-restart when Android kills it.

And one more thing. VPN does not mess with Tethering in a case of Android 7.1. We should test it on other firmware though, Samsung for instance.

ameshkov commented 7 years ago

Also, we should apply complicated routes all the time in this case as we won't be able to re-setup the VPN routes without restarting it.

ameshkov commented 7 years ago

It appears, that for now the only devices we can do it for are Nexus and Pixel with Nougat.

TPS commented 7 years ago

It appears, that for now the only devices we can do it for are Nexus and Pixel with Nougat.

I've been doing this w/ non-GPhones regularly. Why'd you specify them?

Also, we should apply complicated routes all the time in this case as we won't be able to re-setup the VPN routes without restarting it.

I never turn on that Low-level Setting (except as a test a while ago & then turned it back off, as it seemed to cause problems similar to #737) & everything seems fine w/o it, even across multiple (wifi) networks, but I'll re-enable to try & see what effect it has, if you want me to?

ameshkov commented 7 years ago

I've been doing this w/ non-GPhones regularly. Why'd you specify them?

We disable auto-pause functionality if both of the following conditions are true:

  1. A device does not suffer from the tethering issue.
  2. A device does not suffer from power saving mode issue.

In both cases, we need to pause protection automatically.

For instance, Samsung with Nougat suffers from the tethering issue.

I never turn on that Low-level Setting (except as a test a while ago & then turned it back off, as it seemed to cause problems similar to #737)

Actually, using complicated routes is preferable. Filtering LAN addresses might cause issues with a lot of apps. That's why by default we are in fact using "complicated routes" except some rare cases with old Android versions/devices.

ameshkov commented 7 years ago

Auto-pause disabled by default for new Nexus and Pixel devices. Also, there are some improvements that will help it function properly if a user opts to disable it manually.

ameshkov commented 7 years ago

@vozersky we need to re-test Samsung tethering issue with pref.vpn.ipv4.complex enabled

vozersky commented 7 years ago

@ameshkov with disabled pause and pref.vpn.ipv4.complex enabled there is still no internet connection in the mobile hotspot network on galaxy s7

vozersky commented 7 years ago

Looks like the issue is gone with the latest update of Samsung firmware. I've just updated S7 to G930FXXU1DQB7 and tethering works now.

ameshkov commented 7 years ago

Firmware version?

ameshkov commented 7 years ago

@vozersky check OnePlus as well

ameshkov commented 7 years ago

Let's reopen this issue then.

vozersky commented 7 years ago

Tethering also works fine on OnePlus 3.

ameshkov commented 7 years ago

What about power saving? No issues?

ameshkov commented 7 years ago

Ok then, let's do it for all devices with Nougat.

vozersky commented 7 years ago

Yeah, didn't find any power saving issues on galaxy s7 (mid powersaving mode)