mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-04-22 15:35:52 +00:00
salamander obfs and remove auth field
This commit is contained in:
parent
53fb4fe8f9
commit
2a9ba2badc
2 changed files with 10 additions and 15 deletions
|
|
@ -1830,6 +1830,16 @@ class Inbound extends XrayCommonClass {
|
||||||
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.join(','));
|
||||||
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;
|
||||||
|
if (Array.isArray(udpMasks)) {
|
||||||
|
const salamanderMask = udpMasks.find(mask => mask?.type === 'salamander');
|
||||||
|
const obfsPassword = salamanderMask?.settings?.password;
|
||||||
|
if (typeof obfsPassword === 'string' && obfsPassword.length > 0) {
|
||||||
|
params.set("obfs", "salamander");
|
||||||
|
params.set("obfs-password", obfsPassword);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const url = new URL(link);
|
const url = new URL(link);
|
||||||
for (const [key, value] of params) {
|
for (const [key, value] of params) {
|
||||||
url.searchParams.set(key, value);
|
url.searchParams.set(key, value);
|
||||||
|
|
|
||||||
|
|
@ -4,21 +4,6 @@
|
||||||
:label-col="{ md: {span:8} }"
|
:label-col="{ md: {span:8} }"
|
||||||
:wrapper-col="{ md: {span:14} }"
|
:wrapper-col="{ md: {span:14} }"
|
||||||
>
|
>
|
||||||
<a-form-item>
|
|
||||||
<template slot="label">
|
|
||||||
<a-tooltip>
|
|
||||||
<template slot="title">
|
|
||||||
<span>{{ i18n "reset" }}</span>
|
|
||||||
</template>
|
|
||||||
Auth Password
|
|
||||||
<a-icon
|
|
||||||
@click="inbound.stream.hysteria.auth = RandomUtil.randomSeq(10)"
|
|
||||||
type="sync"
|
|
||||||
></a-icon>
|
|
||||||
</a-tooltip>
|
|
||||||
</template>
|
|
||||||
<a-input v-model.trim="inbound.stream.hysteria.auth"></a-input>
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item label="UDP Idle Timeout">
|
<a-form-item label="UDP Idle Timeout">
|
||||||
<a-input-number
|
<a-input-number
|
||||||
v-model.number="inbound.stream.hysteria.udpIdleTimeout"
|
v-model.number="inbound.stream.hysteria.udpIdleTimeout"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue