mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #5020] [CLOSED] fix(subscription): include XHTTP padding options in Clash output #5759
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#5759
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/5020
Author: @w3struk
Created: 6/6/2026
Status: ❌ Closed
Base:
main← Head:fix/mihomo-xhttp-padding📝 Commits (1)
ff4af10fix(sub): include XHTTP padding in Clash output📊 Changes
2 files changed (+63 additions, -4 deletions)
View changed files
📝
sub/subClashService.go(+15 -0)📝
sub/subClashService_test.go(+48 -4)📄 Description
What changed
Map the six Xray XHTTP padding fields from
xhttpSettingsinto Mihomo'sxhttp-optskeys when generating Clash subscriptions:xPaddingObfsMode->x-padding-obfs-modexPaddingBytes->x-padding-bytesxPaddingKey->x-padding-keyxPaddingHeader->x-padding-headerxPaddingPlacement->x-padding-placementxPaddingMethod->x-padding-methodEmpty string values are omitted, while an explicitly present boolean value is preserved. Existing path, host, and mode behavior is unchanged.
Why
The regular VLESS subscription retains these fields in
extra, but the Clash/Mihomo YAML generator previously emitted only path, host, and mode. Mihomo clients therefore imported an incomplete XHTTP configuration.The key names and value types match Mihomo v1.19.27's
XHTTPOptionsand VLESS-extra conversion.Validation
go test ./subgo test ./...🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.