deividgdt / ytadsblocker

YTadsblocker is a script to block all the Youtube's advertisement in Pi-Hole
GNU General Public License v3.0
89 stars 12 forks source link

Use pihole regex filter? #11

Open jbreitbart opened 2 years ago

jbreitbart commented 2 years ago

I did take a quick look at your scripts and it looks like you are filtering the dns query log with a regex and add all matched domains to the blacklist. I am wondering why you are not directly using a blacklist regex filter in pihole? Something like

image
ftonioli commented 2 years ago

Hello,

Good point of view!

Appears to be working.

Disabled all previus insertion and leave only regex enable.

image

deividgdt commented 2 years ago

Hi @jbreitbart ,

Some time ago I tried this method, but basically Youtube stop working after apply this regexp. Anyway, I'll test it again and I'll inform with the results.

Kind regards,

jbreitbart commented 2 years ago

Some time ago I tried this method, but basically Youtube stop working after apply this regexp. Anyway, I'll test it again and I'll inform with the results.

It looks like you are correct. Is your script doing any further filtering?

ftonioli commented 2 years ago

Hello,

I've tested and had no entire block.

My YouTube appears to be working.

Anyway, I reopened a issued about the script is not reading and adding domain to backlist.

I commented on a issue that was closed with the same behaviors.


Felipe Tonioli

A segunda, 30/08/2021, 08:16, Jens Breitbart @.***> escreveu:

Some time ago I tried this method, but basically Youtube stop working after apply this regexp. Anyway, I'll test it again and I'll inform with the results.

It looks like you are correct. Is your script doing any further filtering?

ftonioli commented 2 years ago

Ok,

Tested again and seems to be blocking video play.


Felipe Tonioli

A segunda, 30/08/2021, 08:32, Felipe Tonioli @.***> escreveu:

Hello,

I've tested and had no entire block.

My YouTube appears to be working.

Anyway, I reopened a issued about the script is not reading and adding domain to backlist.

I commented on a issue that was closed with the same behaviors.


Felipe Tonioli

A segunda, 30/08/2021, 08:16, Jens Breitbart @.***> escreveu:

Some time ago I tried this method, but basically Youtube stop working after apply this regexp. Anyway, I'll test it again and I'll inform with the results.

It looks like you are correct. Is your script doing any further filtering?

ftonioli commented 2 years ago

Ok, again,

I have reinstalled the script.

Looks like Regex only is blocking entire Googlevideo.com.

Maybe if we are able to usa only part of the Regex , should work.


Felipe Tonioli

A segunda, 30/08/2021, 08:41, Felipe Tonioli @.***> escreveu:

Ok,

Testes again and seems to be blocking video play.


Felipe Tonioli

A segunda, 30/08/2021, 08:32, Felipe Tonioli @.***> escreveu:

Hello,

I've tested and had no entire block.

My YouTube appears to be working.

Anyway, I reopened a issued about the script is not reading and adding domain to backlist.

I commented on a issue that was closed with the same behaviors.


Felipe Tonioli

A segunda, 30/08/2021, 08:16, Jens Breitbart @.***> escreveu:

Some time ago I tried this method, but basically Youtube stop working after apply this regexp. Anyway, I'll test it again and I'll inform with the results.

It looks like you are correct. Is your script doing any further filtering?

langkhach270389 commented 2 years ago

Hi @jbreitbart ,

Some time ago I tried this method, but basically Youtube stop working after apply this regexp. Anyway, I'll test it again and I'll inform with the results.

Kind regards,

Hi boss. I think service check subdomain after 5 minutes. That mean dns A-record TTL < 1800-5*60. Blocked

deividgdt commented 2 years ago

Hi @jbreitbart

It looks like you are correct. Is your script doing any further filtering?

No, it's as simply as that, just one regexp. The log file is been read every 5 mins (approx) and all those googlevideo subdomains that match the regexp are directly blocked.

ftonioli commented 2 years ago

Hello,

Me again.

Looks like something is not working.

Almost nothing more is blocked:

image

See that nothing is add during this block of time:

[2021-09-29 06:59:40] No new subdomains to added. [2021-09-29 07:04:40] Checking /var/log/pihole.log... [2021-09-29 07:04:41] No new subdomains to added. [2021-09-29 07:09:41] Checking /var/log/pihole.log... [2021-09-29 07:09:41] No new subdomains to added. [2021-09-29 07:14:41] Checking /var/log/pihole.log... [2021-09-29 07:14:41] No new subdomains to added. [2021-09-29 07:19:41] Checking /var/log/pihole.log... [2021-09-29 07:19:41] No new subdomains to added. [2021-09-29 07:24:41] Checking /var/log/pihole.log... [2021-09-29 07:24:41] No new subdomains to added. [2021-09-29 07:29:41] Checking /var/log/pihole.log... [2021-09-29 07:29:42] No new subdomains to added. [2021-09-29 07:34:42] Checking /var/log/pihole.log... [2021-09-29 07:34:44] No new subdomains to added.

deividgdt commented 2 years ago

Hi @ftonioli, did you install the latest version (3.7)?

Hello,

Me again.

Looks like something is not working.

Almost nothing more is blocked:

image

See that nothing is add during this block of time:

[2021-09-29 06:59:40] No new subdomains to added. [2021-09-29 07:04:40] Checking /var/log/pihole.log... [2021-09-29 07:04:41] No new subdomains to added. [2021-09-29 07:09:41] Checking /var/log/pihole.log... [2021-09-29 07:09:41] No new subdomains to added. [2021-09-29 07:14:41] Checking /var/log/pihole.log... [2021-09-29 07:14:41] No new subdomains to added. [2021-09-29 07:19:41] Checking /var/log/pihole.log... [2021-09-29 07:19:41] No new subdomains to added. [2021-09-29 07:24:41] Checking /var/log/pihole.log... [2021-09-29 07:24:41] No new subdomains to added. [2021-09-29 07:29:41] Checking /var/log/pihole.log... [2021-09-29 07:29:42] No new subdomains to added. [2021-09-29 07:34:42] Checking /var/log/pihole.log... [2021-09-29 07:34:44] No new subdomains to added.

ftonioli commented 2 years ago

Hey David,

Sure.


Felipe Tonioli

On Wed, Sep 29, 2021 at 4:00 PM David @.***> wrote:

Hi @ftonioli https://github.com/ftonioli, did you install the latest version (3.7)?

Hello,

Me again.

Looks like something is not working.

Almost nothing more is blocked:

[image: image] https://user-images.githubusercontent.com/62801461/135215937-e2ea3589-c585-457e-8a94-1cbae3e95a27.png

See that nothing is add during this block of time:

[2021-09-29 06:59:40] No new subdomains to added. [2021-09-29 07:04:40] Checking /var/log/pihole.log... [2021-09-29 07:04:41] No new subdomains to added. [2021-09-29 07:09:41] Checking /var/log/pihole.log... [2021-09-29 07:09:41] No new subdomains to added. [2021-09-29 07:14:41] Checking /var/log/pihole.log... [2021-09-29 07:14:41] No new subdomains to added. [2021-09-29 07:19:41] Checking /var/log/pihole.log... [2021-09-29 07:19:41] No new subdomains to added. [2021-09-29 07:24:41] Checking /var/log/pihole.log... [2021-09-29 07:24:41] No new subdomains to added. [2021-09-29 07:29:41] Checking /var/log/pihole.log... [2021-09-29 07:29:42] No new subdomains to added. [2021-09-29 07:34:42] Checking /var/log/pihole.log... [2021-09-29 07:34:44] No new subdomains to added.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/deividgdt/ytadsblocker/issues/11#issuecomment-930259670, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO7EMNKVTQF3VZHGNIC3YD3UEMSW7ANCNFSM5DAEXQTA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

mibere commented 2 years ago

I'm not sure, but is it correct that after

Database "update"

in line 265 there is no Gravity update?

See line 179 and 180:

Database "update"
pihole updateGravity > ${GRAVITY_LOG} 2>&1 &
ftonioli commented 2 years ago

Hello,

The main problem in my opinion, is that no new domains are being inserted.

Today, only two new domains were inserted, but I saw a lot of ads.

Maybe YT changed something.


Felipe Tonioli

On Sat, Oct 2, 2021 at 4:13 PM mibere @.***> wrote:

I'm not sure, but is it correct that after

Database "update"

in line 265 https://github.com/deividgdt/ytadsblocker/blob/master/ytadsblocker.sh#L265 there is no Gravity update?

See line 179 https://github.com/deividgdt/ytadsblocker/blob/master/ytadsblocker.sh#L179 and 180:

Database "update" pihole updateGravity > ${GRAVITY_LOG} 2>&1 &

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/deividgdt/ytadsblocker/issues/11#issuecomment-932768334, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO7EMNOH7SCF2XU6XYHT2WLUE4OQNANCNFSM5DAEXQTA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ftonioli commented 2 years ago

Hello,

A few new domains were added, but for sure, nothing is blocked anymore. :(

YT 1 x 0 pi-hole

:(