mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #5258] [Bug]: SSL issuance fails on IPv6-only servers without public IPv4 (HTTP-01 standalone assumes port 80 is publicly reachable) #3683
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#3683
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 @justin-zc on GitHub (Jun 13, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5258
Describe the bug
Version
Latest 3x-ui version(v3.3.1)
Environment
Description
I am using a VPS provider that only provides:
Example:
Public IPv6:
Example:2a01:4f9:6b:47e9::2451
IPv4 mapped ports:
22116
32116
42116
The domain points to the server's IPv6 address via an AAAA record.
Problem
When using:
Menu -> Panel Settings -> SSL Certificate -> Get SSL (Domain)
3x-ui invokes acme.sh in standalone HTTP-01 mode and always expects port 80 to be reachable from the Internet.
The certificate request fails with:
Screenshots
No response
3x-ui version
3.3.1
Xray-core version
No response
How did you install 3x-ui?
install.sh script
Operating system
Alpine Linux 3.23
Which parts of the panel are affected?
No response
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Jun 13, 2026):
The failure here is caused by a fundamental constraint of HTTP-01 validation, not a bug in the listener configuration. Let's Encrypt's validation servers must be able to open a TCP connection to port 80 on the server's public IP. Your provider exposes only specific NAT-mapped ports (22116, 32116, 42116) and not port 80, so the challenge will always be refused regardless of which IP-stack acme.sh listens on.
What the code actually does
x-ui.shoption 19 → "Get SSL (Domain)" callsssl_cert_issue()(x-ui.sh line 1653), which runs:The helper
acme_listen_flag()(x-ui.sh lines 57–63, added to fix #4994) checks for a globally-scoped IPv4 address:0.0.0.0:80)--listen-v6(acme.sh binds:::80)On your IPv6-only VPS,
ip -4 addr show scope globalreturns nothing, so the listener correctly binds to:::80. The error is not about which stack the listener uses—it is about Let's Encrypt being unable to reach that port at all because port 80 is not forwarded through your provider's NAT.This is distinct from #4994 (IPv6-only listener on a dual-stack host where the A record requires IPv4 validation) and #3960 (missing
--listen-v6flag for the IP-certificate flow). Both of those were addressed in commitdbee150band are already in v3.3.1.Working workaround available today
If your domain's DNS is managed by Cloudflare: use the built-in DNS-01 option, which does not require port 80 at all.
This calls
ssl_cert_issue_CF()(x-ui.sh line 1867), which uses--dns dns_cfand validates entirely through the Cloudflare API.If your DNS is not on Cloudflare: run acme.sh directly with your DNS provider's plugin. acme.sh ships plugins for most major providers (Namecheap, DigitalOcean, Gandi, Vultr, etc.). Example:
Consult the acme.sh DNS API wiki for your provider's plugin name and required environment variables.
On the enhancement requests
The following items in the original report are not yet implemented in the codebase:
ssl_cert_issuemenu for providers other than CloudflareThese are valid improvements; a PR addressing any of them would be welcome.
This reply was generated automatically; a maintainer may follow up.
@justin-zc commented on GitHub (Jun 13, 2026):
Thanks😄