feat:多跳(B->D->C->A)功能

This commit is contained in:
nnbcccscdscdsc
2026-03-27 23:03:00 +08:00
parent 5be3ff670f
commit 8e2bd0ffc6
8 changed files with 455 additions and 51 deletions

View File

@@ -21,6 +21,15 @@ func parseKCPConversationID(packet []byte) *uint32 {
return &conv
}
// ParseKCPConversationID 从原始 KCP UDP datagram 中提取 conv ID。
func ParseKCPConversationID(packet []byte) (uint32, bool) {
conv := parseKCPConversationID(packet)
if conv == nil {
return 0, false
}
return *conv, true
}
func parseKCPPacketSegments(packet []byte) ([]KCPPacketDebugSegment, bool) {
if len(packet) == 0 {
return nil, false