mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-09-04 01:17:15 +00:00
fix(sub): omit non-standard fm param from Hysteria2 URI (#6048)
Hysteria2 subscription links included a v2rayN-specific fm=<json> finalmask dump alongside standard obfs/obfs-password. Clients such as mihomo reject the unknown query param and fail to update the provider. Emit only the standard salamander fields in genHysteriaLink, matching the Clash generator. Fixes #5982
This commit is contained in:
@@ -1025,11 +1025,10 @@ func (s *SubService) genHysteriaLink(inbound *model.Inbound, email string) strin
|
||||
}
|
||||
}
|
||||
|
||||
// salamander obfs (Hysteria2). The panel-side link generator already
|
||||
// emits these; keep the subscription output in sync so a client has
|
||||
// the obfs password to match the server.
|
||||
// salamander obfs (Hysteria2). Emit only the standard URI fields;
|
||||
// the non-standard fm=<json> finalmask dump breaks mihomo and other
|
||||
// Hysteria2 clients that reject unknown query params.
|
||||
if finalmask, ok := stream["finalmask"].(map[string]any); ok {
|
||||
applyFinalMaskParams(finalmask, params)
|
||||
if udpMasks, ok := finalmask["udp"].([]any); ok {
|
||||
for _, m := range udpMasks {
|
||||
mask, _ := m.(map[string]any)
|
||||
|
||||
Reference in New Issue
Block a user