AdguardTeam / AdguardForAndroid

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

AdGuard in Automatic proxy routing mode ignores the DNS provided by the VPN #4637

Closed innit86 closed 1 year ago

innit86 commented 1 year ago

Versions

AdGuard for Android 4.0 release AdGuard VPN for Android 2.3 release

Environment

Android 11, OnePlus A6013, rooted

Configure both applications according to the settings below

AdGuard for Android settings:

AdGuard VPN for Android settings:

Steps to reproduce

  1. Enable protection in AdGuard application
  2. Connect to any location in AdGuard VPN application

Expected result

In this case the DNS provided by the VPN - AdGuard DNS family should be used

Actual result

AdGuard Non filtering DNS is in use

Original text _Log archives have been removed due to privacy reasons_ ### Please answer the following questions for yourself before submitting an issue. - [X] I am running the latest version - [X] I checked the documentation and found no answer - [X] I checked to make sure that this issue has not already been filed ### AdGuard version 4.0 (every new build after 4.0 nightly 38) ### Environment ```markdown - OS:Android 13 - Device:Google Pixel 7 Pro - Firmware: TQ2A.230305.008.C1 ``` ### Root access - [X] Yes, I have it. ### What filters do you have enabled? No filters ### What Stealth Mode options do you have enabled? _No response_ ### Issue Details Steps to reproduce: 1.Set DNS to Automatic DNS in AdGuard settings. 2.Turn on a VPN of your choice. 3.Turn on AdGuard protection. ### Expected Behavior AdGuard with Automatic DNS should acknowledge and use the DNS server provided by the VPN. Normal behaviour: ![Screenshot_20230425_103938~3](https://user-images.githubusercontent.com/58744017/235135570-c3064564-70ca-44bb-a2c4-a8e778b623be.jpg) ### Actual Behavior Adguard with Automatic DNS ignores VPN's DNS server and uses ISP's ones instead. This feature works flawlessly on 4.0 nightly 38 (82) but has been broken in every new release since you decided to overhaul and completely rewrite the whole app. Problem: ![Screenshot_20230425_103806~3](https://user-images.githubusercontent.com/58744017/235135759-d3943e1d-8e23-4883-baea-c59add18c2fc.jpg) ### Screenshots
Screenshot 1:
### Additional Information _No response_
Versty commented 1 year ago

@innit86 Hi! In the integrated mode the dns server is provided by AdGuard application. For the Automatic DNS option the server should be AdGuard Non-filtering by default, but you can set any dns you like.

Versty commented 1 year ago

@innit86 In case the VPN is disabled and the AdGuard application is running, the Automatic DNS option will use the DNS configured in the device settings.

innit86 commented 1 year ago

Hi. I want AdGuard to use the DNS provided by the VPN (in my case it's Surfshark) and not any custom servers. I can do it with the older AdGuard version mentioned above (Settings - DNS - System) but it doesn't work anymore on any of the newer builds. It uses the DNS provided by the ISP instead. This wasn't the case before you changed things.

Versty commented 1 year ago

@innit86 Are you using AdGuard in the Local VPN mode?

innit86 commented 1 year ago

@innit86 Are you using AdGuard in the Local VPN mode?

Automatic proxy in root mode

Versty commented 1 year ago

@innit86 We have tried to reproduce the issue with your settings, but the dns provided by the vpn app is operating on our device as you specified under "Expected behaviour".

Could you try to reproduce the issue with the different VPN (not Surfshark)?

innit86 commented 1 year ago

@innit86 We have tried to reproduce the issue with your settings, but the dns provided by the vpn app is operating on our device as you specified under "Expected behaviour".

Could you try to reproduce the issue with the different VPN (not Surfshark)?

So far I've tried Surfshark, PIA & Proton (OpenVPN TCP, UDP, WireGuard protocols) on both Wi-Fi & cellular with AdGuard On + Automatic DNS and it either connects but ignores the DNS from each of these VPNs or doesn't connect to the Internet at all.

What's your exact setup? Can something be changed in low-level settings?

innit86 commented 1 year ago

@Versty Seems like it's completely useless to report any kind of issues, especially as serious as this one, as they're being ignored anyway. Thanks for nothing!

Versty commented 1 year ago

Hi, @innit86! Sorry for not getting back to you sooner, we have managed to reproduce this issue.

We are currently looking for a solution to improve this behavior and use the DNS provided by the VPN in the case described above.

artemiv4nov commented 1 year ago

In this case, the DNS from the AdGuard app will be used instead of AdGuard VPN. For some fallback actions we use AdGuard DNS non-filtering configuration inside the AdGuard VPN but we will improve this behavior in next app versions. Please follow for news.