Describe the bug
In PasarGuard Panel v4.0.2, xHTTP hosts are not generated correctly for Clash Meta / Mihomo subscriptions.
ClashMetaConfiguration inherits ClashConfiguration.add(), and the base add() method skips xhttp inbounds:
if inbound.network in ("kcp", "splithttp", "xhttp"):
return
Because of this, xHTTP hosts are skipped entirely in Clash Meta / Mihomo subscriptions.
There is an _transport_xhttp() method in app/subscription/clash.py, but it is effectively unreachable for clash_meta because of the inherited skip behavior.
Also, even if the skip is removed, the current Mihomo xHTTP serializer maps only a small subset of supported xhttp-opts. It does not map several advanced xHTTP fields required by some CDN/xHTTP setups, for example:
x-padding-obfs-mode
x-padding-key
x-padding-header
x-padding-placement
x-padding-method
uplink-http-method
session-placement
session-key
seq-placement
seq-key
uplink-data-placement
uplink-data-key
uplink-chunk-size
sc-max-each-post-bytes
sc-min-posts-interval-ms
reuse-settings / XMUX
This makes advanced xHTTP/CDN configurations unusable in Mihomo-based clients.
To Reproduce
Steps to reproduce the behavior:
- Create an Xray core config with a VLESS xHTTP inbound.
- Use advanced
xhttpSettings.extra options, for example uplinkHTTPMethod, sessionKey, seqKey, xPaddingObfsMode, or XMUX-related options.
- Create a host that uses this xHTTP inbound.
- Generate or download a Clash Meta / Mihomo subscription.
- Check the generated subscription.
Result:
The xHTTP host is missing from the Clash Meta / Mihomo subscription, or the generated xhttp-opts do not contain the required advanced fields.
Relevant source locations:
app/subscription/clash.py
ClashConfiguration.add() skips xhttp
ClashMetaConfiguration inherits this behavior
_transport_xhttp() maps only a limited subset of xHTTP options
Expected behavior
Clash Meta / Mihomo subscriptions should include xHTTP hosts.
ClashMetaConfiguration.add() should not inherit the classic Clash skip behavior for xhttp.
The generated Mihomo config should include all supported xhttp-opts, including advanced fields such as session/seq settings, uplink HTTP method, x-padding options, and XMUX/reuse settings.
Classic Clash can continue to skip unsupported transports if needed, but Clash Meta / Mihomo should support xHTTP according to Mihomo capabilities.
Screenshots
Not applicable.
Machine details (please complete the following information):
- OS: Ubuntu server / Docker deployment
- Python version: Panel Docker image default
- Nodejs version: Not relevant
- Browser: Not relevant for this issue
Additional context
This appears to be a panel-side subscription generation issue, not a node runtime issue.
VLESS URI and Xray JSON subscription generation already serialize advanced xHTTP options more completely in:
app/subscription/links.py
app/subscription/xray.py
But Clash Meta / Mihomo generation in app/subscription/clash.py skips xHTTP entirely because ClashMetaConfiguration inherits the base ClashConfiguration.add() skip list.
sing_box also skips xHTTP in app/subscription/singbox.py, but that may be expected if sing-box does not support xHTTP transport yet.
Suggested acceptance criteria:
ClashMetaConfiguration.add() should not skip xhttp.
- Keep
xhttp skipped only for classic Clash if classic Clash does not support it.
- Mihomo
_transport_xhttp() should serialize all supported xHTTP options.
- XMUX should be serialized as Mihomo
reuse-settings.
download-settings should be serialized using a Mihomo-specific serializer, not raw internal subscription data.
Describe the bug
In PasarGuard Panel v4.0.2, xHTTP hosts are not generated correctly for Clash Meta / Mihomo subscriptions.
ClashMetaConfigurationinheritsClashConfiguration.add(), and the baseadd()method skipsxhttpinbounds:Because of this, xHTTP hosts are skipped entirely in Clash Meta / Mihomo subscriptions.
There is an
_transport_xhttp()method inapp/subscription/clash.py, but it is effectively unreachable forclash_metabecause of the inherited skip behavior.Also, even if the skip is removed, the current Mihomo xHTTP serializer maps only a small subset of supported
xhttp-opts. It does not map several advanced xHTTP fields required by some CDN/xHTTP setups, for example:x-padding-obfs-modex-padding-keyx-padding-headerx-padding-placementx-padding-methoduplink-http-methodsession-placementsession-keyseq-placementseq-keyuplink-data-placementuplink-data-keyuplink-chunk-sizesc-max-each-post-bytessc-min-posts-interval-msreuse-settings/ XMUXThis makes advanced xHTTP/CDN configurations unusable in Mihomo-based clients.
To Reproduce
Steps to reproduce the behavior:
xhttpSettings.extraoptions, for exampleuplinkHTTPMethod,sessionKey,seqKey,xPaddingObfsMode, or XMUX-related options.Result:
The xHTTP host is missing from the Clash Meta / Mihomo subscription, or the generated
xhttp-optsdo not contain the required advanced fields.Relevant source locations:
app/subscription/clash.pyClashConfiguration.add()skipsxhttpClashMetaConfigurationinherits this behavior_transport_xhttp()maps only a limited subset of xHTTP optionsExpected behavior
Clash Meta / Mihomo subscriptions should include xHTTP hosts.
ClashMetaConfiguration.add()should not inherit the classic Clash skip behavior forxhttp.The generated Mihomo config should include all supported
xhttp-opts, including advanced fields such as session/seq settings, uplink HTTP method, x-padding options, and XMUX/reuse settings.Classic Clash can continue to skip unsupported transports if needed, but Clash Meta / Mihomo should support xHTTP according to Mihomo capabilities.
Screenshots
Not applicable.
Machine details (please complete the following information):
Additional context
This appears to be a panel-side subscription generation issue, not a node runtime issue.
VLESS URI and Xray JSON subscription generation already serialize advanced xHTTP options more completely in:
app/subscription/links.pyapp/subscription/xray.pyBut Clash Meta / Mihomo generation in
app/subscription/clash.pyskips xHTTP entirely becauseClashMetaConfigurationinherits the baseClashConfiguration.add()skip list.sing_boxalso skips xHTTP inapp/subscription/singbox.py, but that may be expected if sing-box does not support xHTTP transport yet.Suggested acceptance criteria:
ClashMetaConfiguration.add()should not skipxhttp.xhttpskipped only for classic Clash if classic Clash does not support it._transport_xhttp()should serialize all supported xHTTP options.reuse-settings.download-settingsshould be serialized using a Mihomo-specific serializer, not raw internal subscription data.