mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-04-26 09:26:07 +00:00
Fix: hysteria link gen crashes when echConfigList is a string (#4064)
`genHysteriaLink` was calling `.join(',')` on
`this.stream.tls.settings.echConfigList`, but that field is bound to an
`<a-input>` (single-line string) in `tls_settings.html` and defaults to
`''` in `TlsStreamSettings.Settings`. Calling `.join()` on a string
throws `TypeError: echConfigList.join is not a function`, which breaks
the Info / QR buttons for every hysteria / hysteria2 inbound.
All three sibling link generators (`genVmessLink`, `genVlessLink`,
`genTrojanLink`) already pass the value directly:
params.set("ech", this.stream.tls.settings.echConfigList)
`URLSearchParams.set` will stringify arrays with `,` on its own, so the
same one-liner works for both string and array inputs. Align
`genHysteriaLink` with the other three.
Fixes #4063
Co-authored-by: pwnnex <eternxles@gmail.com>
This commit is contained in:
parent
ab7a7f7c6b
commit
975d6d1bad
1 changed files with 1 additions and 1 deletions
|
|
@ -1827,7 +1827,7 @@ class Inbound extends XrayCommonClass {
|
||||||
if (this.stream.tls.settings.fingerprint?.length > 0) params.set("fp", this.stream.tls.settings.fingerprint);
|
if (this.stream.tls.settings.fingerprint?.length > 0) params.set("fp", this.stream.tls.settings.fingerprint);
|
||||||
if (this.stream.tls.alpn?.length > 0) params.set("alpn", this.stream.tls.alpn);
|
if (this.stream.tls.alpn?.length > 0) params.set("alpn", this.stream.tls.alpn);
|
||||||
if (this.stream.tls.settings.allowInsecure) params.set("insecure", "1");
|
if (this.stream.tls.settings.allowInsecure) params.set("insecure", "1");
|
||||||
if (this.stream.tls.settings.echConfigList?.length > 0) params.set("ech", this.stream.tls.settings.echConfigList.join(','));
|
if (this.stream.tls.settings.echConfigList?.length > 0) params.set("ech", this.stream.tls.settings.echConfigList);
|
||||||
if (this.stream.tls.sni?.length > 0) params.set("sni", this.stream.tls.sni);
|
if (this.stream.tls.sni?.length > 0) params.set("sni", this.stream.tls.sni);
|
||||||
|
|
||||||
const udpMasks = this.stream?.finalmask?.udp;
|
const udpMasks = this.stream?.finalmask?.udp;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue