mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6667] [CLOSED] fix: preserve panel TLS during web updates #6401
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#6401
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?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/6667
Author: @libmur-dev
Created: 9/27/2026
Status: ❌ Closed
Base:
main← Head:fix/tls-update-safety📝 Commits (3)
f22f880fix: preserve panel TLS during web updates9b2765afix(tls): preserve legacy ACME renewal targetsfa003aaMerge branch 'main' into fix/tls-update-safety📊 Changes
6 files changed (+1214 additions, -436 deletions)
View changed files
📝
.github/workflows/ci.yml(+15 -0)➕
deploy/test/tls-update-safety.sh(+260 -0)📝
install.sh(+276 -129)📝
internal/web/service/panel/panel.go(+18 -14)📝
update.sh(+322 -141)📝
x-ui.sh(+323 -152)📄 Description
Summary
webCertFileis empty/root/cert/panel/...while preserving existing ACME install targets/root/cert/<name>and isolated panel certificates in the SSL menuacme.sh, and stage/validate certificate-key pairs before promotionupdate.sh,install.sh, andx-ui.shIncident cause
The detached web updater did not mark the update as non-interactive. When
readreceived EOF, the TLS prompt selected its IP-ACME default. That flow reused/root/cert/ipand deleted both certificate files and ACME state on issuance/install failures, so an unrelated service sharing that directory lost its active pair. The update then printed an HTTPS URL even when panel TLS had not been configured.Upgrade compatibility
For identifiers already tracked by acme.sh, the scripts retain the saved
Le_RealFullChainPath/Le_RealKeyPath. If older records lack those fields, an existing tracked legacy pair remains in place. Only new panel certificates use the isolated directory, preventing renewal retargeting for Xray or existing panel installations.Tests
bash -n update.sh install.sh x-ui.sh deploy/test/tls-update-safety.shbash deploy/test/tls-update-safety.sh🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.