mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5109] [Feature]: CDN Fronting Config Generator #3590
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#3590
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 @saeedhasani on GitHub (Jun 9, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5109
Is your feature request related to a problem?
Summary
I would like to propose a new feature that simplifies the generation of CDN-fronted client configuration links.
Many deployments operate behind a CDN such as Cloudflare, where users connect to a CDN edge IP while preserving the original Host and SNI values. Currently, administrators must manually create these alternative configuration links by replacing the connection endpoint with CDN edge IP addresses.
This process becomes repetitive and time-consuming when multiple CDN edge IPs are used.
Problem
A standard client configuration link is typically generated using the server's actual endpoint:
To make the configuration work through a CDN frontend, administrators often create additional versions of the same configuration by replacing only the connection endpoint with CDN edge IPs while keeping all routing-related parameters unchanged.
Example:
Currently, these alternative configuration links must be generated manually or through external tools.
Describe the solution you'd like
Proposed Solution
Add a dedicated "CDN Fronting" section to the panel that allows administrators to:
For example:
Input frontend IP list:
Generated result:
Each generated configuration would remain functionally identical to the original configuration, with only the frontend endpoint changed.
Suggested UI Design
Instead of placing this functionality inside the Clients section, it may be more appropriate to provide a separate "CDN Fronting" tab or utility page.
Possible workflow:
This keeps the client management interface clean while providing a dedicated tool for administrators who use CDN-based deployments.
Benefits
Additional Notes
Although Cloudflare is one of the most common use cases, the feature should remain provider-agnostic. Any frontend IP address should be accepted, allowing administrators to use the functionality with Cloudflare, reverse proxies, edge networks, CDN providers, or other frontend infrastructures.
The purpose of this feature is simply to generate alternative client configuration links that expose configurable frontend endpoints while preserving the original domain-based routing configuration.
Alternatives you've considered
No response
Concrete use case
No response
Mockups, screenshots, or examples
No response
Which parts of the panel would this affect?
No response
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Jun 9, 2026):
Thanks for the detailed write-up! The core of what you're describing is already implemented through the External Proxy feature on each inbound.
How to use it today
When editing or creating an inbound, go to the Transport section and look for the External Proxy toggle. Enable it, then add one entry per CDN edge IP:
cloudflare-ip-1)2053)sameto inherit the inbound's TLS settings,tlsto force TLS with custom SNI/fingerprint, ornonetlsand you want a different SNI from the inbound's TLS configWith three entries configured, the panel generates three separate share links — one per entry — each with only the connection endpoint (address + port) swapped. All other parameters (Host header, SNI, path, transport settings, client ID) are preserved exactly as in the original inbound config.
This is implemented in:
sub/subService.go(seebuildExternalProxyURLLinks())frontend/src/lib/xray/inbound-link.ts(seegenAllLinks())frontend/src/pages/inbounds/form/transport/external-proxy.tsxfrontend/src/schemas/protocols/stream/external-proxy.tsWhat is not yet covered
The existing feature requires configuring CDN endpoints per inbound. There is no global utility page or batch tool that lets you apply a list of CDN IPs across all inbounds at once, which is the part of your proposal that goes beyond what's currently available.
If you need that cross-inbound batch workflow, it would be worth keeping this issue open as a targeted enhancement request for that specific gap, rather than the full feature (which already exists). You may also want to look at #4891, which covers a related concern about per-inbound address overrides in subscription output.
@MHSanaei commented on GitHub (Jul 3, 2026):
Since this was filed, the panel gained a dedicated Hosts page (sidebar → Hosts, PR #5409) that covers this workflow: for an inbound, add one Host entry per CDN edge IP with security "same", and the panel generates one config per Host for every client — Host header, SNI, path, transport, and client IDs are preserved; only the endpoint changes. Entries can be reordered, disabled, remarked, and excluded per subscription format, and it's all manageable via
/panel/api/hostsfor automation.Closing as implemented; if a bulk "paste an IP list" input on that page would still help, feel free to open a focused follow-up request.