如何屏蔽所有在线广告
How I block all online ads

原始链接: https://troubled.engineer/posts/no-ads/

## 屏蔽广告:深入研究 出于对在线广告的沮丧,作者踏上了一段为期多年的旅程,旨在消除所有设备上的广告。他们成功的策略结合了几种技术,首先是从一个强大的浏览器基础开始:Firefox,搭配uBlock Origin和精心策划的过滤列表(EasyList、AdGuard - Ads),并辅以针对特定网站烦恼的自定义过滤器。 除了浏览器之外,通过Pi-hole(在Docker中托管)进行DNS过滤可以拦截应用程序中的广告。这与一种出人意料但并不完美的方法相结合:通过VPN将流量路由到云提供商(如DigitalOcean)。平台通常会抑制来自这些提供商的流量中的广告,怀疑存在广告欺诈。 有用的补充包括SponsorBlock浏览器扩展(跳过YouTube赞助)以及在iOS上禁用后台应用程序刷新。对于Android,NewPipe或Invidious等选项提供无广告的YouTube体验。虽然存在修改过的应用程序,但作者警告存在安全风险。 关键在于采用分层方法,承认完全消除广告需要持续维护和偶尔的解决方法,但只要有决心,就可以实现。重要的是,作者指出直接通过会员或捐赠来支持内容创作者的价值。

一个黑客新闻的讨论集中在屏蔽在线广告上。最初的帖子,标题为“我如何屏蔽所有在线广告”,引发了关于有效方法的对话。 普遍的共识倾向于使用 Firefox 浏览器和 uBlock Origin 扩展作为标准做法。有人对 Google Chrome 的“manifest v3”更新是否故意反隐私表示担忧。 许多用户推荐使用用户代理切换器等额外工具,以绕过网站兼容性检查,这些检查不公平地阻止非 Chrome 浏览器。 除了桌面端,还提到了移动广告屏蔽。其他方法包括使用 AdNauseam “污染”广告资料,直接离开带有侵入性广告的网站,以及利用 SponsorBlock 跳过视频中的赞助片段。 Brave 浏览器和 AdGuard Extra(用于 Twitch)也被强调为有用的选择。
相关文章

原文

Ads support content creators and free services. If you value specific creators or platforms, consider supporting them directly through memberships or donations rather than relying solely on ad blocking.

A couple of years ago, I decided I'd had enough of ads. Not just the occasional banner or a quick pre-roll video — I mean all of them. They have to go.

So I embarked on a holy crusade to get rid of them as much as possible. I tried the obvious solutions first, then dug deeper into less conventional approaches. It took a long time, tons of experiments, and many observations, but today I am finally happy where I stand.

There are many techniques out there, some well-known and others surprisingly obscure. Here's what I learned over the years and what actually worked for me.

Let's start with the basics and work our way up to the more unconventional methods. The first few are straightforward and widely used. The later ones require more setup and maintenance but can block ads in places where traditional methods fail.

Browser ad blockers are the biggest boycott in history. You're probably using one already!

I use Firefox with uBlock Origin — it's the best ad blocking combo out there. It's harder if you're on Chromium-based browser, since Google transitioned to Manifest V3 which conveniently limits ad blockers.

I keep my filter lists minimal — they cover almost everything I need:

  • Built-in uBlock filters
  • EasyList
  • AdGuard - Ads

I also maintain my own filters. They don't focus on ads, but rather on other annoyances.

DNS filtering complements browser extensions by catching ads that slip through — particularly in mobile apps. Mobile apps typically load ads from dedicated ad-serving domains, making them straightforward to block at the DNS level.

Pi-hole and AdGuard Home are the most popular self-hosted options for this. If you're looking for a cloud-based solution, I don't use them myself, but I've heard good things about NextDNS.

I use Pi-hole, and it's been smooth so far. I don't expose it publicly — instead, I connect via WireGuard and set Pi-hole as the DNS server in my WireGuard config. If you're looking for blocklists, The Firebog is a great starting point. You'll also want to maintain an allowlist — blocklists occasionally include legitimate domains that break functionality on websites or in apps.

There are multiple ways to install Pi-hole, I keep it in Docker and suggest you do the same.

Now here comes a secret ingredient. If you route all your traffic through a popular cloud provider (via VPN or proxy), then many online platforms are less likely to show you ads.

That happens because to these platforms you look like a fraudster doing something sketchy with their ads. Imagine this scenario: a small business spends $1000 on ads. Their competitors figure out the targeting, mimic that behavior, spin up 10 VMs, and waste the entire advertising budget on fake interactions. The small business isn't coming back to spend more money on ads after that experience.

Online platforms are well aware of this, so they fight fraud. Not serving ads to traffic from public cloud providers is one of the first steps they take.

However, this will negatively affect your experience on some sites — you'll hit Cloudflare captchas and HTTP errors due to sites blocking cloud provider IPs. I'm fine with it and just turn the VPN off occasionally when something breaks. Just keep in mind that even a few requests with your real IP might be enough for an online platform to start showing you ads again.

I host WireGuard on a $5 DigitalOcean droplet, but Hetzner, Azure, Google Cloud, AWS, and others work just as well. DigitalOcean also provides a detailed guide on how to set it up.

Below you'll find some other useful things, although they aren't exactly related to ad-blocking:

  • Browser extensions against annoyances:
  • I'd also suggest SponsorBlock — it has saved me so much time. There's also an option for TVs and streaming devices.
  • If you're on iOS, consider turning off Background App Refresh. Only a few apps use Background App Refresh as Apple designed it, the majority are simply abusing it to get more data about you. If you don't have always-on VPN, you risk exposing your real IP.
  • Patched apps are also a thing, and it's also possible to patch mobile apps yourself via ReVanced. While it's a decent option, it's also a security risk — I'm careful with it and don't use it with sensitive accounts.

I've been using all these things mentioned above for over 3 years now. I barely see any ads nowadays. If you're curious about specifics, I keep track of what works where:

PlatformWebiOS / Android
YouTubeuBlock OriginNewPipe or Invidious
InstagramuBlock OriginVPN via cloud (takes a week to a month)
TwitchVPN via cloud (takes a few days)-
TikTokuBlock OriginVPN via cloud (takes a few hours)
Apps with AdMob-DNS blocking

These are the tricky outliers. For most sites and apps, DNS filtering and a browser ad blocker catch 99% of ads without any extra effort. The VPN approach helps with that remaining 1%, though it usually takes time to kick in — these platforms don't make decisions based on seeing your IP once, they need to observe patterns over days or weeks.

联系我们 contact @ memedata.com