mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #6747] [Question]: Multiple domains for the subscription link, each with its own certificate #4495
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#4495
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 @Matin4359 on GitHub (Oct 5, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6747
What are you trying to do?
Hi, as title says, possible or very hard?
What have you already tried?
No response
3x-ui version
3.90
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 (Oct 5, 2026):
The built-in subscription server cannot do this by itself: it accepts one certificate/key pair and one domain. You can still get it working in either of these ways:
sub1.example.com,sub2.example.org, …) works with the built-in server as it is.Why the built-in server takes only one certificate
internal/sub/sub.go:426-433loads one pair from thesubCertFile/subKeyFilesettings:subDomainholds a single host. When it is set,DomainValidatorMiddleware(internal/web/middleware/domainValidator.go:24) returns403for any other Host:if host != domain {. When it is empty, no check runs and every domain pointed at the server is accepted (internal/sub/sub.go:63).Reverse-proxy setup
subDomainempty, clearsubCertFile/subKeyFile, and setsubListento127.0.0.1so the server only answers the proxy over plain HTTP.server { ... }block per domain, each with its ownssl_certificate/ssl_certificate_keyandproxy_pass http://127.0.0.1:<subPort>;. In Caddy, add one site block per domain and certificates are handled automatically.https://<any-of-your-domains>/<subPath>/<subId>, because the path and sub ID are the same on every domain.The panel shows a single link for each client. If
subURIis empty, that link is built from the address you opened the panel with (BuildSubURIBase,internal/web/service/setting.go:1903). If you setsubURI, it always shows that one base. To hand out a link on another domain, replace the domain part of the link.Docs: Reverse proxy and Subscription settings.
If you need native support for several certificates in the built-in subscription server, that would be a feature request. Please open it with the bug/feature form.
I changed the title from "[Question]: [Question]: using multi domain name for subscription link with with independent certs." to remove the repeated prefix.
Verdict: Not a bug (expected behaviour)
This reply was generated automatically; a maintainer may follow up.
@Matin4359 commented on GitHub (Oct 5, 2026):
Does the developer intend to provide this functionality in the form of a graphical interface along with a suitable web server?