AdguardTeam / AdguardForAndroid

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

Some apps repeat ad requests every second #511

Closed ameshkov closed 6 years ago

ameshkov commented 8 years ago

List of apps: Play Music Manga Rock

https://www.reddit.com/r/Android/comments/4guine/adguard_25_update_is_live_with_https_filtering/d2mg2t4

The same issue with Play Music.

gshumihin commented 8 years ago

Here's https log of a problem with play music: adguardlog.txt

ameshkov commented 8 years ago

@gshumihin don't forget about magna rock

gshumihin commented 8 years ago

Here's http request log: https://www.dropbox.com/s/s1pjhsvvzfijl7o/adguard.log Application name: com.notabasement.mangarock.android.titan Seems like app loads ads while being in background.

ameshkov commented 8 years ago

Play Music

These are requests from GoogleTagManager: https://developers.google.com/tag-manager/android/v4/#intro https://support.google.com/dcm/partner/answer/4293719?hl=en

ameshkov commented 8 years ago

Instead of an empty response, we should return an error response (500 Internal Server Error for instance). I hope in this case they'll use their exponential backoff strategy: https://developers.google.com/api-client-library/java/google-http-java-client/backoff#examples

ameshkov commented 8 years ago

It seems that for GoogleTagManager we should simply return 200 OK response otherwise it may sometimes react with constant request repeating.

ameshkov commented 8 years ago

We should also add two domains to SSL blacklist: doubleclick.net googleadservices.com

TPS commented 8 years ago

We should also add two domains to SSL blacklist: doubleclick.net googleadservices.com

If #552 is already accomplished, why's this necessary?

ameshkov commented 8 years ago

If #552 is already accomplished, why's this necessary?

GoogleTagManager may (sometimes) go crazy when we simply drop connections to these domains. And without https filtering this is what we do for these domains.

Eugene-Savenko commented 7 years ago

The app 'Next', lock screen one, by Microsoft, is being reported in Adguard as a huge ads traffic. Something like hundreds of thousands of requests (daily) to ads. The bandwidth 'saved' reach in about 1gb or so (daily as well).

The NEXON game 'Oz: Broken Kingdom' has the same issue.

Logs and stuff: 1441845

ameshkov commented 7 years ago

@gshumihin please take a look at it.

ameshkov commented 7 years ago

@evgeniy-ADG please ask user to record HTTP requests log, it's hard to reproduce this issue with MS apps on our side.

carlylemiii commented 7 years ago

Goodreads is another such app that goes absolutely nuts:

screenshot_20170902-223402 screenshot_20170902-223411

https://www.dropbox.com/s/p6zquasjmud8kp4/adguard_logs_0209_2233.zip?dl=1

TPS commented 7 years ago

I find, since I use DNS-level blocking, I don't see much of this. Is there a way to enable DNS-blocking per-app, for those who don't want it globally?

ameshkov commented 7 years ago

@TPS unfortunately, dns-blocking is always system-wide

TPS commented 7 years ago

Duplicates #786, also?

I'm suddenly having this issue w/ ||csi.gstatic.com^ from the Mobile Ads subscription whenever I open GDrive: it & many related apps go nuts trying to find that server. I even tried the ||csi.gstatic.com^$important & (mentioned elseplace) ||csi.gstatic.com^$empty,important versions. This filter doesn't seem to block @ DNS-level, though it seems like an obvious candidate. Logs attached:

adguard_logs_1309_0518.zip

ameshkov commented 7 years ago

Is can see it in your log file, but I cannot reproduce it

ameshkov commented 7 years ago

Does it still happen?

TPS commented 7 years ago

Yep, everytime I open GDrive: adguard_logs_1709_1921.zip

TPS commented 7 years ago

Heh, ||csi.gstatic.com$important (minus the ^) fixes it! It's properly blocked via DNS. Maybe ^ precludes DNS processing, for some bug/parsing reason?

adguard_logs_1709_1931.zip

ameshkov commented 7 years ago

Hm, ||csi.gstatic.com^ should block it just okay

ameshkov commented 7 years ago

Huh, you're right:)

DNS question contains csi.gstatic.com. with a trailing dot. This is why it does not work properly.

ameshkov commented 7 years ago

Filed a bug report: https://github.com/AdguardTeam/AdguardForAndroid/issues/1453

TPS commented 7 years ago

If it's just the trailing . problem, why does ||csi.gstatic.com^ have it & ||csi.gstatic.com not?

TPS commented 7 years ago

||fls-na.amazon.com^ from Spyware subscription has same problem. ||fls-na.amazon.com$important fixes it.

TPS commented 7 years ago

@ameshkov I'm still having this problem, though I thought #1453/https://github.com/AdguardTeam/AdguardDNS/issues/185 was meant to fix it?!

adguard_logs_2.10.104_2609_2323.zip

ameshkov commented 7 years ago

It appears that these domains shouldn't be blocked on the DNS level as it may break some websites: https://github.com/AdguardTeam/AdguardDNS/blob/5a6bdbc9ecb7187f63090e05b3fbdb6656e0c25b/Filters/exclusions.txt#L22

However, when you add them to the user filter, they are blocked as user filter is used for DNS filtering.

TPS commented 7 years ago

Ah, ok. Now I understand the context of most of the above. Carry on.

Why is this issue still open, though?

ameshkov commented 7 years ago

Just in case we encounter new issues like that