AdguardTeam / AdguardForAndroid

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

Firefox Based Browsers don't work right #5243

Closed SyCoREAPER closed 3 months ago

SyCoREAPER commented 4 months ago

Please answer the following questions for yourself before submitting an issue

AdGuard version

4.x.x

Environment

HTTPS filtering

Root access

Integration with AdGuard VPN

Routing mode

Local VPN

Ad Blocking

AdGuard Base filter, AdGuard Mobile Ads filter, EasyList

Privacy

AdGuard Tracking Protection filter, AdGuard URL Tracking filter, EasyPrivacy, Legitimate URL Shortener, Peter Lowe's Blocklist, Fanboy's Anti-Facebook List

Social

AdGuard Social Media filter, Fanboy's Social Blocking List

Annoyances

AdGuard Annoyances filter, AdGuard Cookie Notices filter, AdGuard Popups filter, AdGuard Mobile App Banners filter, AdGuard Other Annoyances filter, AdGuard Widgets filter, Adblock Warning Removal List, Fanboy's Annoyances, EasyList Cookie List

Security

Online Malicious URL Blocklist, NoCoin Filter List

Language-specific

No response

Other

AdGuard DNS filter, AdGuard Experimental filter

Which DNS server do you use?

Cloudflare for Families - Malware Blocking

DNS protocol

DNS-over-HTTPS

Custom DNS

No response

What Stealth Mode options do you have enabled?

No response

Issue Details

Steps to reproduce:

  1. Enable Developer Options
  2. Turn on 3rd Party Certificate

Expected Behavior

Block everything the same way it does on Chromium based browsers.

Actual Behavior

AdGuard misses tons of ads and the ones it removes often leaves a blank space. It borderline feels like it doesn't work.

The extension works correctly but I don't want the extension bloat, just the main paid app.

Screenshots

Screenshot 1

Additional Information

Tried Firefox Beta, Firefox Nightly, Fennec, Mull, IceRaven. All behave the same.

maxikuzmin commented 3 months ago

@SyCoREAPER Firefox requires you to confirm in the settings to install third-party certificates. Did you do that? You need to do this by going to: Context menu -> settings -> About Firefox -> click many times on the Firefox icon to enable the developer menu -> go back to Settings -> tap Secret settings -> enable the "Use third party CA certificates" switch

SyCoREAPER commented 3 months ago

@SyCoREAPER Firefox requires you to confirm in the settings to install third-party certificates. Did you do that? You need to do this by going to: Context menu -> settings -> About Firefox -> click many times on the Firefox icon to enable the developer menu -> go back to Settings -> tap Secret settings -> enable the "Use third party CA certificates" switch

As stated in the report, I did that.

maxikuzmin commented 3 months ago

@SyCoREAPER could you please clarify which sites you are testing this problem on? Is it recurring on all sites or some sites?

SyCoREAPER commented 3 months ago

My default test site is apkmirror.com because it has large ads but is a safe site.

SyCoREAPER commented 3 months ago

My default test site is apkmirror.com because it has large ads but is a safe site.

But again that's only an example it didn't work elsewhere.

That said, I've abandoned Firefox but the issue still exists. It's up to you if you wish to pursue the ticket or close it.

Firefox was just too slow for daily use.

maxikuzmin commented 3 months ago

@SyCoREAPER I think you had an older version of AdGuard. I remember we recently added Firefox to default HTTPS filtering, previously Firefox was not filtered by default due to some incompatibilities. I checked your problem and everything is fine now, the problem is not recurring. I also tried disabling HTTPS filtering for Firefox, and the problem started to reproduce as you described. You can test this theory to see for yourself. I am closing this issue for now

SyCoREAPER commented 3 months ago

@SyCoREAPER I think you had an older version of AdGuard. I remember we recently added Firefox to default HTTPS filtering, previously Firefox was not filtered by default due to some incompatibilities. I checked your problem and everything is fine now, the problem is not recurring. I also tried disabling HTTPS filtering for Firefox, and the problem started to reproduce as you described. You can test this theory to see for yourself. I am closing this issue for now

I'm always on the latest Adguard Nightly with with Https filtering on. Maybe it's just certain builds of Firefox break adguard from time to time.

Prankish8407 commented 3 months ago

I have the exact same issue, also enabled developer mode --> and checked the certificate box. When i run chrome on android, everything is blocked as expected, when i run firefox all blocked sites / ads go trough.

edit:

just to clarify a bit more: chrome test: androidtest

firefox test does not even show up in adguard home.

im running adguard home inside docker with host network, all ports are local (not exposed) except for port 80 that goes trough a cloudflare zero trust tunnel to reach the dashboard externally.

i have multiple devices, including multiple servers, and they all work perfectly fine with blocking the parent control and with blocking ads URL (black / denylist)

adguard home is running the latest docker container --> stable not nightly. firefox for android is on the latest version from the play store.

Firefox has CA enabled via smashing the firefox icon 5x times --> secret settings --> checkbox ticked.

The moment i install chrome, or brave (chromium based) everything works as expected.

Prankish8407 commented 3 months ago

To add this is the docker-compose file i use --> the ports are commented out as the host network will use predefined ports:

   adguardhome:
     image: adguard/adguardhome
     container_name: adguardhome
     # ports:
     #   - 53:53/tcp
     #   - 53:53/udp
     #   - 67:67/udp
     #   - 68:68/udp
     #   - 80:80/tcp
     #   - 443:443/tcp
     #   - 443:443/udp
     #   - 853:853/tcp
     #   - 853:853/udp
     #   - 3000:3000/tcp
     #   - 5443:5443/tcp
     #   - 5443:5443/udp
     #   - 6060:6060/tcp
     network_mode: host
     volumes:
       - /volumes/adguardhome-work:/opt/adguardhome/work
       - /volumes/adguardhome-config:/opt/adguardhome/conf
     restart: always
SyCoREAPER commented 3 months ago

@Prankish8407 Ignore if you got an email with my original response, I just woke up at that point. Reread and saw you said to comment out.

I honestly wouldn't have checked (thought to) all that. Fantastic investigating, thank you

@maxikuzmin Can you please look into what @Prankish8407 provided? I looked around and others say Firefox didn't work either. I also saw some saying Samsung Internet didn't work for them but it worked fine for me.

So in summary there seems to be something, somewhere that's causing a incompatibility in certain situations/configurations for people using the same browser but getting different results.

Prankish8407 commented 3 months ago

Yes sir, if any logs needs to be provided, or any debug steps need to be taken let me know, im willing to test if needed.

Prankish8407 commented 3 months ago

Small update with a little further testing:

Apart from the normal Firefox app i downloaded firefox nightly on android (developers firefox) the same issue occurs, I've tested it with ports temporary forwarded in the router and using the public IP as DNS on mobile data, same issue occurs, and still works for chrome.

I've delete all cache, even cookies etc, for firefox, firefox nightly and chrome. chrome still blocks as expected, both firefox versions ignore and dns blocks or parent control, firefox still does not show up in the adguard dashboard, yet all chrome blocks show up as shown in previous post. I did re-enable CA option in developer mode after smashing firefox logo 5 times, also tested it with it being disabled, same result.

I wrote down all the docker containers running on this specific server with some details:

Port:               Stack:              Container:              Networkmode:            Cloudflare:         Cloudflare SSO:             Comments:
53                  admin_tools         adguardhome             host                    no                  n/a                         adguard
67                  admin_tools         adguardhome             host                    no                  n/a                         adguard
68                  admin_tools         adguardhome             host                    no                  n/a                         adguard
80                  admin_tools         adguardhome             host                    yes                 no                          adguard
82                  admin_tools         vaultwarden             docker                  yes                 no                          bitwarden
443                 admin_tools         adguardhome             host                    no                  n/a                         adguard
853                 admin_tools         adguardhome             host                    no                  n/a                         adguard
3000                admin_tools         adguardhome             host                    no                  n/a                         adguard
3020                admin_tools         openvscode-server       host                    yes                 yes                         vscode
3040                chromium            gluetun                 docker                  no                  n/a                         chrome
4533                mediaserver         navidrome               docker                  yes                 no                          navidrome
5055                mediaserver         gluetun                 vpn                     yes                 no                          overseerr
5443                admin_tools         adguardhome             host                    no                  n/a                         adguard
6060                admin_tools         adguardhome             host                    no                  n/a                         adguard
6767                mediaserver         gluetun                 vpn                     yes                 yes                         bazarr
7878                mediaserver         gluetun                 vpn                     yes                 yes                         radarr
8080                mediaserver         gluetun                 vpn                     yes                 yes                         sabnzbd
8123                homeassistant       homeassistent           host                    yes                 no                          homeassistant
8181                mediaserver         tautulli                docker                  yes                 yes                         tautulli
8191                mediaserver         gluetun                 vpn                     no                  n/a                         flaresolver
8200                backup              duplicati               docker                  no                  n/a                         duplicati
8888                backup              resilio                 docker                  no                  n/a                         resilio
8989                mediaserver         gluetun                 vpn                     yes                 yes                         sonarr
9091                mediaserver         gluetun                 vpn                     yes                 yes                         transmission
9696                mediaserver         gluetun                 vpn                     yes                 no                          prowlarr
51413               mediaserver         gluetun                 vpn                     no                  n/a                         transmission
55555               backup              resilio                 docker                  no                  n/a                         resilio

i've stopped all containers and restarted adguard same issue occurs.

Prankish8407 commented 3 months ago

Is there anything else needed? or has the issue been found? I've noticed that DNS rewrites also dont work in firefox android.

it feels / seems like firefox has a set DNS server for there mobile browser, ill test this out in the weekend with wireshark to see if i can pick anything up.