mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #6844] [Feature]: Disable sponsor banner option #4553
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#4553
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 @ailinykh on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6844
Is your feature request related to a problem?
Some users may perceive the new sponsor banner system not only as a security concern (#6824), but also as an attempt to monetize without their explicit consent.
To avoid excessive repository forks, I propose adding an opt-out setting that lets users who care about this disable sponsor banners.
For monetization purposes, this option could remain undocumented and hidden, available only to users who genuinely need it.
Thank you for the wonderful product and for everything you do!
Describe the solution you'd like
Add
IsSponsorDisabled()setting tointernal/config/config.goread it from
internal/web/service/panel/sponsor.goand return an empty sponsor list@MHSanaei commented on GitHub (Oct 16, 2026):
@claude analyze
@github-actions[bot] commented on GitHub (Oct 16, 2026):
This is a feature request, not a bug. The panel currently has no setting, environment variable or flag that turns sponsor slots off. The maintainer has already declined an opt-out on the same subject: in #6824 they wrote "No opt-out switch or bundling is planned." Whether to reverse that is their decision, so this report only records what the code does today and what the proposed change would need. This is the first analysis on this thread.
What the code does today (default branch,
608ef4e4/ v3.10.2)internal/config/config.gohas env toggles such asIsDebug()(XUI_DEBUG, line 103) andIsSkipHSTS()(XUI_SKIP_HSTS, line 108). Nothing ininternal/config/or the settings service mentions sponsors.PanelService.GetSponsors()(internal/web/service/panel/sponsor.go:84) always goes throughcachedSponsors(). That function fetchessponsorsURLwith an hourly cache: Since35b5e098("fix(sponsor): fetch sponsor data from raw.githubusercontent.com") the data comes from GitHub instead ofsponsors.sanaei.dev./sponsorsand/sponsors/logo/:name(internal/web/controller/index.go:47-48). The/sponsorsroute is public so the login page can show its slot (comment at line 55).SponsorSlot.tsxfilters withisSponsorDismissed(s.id, slot)and stores the choice in localStorage, but only for that sponsor ID in that browser. A new sponsor shows up again.On the proposed change
The proposal would work technically and touches little code. Two points if the maintainer ever takes it:
GetSponsors(), beforecachedSponsors()runs. Only then is the outbound request skipped as well as the banner.GetSponsorLogo()callsGetSponsors()first (sponsor.go:124), so with an empty list it already returnsErrSponsorLogoUnknownand makes no logo fetch./sponsorspage stays in the sidebar (AppSidebar.tsx:238) and the command palette (CommandPalette.tsx:425). With an empty list,SponsorsPage.tsx:75-76shows the "your brand here" card. If "disabled" should also hide that page, those entries need the same flag.Related reports. None of these is a duplicate to close against, since this is a narrower, env-only variant of the same request:
Verdict: Feature request
This reply was generated automatically; a maintainer may follow up.
@ailinykh commented on GitHub (Oct 16, 2026):
I understand an opt-out was previously declined. Would you consider this narrower, undocumented environment-only option?
It preserves the default behavior and requires no UI changes.
If not, I’ll close the PR.
@jamesliu96 commented on GitHub (Oct 18, 2026):
Hopefully, this can be addressed upstream, at least by making it configurable via an environment variable. Otherwise, a community fork may be the only option.