this post was submitted on 25 Sep 2022
6 points (100.0% liked)

Self Hosted - Self-hosting your services.

11419 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules

Important

Beginning of January 1st 2024 this rule WILL be enforced. Posts that are not tagged will be warned and if not fixed within 24h then removed!

Cross-posting

If you see a rule-breaker please DM the mods!

founded 3 years ago
MODERATORS
 

A few months ago I set up a Pi-hole at home. I tried to create a decent blacklist by first adding some regexes I found online and then doing some manual optimization by finding ads and blocking the ad requester through the queries page. But in the end it did not work so well. I still get a lot of YouTube ads, for example. So I still rely on uBlock for my ad-blocking.

I just read that Chrome is planning to start weakening ad blocker plugins. I use Firefox, but it is still worrying that the space could potentially keep moving in this direction over time. So I am now more invested in learning how to have more control over my ad-blocking.

Has any of you managed to optimize your Pi-hole to the point that it is possible to browse the internet without an ad-blocker? If so, how did you do it? Are there other good ad-blocking alternatives?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] tvbusy@lemmy.dbzer0.com 2 points 1 year ago (1 children)

Let's say YouTube has a video and 2 ads:

  1. The video is served from videos.example.tld/video.mp4.
  2. The first ads is served from videos.example.tld/ads/ads1.mp4.
  3. The second ads is served from ads.company.tld/ads2.mp4.

PiHole will be able to block only (3) because DNS applies at domain level, as in videos.example.tld. DNS requests only send the domain part and re-use the response for all addresses using that domain.

Browser extension, on the other hand, sees a request to .../ads... and block it since it handled each HTTP/S request and know the full URL.

[โ€“] Sal@mander.xyz 2 points 1 year ago

Thank you - that makes sense!

I think I understand why this is done now. Most HTTP requests are hidden by the SSL encryption, and the keys to decrypt it are client-specific. So, if one wants to block ads at the network level without needing to get the SSL keys of every client that connects to the network, then this is the most specific amount of information that you can provide the PiHole with. The HTTP blocking needs to be set up in a client-specific manner, and that's why they work well as browser extensions.