mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-11 03:36:37 +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:
@@ -86,10 +86,11 @@ type federationRuntimeReleaseRoleRequest struct {
|
||||
}
|
||||
|
||||
type federationRuntimeDiagnoseRequest struct {
|
||||
IP string `json:"ip"`
|
||||
Port int `json:"port"`
|
||||
Count int `json:"count"`
|
||||
Timeout int `json:"timeout"`
|
||||
IP string `json:"ip"`
|
||||
Port int `json:"port"`
|
||||
Count int `json:"count"`
|
||||
Timeout int `json:"timeout"`
|
||||
Protocol string `json:"protocol"`
|
||||
}
|
||||
|
||||
type federationRuntimeCommandRequest struct {
|
||||
@@ -1281,7 +1282,12 @@ func (h *Handler) federationRuntimeDiagnose(w http.ResponseWriter, r *http.Reque
|
||||
commandTimeout = diagnosisCommandTimeout
|
||||
}
|
||||
|
||||
res, err := h.sendNodeCommandWithTimeout(share.NodeID, "TcpPing", map[string]interface{}{
|
||||
commandType := "TcpPing"
|
||||
if isUDPBasedProtocol(req.Protocol) {
|
||||
commandType = "UdpPing"
|
||||
}
|
||||
|
||||
res, err := h.sendNodeCommandWithTimeout(share.NodeID, commandType, map[string]interface{}{
|
||||
"ip": req.IP,
|
||||
"port": req.Port,
|
||||
"count": req.Count,
|
||||
|
||||
Reference in New Issue
Block a user