Skip to content

[Bug]: Hysteria2 subscription link includes non-standard "fm" (finalmask) param that breaks parsing in mihomo/sing-box/subconverter #5982

Description

@KillReal1234

Describe the bug

The Hysteria2 line in the plain/universal subscription (base64 list of URIs) includes a non-standard fm query parameter that raw-dumps the internal finalmask.udp[] JSON config, in addition to the already-present standard obfs/obfs-password fields:

hysteria2://@host:443?alpn=h3&fm=%7B%22udp%22%3A%5B%7B%22settings%22%3A%7B%22password%22%3A%22...%22%7D%2C%22type%22%3A%22salamander%22%7D%5D%7D&fp=firefox&obfs=salamander&obfs-password=...&security=tls&sni=host

fm is not part of the Hysteria2 URI scheme (https://v2.hysteria.network/docs/developers/URI-Scheme/) and is not understood by mihomo, sing-box, the official hysteria2 client, or subconverter. Since obfs/obfs-password already fully describe the salamander obfuscation, fm is redundant.

How to reproduce the problem

This did not happen before upgrading from 3x-ui < 3.5.0 (Xray-core 26.6.27) to 3.5.0. It appears to be tied to the addition of FinalMask support (commit c59f54b, "outbound: finalmask"). After the upgrade, the generated subscription link stopped working with mihomo (fails the whole proxy-provider update).

Expected behavior

Do not serialize the raw finalmask object into the public subscription URI — obfs/obfs-password (and security=tls, sni, alpn) are already sufficient for standard clients.

Actual behavior

No response

Relevant logs

Screenshots

No response

3x-ui version

3.5.0

Xray-core version

26.7.11

How did you install 3x-ui?

install.sh script

Operating system

Ubuntu 24.04

Which parts of the panel are affected?

Subscription (share links / Clash / JSON)

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

Yes — Nginx

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions