mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[PR #7095] fix(hosts): let the Host form clear its SNI #6647
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#6647
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/7095
Author: @Plus98ir
Created: 11/7/2026
Status: 🔄 Open
Base:
main← Head:fix/host-clear-sni📝 Commits (1)
b0fa20ffix(hosts): let the Host form clear its SNI📊 Changes
2 files changed (+49 additions, -4 deletions)
View changed files
📝
frontend/src/pages/hosts/HostFormModal.tsx(+2 -4)➕
frontend/src/test/host-form-sni.test.tsx(+47 -0)📄 Description
Problem
In Hosts → Edit Host → Security, removing the SNI tag(s) and saving does nothing: the old SNI comes back on the next edit and stays in share links.
HostFormModalkeeps a hiddensnifield (loaded from the host) next to the editablesnistag list. On save, an empty tag list fell back to that hidden value:so the old SNI was sent again, and the backend (
hostSniPool) correctly rebuilt the pool from it.Fix
The tag list is the only SNI input, so the primary SNI is now
cleanedSnis[0] ?? ''. The dynamic ECH helper'shostSniread the same stale value and now uses the tag list too. A host saved with only the legacysnifield still loads, becausedefaultsForalready seedssnisfrom it.Test
frontend/src/test/host-form-sni.test.tsxopens the modal on a host with an SNI, removes the tag, saves, and asserts the payload hassni: ''. Without the fix it fails with"sni": "dash.example.com".🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.