Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdGuard keeps restarting when VPN routing mode is changed from Local VPN to Automatic Proxy #4796

Closed
4 tasks done
sconim opened this issue Jun 16, 2023 · 10 comments
Closed
4 tasks done

Comments

@sconim
Copy link

sconim commented Jun 16, 2023

Please answer the following questions for yourself before submitting an issue.

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

AdGuard version

4.0

Environment

- OS:Android 13
- Device:Galasy S20 (SM-G980F)

Root access

  • Yes, I have it.

What filters do you have enabled?

AdGuard Mobile Ads filter, AdGuard URL Tracking filter, AdGuard Social Media filter, AdGuard Annoyances filter, AdGuard Cookie Notices filter, AdGuard Popups filter, AdGuard Mobile App Banners filter, AdGuard Other Annoyances filter, AdGuard DNS filter, EasyList, Fanboy's Annoyances, Fanboy's Social Blocking List, Peter Lowe's Blocklist, I don't care about cookies

What Stealth Mode options do you have enabled?

Hide your search queries, Send Do-Not-Track signals, Strip URLs of tracking parameters, Self-destruction of third-party cookies, Turn off Advertising ID

Issue Details

Steps to reproduce:

  1. Filtering > Network > Routing Mode
  2. Switch from Local VPN to Automatic Proxy
  3. Open various apps that are routed through Proxy and/or have HTTPS filtering enabled.

Expected Behavior

AdGuard should remain enabled as long as connection to network is stable - continuing to protect the device.

Actual Behavior

ADG becomes unstable - it often restarts and eventually it no longer reconnects. I believe the crux of the problem lies in ADG's inability to reconfigure automatic proxy upon reentering a known Wi-Fi network, when "Reconfigure Automatic proxy when network changes" is disabled (under low-level settings) - see attached screenshot. It may seem like an oxymoron, and you'd be asking, then why not enable the "Reconfigure Automatic proxy when network changes"?
Well, some apps (quite a few, in fact) force Mobile Network connection when launched, even when connected to Wi-Fi (i.e. network/mobile providers portal apps, bank apps, financial and government apps, etc). So, if the above setting IS enabled, ADG restarts every time one of these apps connects to Mobile Network, whether in foreground or background. I tested this by disabling the above setting and when disabled, AdGuard no longer restarts upon launching those apps.

So, in summary:

  • If "Reconfigure Automatic proxy when network changes" is enabled, ADG keeps restarting. Even if it doesn't crash, these repeated restarts, in themselves, are a compromise to privacy.
  • If, on the other hand, the "Reconfigure Automatic proxy when network changes" is disabled, then ADG almost certainly crashes upon reentering a known Wi-Fi, which results in no network

Screenshots

Additional Information

Should the "Reconfigure Automatic proxy when network changes" be enabled? Some apps can take advantage of the momentary lack of protection.

The same tests performed with routing mode set to Local VPN do not cause AdGuard to keep restarting.

I also have AdGuard VPN installed and it's configured to integrate with AdGuard Blocker.

DNS server is set as DNS over HTTPS.

@Cblue2133
Copy link

@senseigit
Copy link

I was thinking that my network is making this to happen, and every time protection restart, I manually checked filtering log and found a ipv6 connection on port 5228 for Google Play services app.
That's strange 😕

@adguard-bot adguard-bot assigned maxikuzmin and unassigned Versty Jul 10, 2023
@maxikuzmin
Copy link
Contributor

@sconim what bank and mobile apps do you use? Haven't noticed my apps forcibly switching to the mobile network

it would be nice to get your logs.

  • Enable debug logging:

Settings -> General -> Advanced -> Logging level -> Debug

  • Reproduce the issue related to the button behaviour, then remember the exact time when it happened

  • Collect logs:

Settings -> General -> Advanced -> Export logs and system info

mention the 4796 number in the subject
specify the exact time when the issue occurred

@sconim
Copy link
Author

sconim commented Jul 13, 2023

@sconim what bank and mobile apps do you use? Haven't noticed my apps forcibly switching to the mobile network

it would be nice to get your logs.

* Enable debug logging:

Settings -> General -> Advanced -> Logging level -> Debug

* Reproduce the issue related to the button behaviour, then remember the exact time when it happened

* Collect logs:

Settings -> General -> Advanced -> Export logs and system info

* Sent this file to [devteam@adguard.com](mailto:devteam@adguard.com):

mention the 4796 number in the subject specify the exact time when the issue occurred

I have identified the Virgin My Account app as the culprit for this however, one other problem that I seem to be having when I switch over from Local VPN to Automatic Proxy is that, at times, network may get blocked altogether. I've noticed receiving emails on my computer but not on the phone and when I checked, I realized that no traffic, at all, was allowed through. I switched back to Local VPN and everything went back to normal.

This may also happen when HTTPS filtering is enabled on apps that don't support it.

@maxikuzmin
Copy link
Contributor

@sconim how often does it happen? I don't have this problem recurring.
Please, if it happens again, unload the debug logs as indicated in the instructions above so we can understand what's going on.
Don't forget to select the "Debug" logging level beforehand

@Eugene-Savenko
Copy link
Member

@maxikuzmin We've got a similar report from a different user here

I recently rooted my device. I wanted to try the Root routing mode instead of the local VPN, but enabling the protection results in it trying to enable, then disabling it, without any form of error. Adguard has root privileges.

If it is the same issue, you can find logs in # 790558 (CRM ID). I will also add this to the triage queue, in case it's a different issue.

@maxikuzmin
Copy link
Contributor

@Eugene-Savenko @sconim we'll check it out

@maxikuzmin
Copy link
Contributor

@sconim restart happens because the presence/absence of IPv6 on the network changes, otherwise the internet will stop working

@maxikuzmin
Copy link
Contributor

@sconim I'm closing this issue for now, unless you have any more questions

@maxikuzmin
Copy link
Contributor

@sconim @Cblue2133 @senseigit we have looked into this issue in more detail and have opened a Feature request for this issue. Please vote if the problem is still recurring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants