[GH-ISSUE #6652] [Question]: Is it possible to turn off ads on YouTube? #4443

Closed
opened 2026-10-31 20:39:41 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @SnrJkey on GitHub (Sep 26, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6652

What are you trying to do?

I live in Russia, and there are "problems" with YouTube here. I have to use a VPN, but I don't want to watch ads.

What have you already tried?

No response

3x-ui version

3.8.5

How did you install 3x-ui?

install.sh script

Operating system

No response

Screenshots or config snippets

No response

Before submitting

  • I read the Wiki and searched existing issues.
  • This is a usage question, not a bug report.
  • This question is written in English.
Originally created by @SnrJkey on GitHub (Sep 26, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6652 ### What are you trying to do? I live in Russia, and there are "problems" with YouTube here. I have to use a VPN, but I don't want to watch ads. ### What have you already tried? _No response_ ### 3x-ui version 3.8.5 ### How did you install 3x-ui? install.sh script ### Operating system _No response_ ### Screenshots or config snippets _No response_ ### Before submitting - [x] I read the [Wiki](https://github.com/MHSanaei/3x-ui/wiki) and searched [existing issues](../issues?q=is%3Aissue). - [x] This is a usage question, not a bug report. - [x] This question is written in English.
bsakaguchi 2026-10-31 20:39:41 +07:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@github-actions[bot] commented on GitHub (Sep 26, 2026):

Short answer: 3x-ui can block ad domains, but it can't reliably remove YouTube ads. YouTube serves most of its ads from the same Google hosts as the videos (for example googlevideo.com and youtube.com). Blocking those hosts would also break the videos.

What the panel can do. Xray routes by domain and IP, not by page content. The panel has a domain block list:

  1. Open the Xray settings page and go to Basic Routing (pages.xray.basicRouting).
  2. In Block Domains (pages.xray.blockdomains), pick Ads All (geosite:category-ads-all) or Ads RU 🇷🇺 (ext:geosite_RU.dat:category-ads-all).
  3. Save and restart Xray.

These presets are defined in frontend/src/pages/xray/basics/constants.ts:32-35, and the field is rendered in frontend/src/pages/xray/routing/RoutingBasic.tsx:116-128. Your selection becomes a routing rule that sends matching domains to the block outbound. The docs show the same rule here: docs/content/docs/ru/operations/outbounds-routing.mdx:156-166.

{ "type": "field", "domain": ["geosite:category-ads-all"], "outboundTag": "block" }

This rule removes many trackers and banner ads from other sites and apps. It doesn't remove YouTube's in-stream video ads, because Xray only sees the destination domain (or TLS SNI) and can't tell an ad stream from a video stream on the same host. Blocking googlevideo.com or youtube.com would stop YouTube playback completely.

What does work is blocking on the client side, because only the client can see the page content:

  • In a browser: an ad-blocking extension such as uBlock Origin.
  • On Android or TV: an alternative YouTube client that removes ads.
  • Or YouTube Premium.

These all run on your device and work through the VPN without any change to 3x-ui.

Verdict: Not a bug (expected behaviour). This is a usage question, and the answer is outside what a routing proxy can do.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:5841932807 --> @github-actions[bot] commented on GitHub (Sep 26, 2026): Short answer: 3x-ui can block ad **domains**, but it can't reliably remove YouTube ads. YouTube serves most of its ads from the same Google hosts as the videos (for example `googlevideo.com` and `youtube.com`). Blocking those hosts would also break the videos. **What the panel can do.** Xray routes by domain and IP, not by page content. The panel has a domain block list: 1. Open the Xray settings page and go to **Basic Routing** (`pages.xray.basicRouting`). 2. In **Block Domains** (`pages.xray.blockdomains`), pick **Ads All** (`geosite:category-ads-all`) or **Ads RU 🇷🇺** (`ext:geosite_RU.dat:category-ads-all`). 3. Save and restart Xray. These presets are defined in `frontend/src/pages/xray/basics/constants.ts:32-35`, and the field is rendered in `frontend/src/pages/xray/routing/RoutingBasic.tsx:116-128`. Your selection becomes a routing rule that sends matching domains to the `block` outbound. The docs show the same rule here: `docs/content/docs/ru/operations/outbounds-routing.mdx:156-166`. ```json { "type": "field", "domain": ["geosite:category-ads-all"], "outboundTag": "block" } ``` This rule removes many trackers and banner ads from other sites and apps. It doesn't remove YouTube's in-stream video ads, because Xray only sees the destination domain (or TLS SNI) and can't tell an ad stream from a video stream on the same host. Blocking `googlevideo.com` or `youtube.com` would stop YouTube playback completely. **What does work** is blocking on the client side, because only the client can see the page content: - In a browser: an ad-blocking extension such as uBlock Origin. - On Android or TV: an alternative YouTube client that removes ads. - Or YouTube Premium. These all run on your device and work through the VPN without any change to 3x-ui. Verdict: Not a bug (expected behaviour). This is a usage question, and the answer is outside what a routing proxy can do. *This reply was generated automatically; a maintainer may follow up.* <!-- claude-issue:analyst -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#4443
No description provided.