mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-10 19:36:36 +08:00
fix(kcp): enable congestion control, add FEC, and fix remote node UDP diagnosis
- KCP: switch from fast3 to fast2 mode, enable FEC (10/3), enable congestion control (nc=0) for automatic rate adaptation - go-gost/x: support kcp.nc metadata to override mode-initialized NoCongestion value in dialer and listener Init() - Diagnosis: add udpPingViaRemoteNode, fix pingViaRemoteNode to dispatch based on protocol, add Protocol field to federation diagnose request structs
This commit is contained in:
@@ -3635,13 +3635,14 @@ func buildTunnelDialerConfig(protocol string) map[string]interface{} {
|
||||
dialer["metadata"] = map[string]interface{}{
|
||||
"kcp.keepalive": 10,
|
||||
"kcp.tcp": false,
|
||||
"kcp.mode": "fast3",
|
||||
"kcp.mode": "fast2",
|
||||
"kcp.sndwnd": 2048,
|
||||
"kcp.rcvwnd": 2048,
|
||||
"kcp.mtu": 1400,
|
||||
"kcp.datashard": 0,
|
||||
"kcp.parityshard": 0,
|
||||
"kcp.datashard": 10,
|
||||
"kcp.parityshard": 3,
|
||||
"kcp.nocomp": true,
|
||||
"kcp.nc": 0,
|
||||
}
|
||||
}
|
||||
return dialer
|
||||
@@ -3655,13 +3656,14 @@ func buildTunnelListenerConfig(protocol string) map[string]interface{} {
|
||||
listener["metadata"] = map[string]interface{}{
|
||||
"kcp.keepalive": 10,
|
||||
"kcp.tcp": false,
|
||||
"kcp.mode": "fast3",
|
||||
"kcp.mode": "fast2",
|
||||
"kcp.sndwnd": 2048,
|
||||
"kcp.rcvwnd": 2048,
|
||||
"kcp.mtu": 1400,
|
||||
"kcp.datashard": 0,
|
||||
"kcp.parityshard": 0,
|
||||
"kcp.datashard": 10,
|
||||
"kcp.parityshard": 3,
|
||||
"kcp.nocomp": true,
|
||||
"kcp.nc": 0,
|
||||
}
|
||||
}
|
||||
return listener
|
||||
|
||||
Reference in New Issue
Block a user