small fixes
Some checks are pending
Release X-UI / build (386) (push) Waiting to run
Release X-UI / build (amd64) (push) Waiting to run
Release X-UI / build (arm64) (push) Waiting to run
Release X-UI / build (armv5) (push) Waiting to run
Release X-UI / build (armv6) (push) Waiting to run
Release X-UI / build (armv7) (push) Waiting to run
Release X-UI / build (s390x) (push) Waiting to run
Release X-UI / Build for Windows (push) Waiting to run

This commit is contained in:
Alireza Ahmadi 2026-06-30 22:38:37 +02:00
parent 669aa8bf03
commit d8b7dd9f83
10 changed files with 43 additions and 61 deletions

View file

@ -342,11 +342,7 @@ func (s *SubJsonService) genOutbound(inbound *model.Inbound, streamSettings map[
hyStream := streamSettings["hysteriaSettings"].(map[string]any)
outHyStream := map[string]any{
"version": inboundSettings["version"],
}
if client.Auth != "" {
outHyStream["auth"] = client.Auth
} else {
outHyStream["auth"] = hyStream["auth"]
"auth": client.Auth,
}
if udpIdleTimeout, ok := hyStream["udpIdleTimeout"].(float64); ok {
outHyStream["udpIdleTimeout"] = int(udpIdleTimeout)

View file

@ -323,18 +323,16 @@ class KcpStreamSettings extends XrayCommonClass {
tti = 20,
uplinkCapacity = 5,
downlinkCapacity = 20,
congestion = false,
readBufferSize = 1,
writeBufferSize = 1,
cwndMultiplier = 1,
maxSendingWindow = 2 * 1024 * 1024,
) {
super();
this.mtu = mtu;
this.tti = tti;
this.upCap = uplinkCapacity;
this.downCap = downlinkCapacity;
this.congestion = congestion;
this.readBuffer = readBufferSize;
this.writeBuffer = writeBufferSize;
this.cwndMultiplier = cwndMultiplier;
this.maxSendingWindow = maxSendingWindow;
}
static fromJson(json = {}) {
@ -343,9 +341,8 @@ class KcpStreamSettings extends XrayCommonClass {
json.tti,
json.uplinkCapacity,
json.downlinkCapacity,
json.congestion,
json.readBufferSize,
json.writeBufferSize,
json.cwndMultiplier,
json.maxSendingWindow,
);
}
@ -355,9 +352,8 @@ class KcpStreamSettings extends XrayCommonClass {
tti: this.tti,
uplinkCapacity: this.upCap,
downlinkCapacity: this.downCap,
congestion: this.congestion,
readBufferSize: this.readBuffer,
writeBufferSize: this.writeBuffer,
cwndMultiplier: this.cwndMultiplier,
maxSendingWindow: this.maxSendingWindow,
};
}
}
@ -1071,9 +1067,9 @@ class RealityStreamSettings extends XrayCommonClass {
json.dest,
json.serverNames,
json.privateKey,
json.minClient,
json.maxClient,
json.maxTimediff,
json.minClientVer ?? json.minClient,
json.maxClientVer ?? json.maxClient,
json.maxTimeDiff ?? json.maxTimediff,
json.shortIds,
json.mldsa65Seed,
settings,
@ -1089,9 +1085,9 @@ class RealityStreamSettings extends XrayCommonClass {
dest: this.dest,
serverNames: this.serverNames.split(","),
privateKey: this.privateKey,
minClient: this.minClient,
maxClient: this.maxClient,
maxTimediff: this.maxTimediff,
minClientVer: this.minClient,
maxClientVer: this.maxClient,
maxTimeDiff: this.maxTimediff,
shortIds: this.shortIds.split(","),
mldsa65Seed: this.mldsa65Seed,
settings: this.settings,

View file

@ -219,18 +219,16 @@ class KcpStreamSettings extends CommonClass {
tti = 20,
uplinkCapacity = 5,
downlinkCapacity = 20,
congestion = false,
readBufferSize = 1,
writeBufferSize = 1,
cwndMultiplier = 1,
maxSendingWindow = 2 * 1024 * 1024,
) {
super();
this.mtu = mtu;
this.tti = tti;
this.upCap = uplinkCapacity;
this.downCap = downlinkCapacity;
this.congestion = congestion;
this.readBuffer = readBufferSize;
this.writeBuffer = writeBufferSize;
this.cwndMultiplier = cwndMultiplier;
this.maxSendingWindow = maxSendingWindow;
}
static fromJson(json = {}) {
@ -239,9 +237,8 @@ class KcpStreamSettings extends CommonClass {
json.tti,
json.uplinkCapacity,
json.downlinkCapacity,
json.congestion,
json.readBufferSize,
json.writeBufferSize,
json.cwndMultiplier,
json.maxSendingWindow,
);
}
@ -251,9 +248,8 @@ class KcpStreamSettings extends CommonClass {
tti: this.tti,
uplinkCapacity: this.upCap,
downlinkCapacity: this.downCap,
congestion: this.congestion,
readBufferSize: this.readBuffer,
writeBufferSize: this.writeBuffer,
cwndMultiplier: this.cwndMultiplier,
maxSendingWindow: this.maxSendingWindow,
};
}
}

View file

@ -395,14 +395,11 @@
<a-form-item label='{{ i18n "pages.inbounds.stream.kcp.downlinkMBps" }}'>
<a-input-number v-model.number="outbound.stream.kcp.downCap"></a-input-number>
</a-form-item>
<a-form-item label='{{ i18n "pages.inbounds.stream.kcp.congestion" }}'>
<a-switch v-model="outbound.stream.kcp.congestion"></a-switch>
<a-form-item label='{{ i18n "pages.inbounds.stream.kcp.cwndMultiplier" }}'>
<a-input-number v-model.number="outbound.stream.kcp.cwndMultiplier" :min="1"></a-input-number>
</a-form-item>
<a-form-item label='{{ i18n "pages.inbounds.stream.kcp.readBuffer" }}'>
<a-input-number v-model.number="outbound.stream.kcp.readBuffer"></a-input-number>
</a-form-item>
<a-form-item label='{{ i18n "pages.inbounds.stream.kcp.writeBuffer" }}'>
<a-input-number v-model.number="outbound.stream.kcp.writeBuffer"></a-input-number>
<a-form-item label='{{ i18n "pages.inbounds.stream.kcp.maxSendingWindow" }}'>
<a-input-number v-model.number="outbound.stream.kcp.maxSendingWindow" :min="1460"></a-input-number>
</a-form-item>
</template>

View file

@ -17,16 +17,13 @@
<a-input-number v-model.number="inbound.stream.kcp.downCap"
:min="0"></a-input-number>
</a-form-item>
<a-form-item label='{{ i18n "pages.inbounds.stream.kcp.congestion" }}'>
<a-switch v-model="inbound.stream.kcp.congestion"></a-switch>
<a-form-item label='{{ i18n "pages.inbounds.stream.kcp.cwndMultiplier" }}'>
<a-input-number v-model.number="inbound.stream.kcp.cwndMultiplier"
:min="1"></a-input-number>
</a-form-item>
<a-form-item label='{{ i18n "pages.inbounds.stream.kcp.readBuffer" }}'>
<a-input-number v-model.number="inbound.stream.kcp.readBuffer"
:min="0"></a-input-number>
</a-form-item>
<a-form-item label='{{ i18n "pages.inbounds.stream.kcp.writeBuffer" }}'>
<a-input-number v-model.number="inbound.stream.kcp.writeBuffer"
:min="0"></a-input-number>
<a-form-item label='{{ i18n "pages.inbounds.stream.kcp.maxSendingWindow" }}'>
<a-input-number v-model.number="inbound.stream.kcp.maxSendingWindow"
:min="1460"></a-input-number>
</a-form-item>
</a-form>
{{end}}

View file

@ -401,9 +401,9 @@
"tti" = "TTI (ms)"
"uplinkMBps" = "Uplink (MB/s)"
"downlinkMBps" = "Downlink (MB/s)"
"cwndMultiplier" = "Congestion Window Multiplier"
"maxSendingWindow" = "Max Sending Window (bytes)"
"congestion" = "Congestion"
"readBuffer" = "Read Buffer (MB)"
"writeBuffer" = "Write Buffer (MB)"
[pages.inbounds.stream.common]
"proxyProtocol" = "PROXY Protocol"

View file

@ -401,9 +401,9 @@
"tti" = "TTI (میلی‌ثانیه)"
"uplinkMBps" = "آپلینک (MB/s)"
"downlinkMBps" = "دانلینک (MB/s)"
"cwndMultiplier" = "ضریب پنجره ازدحام"
"maxSendingWindow" = "حداکثر پنجره ارسال (بایت)"
"congestion" = "Congestion"
"readBuffer" = "بافر خواندن (MB)"
"writeBuffer" = "بافر نوشتن (MB)"
[pages.inbounds.stream.common]
"proxyProtocol" = "PROXY Protocol"

View file

@ -401,9 +401,9 @@
"tti" = "TTI (мс)"
"uplinkMBps" = "Uplink (МБ/с)"
"downlinkMBps" = "Downlink (МБ/с)"
"cwndMultiplier" = "Множитель окна перегрузки"
"maxSendingWindow" = "Макс. окно отправки (байт)"
"congestion" = "Congestion"
"readBuffer" = "Буфер чтения (МБ)"
"writeBuffer" = "Буфер записи (МБ)"
[pages.inbounds.stream.common]
"proxyProtocol" = "PROXY Protocol"

View file

@ -401,9 +401,9 @@
"tti" = "TTI (ms)"
"uplinkMBps" = "Uplink (MB/s)"
"downlinkMBps" = "Downlink (MB/s)"
"cwndMultiplier" = "Hệ số cửa sổ tắc nghẽn"
"maxSendingWindow" = "Cửa sổ gửi tối đa (byte)"
"congestion" = "Congestion"
"readBuffer" = "Read Buffer (MB)"
"writeBuffer" = "Write Buffer (MB)"
[pages.inbounds.stream.common]
"proxyProtocol" = "PROXY Protocol"

View file

@ -402,9 +402,9 @@
"tti" = "TTI (毫秒)"
"uplinkMBps" = "上行 (MB/s)"
"downlinkMBps" = "下行 (MB/s)"
"cwndMultiplier" = "拥塞窗口倍数"
"maxSendingWindow" = "最大发送窗口 (字节)"
"congestion" = "拥塞控制"
"readBuffer" = "读取缓冲 (MB)"
"writeBuffer" = "写入缓冲 (MB)"
[pages.inbounds.stream.common]
"proxyProtocol" = "PROXY Protocol"