mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6925] [CLOSED] fix(sub): keep host remark intact during CIDR expansion #6527
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#6527
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/6925
Author: @Pejman-Yousefi-Official
Created: 10/24/2026
Status: ❌ Closed
Base:
main← Head:fix/sub-preserve-cidr-remark📝 Commits (1)
bb438e1fix(sub): keep host remark intact during CIDR expansion📊 Changes
4 files changed (+20 additions, -24 deletions)
View changed files
📝
frontend/src/lib/hosts/host-link.ts(+2 -7)📝
frontend/src/test/tunnel-host-endpoints.test.ts(+2 -2)📝
internal/sub/host_sub.go(+1 -8)📝
internal/sub/host_sub_test.go(+15 -7)📄 Description
Summary
In #6784, CIDR address support was introduced for Host records, allowing a prefix to expand into up to
randomCountunique random host IPs. WhenrandomCount > 1, the endpoint builder appended an incremental index suffix (- 1,- 2, etc.) to the host's remark.This PR removes the automatic remark suffixing so that the user's configured remark is preserved as-is across all generated endpoints, both in subscription formats and tunnel preview configs.
Changes
internal/sub/host_sub.go): InhostEndpointMaps, removed the index suffix mutation onhCopy.Remarkwhenlen(ips) > 1. Removed now-unusedfmtimport.frontend/src/lib/hosts/host-link.ts): InhostEndpointsFor, preservedrecord.remarkdirectly when expanding CIDR hosts for tunnel configs and client links.TestSub_HostCIDR_RawLinksandTestSub_HostCIDR_ClashAndJsonininternal/sub/host_sub_test.goto assert that remarks remain unsuffixed.frontend/src/test/tunnel-host-endpoints.test.tsto verify the expected remark value.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.