mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-28 07:36:38 +08:00
fix: increase kcp tunnel bandwidth limit and fix modal backgrounds
This commit is contained in:
@@ -3661,9 +3661,12 @@ func buildTunnelDialerConfig(protocol string) map[string]interface{} {
|
|||||||
"kcp.keepalive": 10,
|
"kcp.keepalive": 10,
|
||||||
"kcp.tcp": false,
|
"kcp.tcp": false,
|
||||||
"kcp.mode": "fast2",
|
"kcp.mode": "fast2",
|
||||||
"kcp.sndwnd": 2048,
|
"kcp.sndwnd": 8192,
|
||||||
"kcp.rcvwnd": 2048,
|
"kcp.rcvwnd": 8192,
|
||||||
"kcp.mtu": 1400,
|
"kcp.mtu": 1400,
|
||||||
|
"kcp.sockbuf": 16777216,
|
||||||
|
"kcp.smuxbuf": 16777216,
|
||||||
|
"kcp.streambuf": 8388608,
|
||||||
"kcp.datashard": 10,
|
"kcp.datashard": 10,
|
||||||
"kcp.parityshard": 3,
|
"kcp.parityshard": 3,
|
||||||
"kcp.nocomp": true,
|
"kcp.nocomp": true,
|
||||||
@@ -3682,9 +3685,12 @@ func buildTunnelListenerConfig(protocol string) map[string]interface{} {
|
|||||||
"kcp.keepalive": 10,
|
"kcp.keepalive": 10,
|
||||||
"kcp.tcp": false,
|
"kcp.tcp": false,
|
||||||
"kcp.mode": "fast2",
|
"kcp.mode": "fast2",
|
||||||
"kcp.sndwnd": 2048,
|
"kcp.sndwnd": 8192,
|
||||||
"kcp.rcvwnd": 2048,
|
"kcp.rcvwnd": 8192,
|
||||||
"kcp.mtu": 1400,
|
"kcp.mtu": 1400,
|
||||||
|
"kcp.sockbuf": 16777216,
|
||||||
|
"kcp.smuxbuf": 16777216,
|
||||||
|
"kcp.streambuf": 8388608,
|
||||||
"kcp.datashard": 10,
|
"kcp.datashard": 10,
|
||||||
"kcp.parityshard": 3,
|
"kcp.parityshard": 3,
|
||||||
"kcp.nocomp": true,
|
"kcp.nocomp": true,
|
||||||
|
|||||||
@@ -73,6 +73,9 @@ func (d *kcpDialer) parseMetadata(md mdata.Metadata) (err error) {
|
|||||||
if md.IsExists("kcp.sndwnd") {
|
if md.IsExists("kcp.sndwnd") {
|
||||||
d.md.config.SndWnd = mdutil.GetInt(md, "kcp.sndwnd")
|
d.md.config.SndWnd = mdutil.GetInt(md, "kcp.sndwnd")
|
||||||
}
|
}
|
||||||
|
if md.IsExists("kcp.sockbuf") {
|
||||||
|
d.md.config.SockBuf = mdutil.GetInt(md, "kcp.sockbuf")
|
||||||
|
}
|
||||||
if md.IsExists("kcp.smuxver") {
|
if md.IsExists("kcp.smuxver") {
|
||||||
d.md.config.SmuxVer = mdutil.GetInt(md, "kcp.smuxver")
|
d.md.config.SmuxVer = mdutil.GetInt(md, "kcp.smuxver")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,6 +76,9 @@ func (l *kcpListener) parseMetadata(md mdata.Metadata) (err error) {
|
|||||||
if md.IsExists("kcp.sndwnd") {
|
if md.IsExists("kcp.sndwnd") {
|
||||||
l.md.config.SndWnd = mdutil.GetInt(md, "kcp.sndwnd")
|
l.md.config.SndWnd = mdutil.GetInt(md, "kcp.sndwnd")
|
||||||
}
|
}
|
||||||
|
if md.IsExists("kcp.sockbuf") {
|
||||||
|
l.md.config.SockBuf = mdutil.GetInt(md, "kcp.sockbuf")
|
||||||
|
}
|
||||||
if md.IsExists("kcp.smuxver") {
|
if md.IsExists("kcp.smuxver") {
|
||||||
l.md.config.SmuxVer = mdutil.GetInt(md, "kcp.smuxver")
|
l.md.config.SmuxVer = mdutil.GetInt(md, "kcp.smuxver")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5401,7 +5401,7 @@ export default function ForwardPage() {
|
|||||||
<ModalContent>
|
<ModalContent>
|
||||||
{(onClose) => (
|
{(onClose) => (
|
||||||
<>
|
<>
|
||||||
<ModalHeader className="flex flex-col gap-1 bg-content1 border-b border-divider">
|
<ModalHeader className="flex flex-col gap-1 border-b border-divider">
|
||||||
<h2 className="text-xl font-bold">规则诊断结果</h2>
|
<h2 className="text-xl font-bold">规则诊断结果</h2>
|
||||||
{currentDiagnosisForward && (
|
{currentDiagnosisForward && (
|
||||||
<div className="flex items-center gap-2 min-w-0">
|
<div className="flex items-center gap-2 min-w-0">
|
||||||
@@ -5943,7 +5943,7 @@ export default function ForwardPage() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter className="bg-transparent border-t border-divider">
|
<ModalFooter className="border-t border-divider">
|
||||||
<Button variant="light" onPress={onClose}>
|
<Button variant="light" onPress={onClose}>
|
||||||
关闭
|
关闭
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -2184,27 +2184,25 @@ export default function TunnelPage() {
|
|||||||
<h3 className="text-lg font-semibold">入口配置</h3>
|
<h3 className="text-lg font-semibold">入口配置</h3>
|
||||||
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Select
|
<Select
|
||||||
disabledKeys={[
|
disabledKeys={[
|
||||||
...nodes
|
...nodes
|
||||||
.filter(
|
.filter(
|
||||||
(node) =>
|
(node) =>
|
||||||
node.status !== 1 &&
|
node.status !== 1 &&
|
||||||
!(
|
!(
|
||||||
isEdit &&
|
isEdit &&
|
||||||
form.inNodeId.some(
|
form.inNodeId.some(
|
||||||
(ct) => ct.nodeId === node.id,
|
(ct) => ct.nodeId === node.id,
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.map((node) => node.id.toString()),
|
.map((node) => node.id.toString()),
|
||||||
...(form.outNodeId || []).map((ct) =>
|
...(form.outNodeId || []).map((ct) =>
|
||||||
ct.nodeId.toString(),
|
ct.nodeId.toString(),
|
||||||
),
|
),
|
||||||
...getSelectedChainNodeIds().map((id) =>
|
...getSelectedChainNodeIds().map((id) => id.toString()),
|
||||||
id.toString(),
|
]}
|
||||||
),
|
|
||||||
]}
|
|
||||||
errorMessage={errors.inNodeId}
|
errorMessage={errors.inNodeId}
|
||||||
isInvalid={!!errors.inNodeId}
|
isInvalid={!!errors.inNodeId}
|
||||||
label="入口节点"
|
label="入口节点"
|
||||||
@@ -3766,7 +3764,7 @@ export default function TunnelPage() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter className="bg-transparent border-t border-divider">
|
<ModalFooter className="border-t border-divider">
|
||||||
<Button variant="light" onPress={onClose}>
|
<Button variant="light" onPress={onClose}>
|
||||||
关闭
|
关闭
|
||||||
</Button>
|
</Button>
|
||||||
@@ -3993,3 +3991,5 @@ export default function TunnelPage() {
|
|||||||
</AnimatedPage>
|
</AnimatedPage>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user