mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #6652] [Question]: Is it possible to turn off ads on YouTube? #4443
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#4443
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
@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.comandyoutube.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:
pages.xray.basicRouting).pages.xray.blockdomains), pick Ads All (geosite:category-ads-all) or Ads RU 🇷🇺 (ext:geosite_RU.dat:category-ads-all).These presets are defined in
frontend/src/pages/xray/basics/constants.ts:32-35, and the field is rendered infrontend/src/pages/xray/routing/RoutingBasic.tsx:116-128. Your selection becomes a routing rule that sends matching domains to theblockoutbound. The docs show the same rule here:docs/content/docs/ru/operations/outbounds-routing.mdx:156-166.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.comoryoutube.comwould stop YouTube playback completely.What does work is blocking on the client side, because only the client can see the page content:
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.