kcp-go

带有 FEC 的加密安全、生产级可靠的 golang UDP 库。「A Crypto-Secure, Production-Grade Reliable-UDP Library for golang with FEC」

Github stars Tracking Chart

GoDoc Powered MIT licensed Build Status Go Report Card Coverage Statusd Sourcegraph

Introduction

kcp-go is a Production-Grade Reliable-UDP library for golang.

This library intents to provide a smooth, resilient, ordered, error-checked and anonymous delivery of streams over UDP packets, it has been battle-tested with opensource project kcptun. Millions of devices(from low-end MIPS routers to high-end servers) have deployed kcp-go powered program in a variety of forms like online games, live broadcasting, file synchronization and network acceleration.

Lastest Release

Features

  1. Designed for Latency-sensitive scenarios.
  2. Cache friendly and Memory optimized design, offers extremely High Performance core.
  3. Handles >5K concurrent connections on a single commodity server.
  4. Compatible with net.Conn and net.Listener, a drop-in replacement for net.TCPConn.
  5. FEC(Forward Error Correction) Support with Reed-Solomon Codes
  6. Packet level encryption support with AES, TEA, 3DES, Blowfish, Cast5, Salsa20, etc. in CFB mode, which generates completely anonymous packet.
  7. Only A fixed number of goroutines will be created for the entire server application, costs in context switch between goroutines have been taken into consideration.
  8. Compatible with skywind3000's C version with various improvements.
  9. Platform-dependent optimizations: sendmmsg and recvmmsg were expoloited for linux.

Documentation

For complete documentation, see the associated Godoc.

Specification

NONCE:
  16bytes cryptographically secure random number, nonce changes for every packet.
  
CRC32:
  CRC-32 checksum of data using the IEEE polynomial
 
FEC TYPE:
  typeData = 0xF1
  typeParity = 0xF2
  
FEC SEQID:
  monotonically increasing in range: [0, (0xffffffff/shardSize) * shardSize - 1]
  
SIZE:
  The size of KCP frame plus 2
+-----------------+

Main metrics

Overview
Name With Ownerreact-dropzone/react-dropzone
Primary LanguageJavaScript
Program languageGo (Language Count: 3)
PlatformLinux, Mac, Raspbian
License:MIT License
所有者活动
Created At2014-09-27 11:57:09
Pushed At2025-02-24 10:59:35
Last Commit At2025-02-23 20:17:39
Release Count193
Last Release Namev14.3.8 (Posted on )
First Release Namev0.1.0 (Posted on )
用户参与
Stargazers Count10.8k
Watchers Count59
Fork Count797
Commits Count633
Has Issues Enabled
Issues Count839
Issue Open Count56
Pull Requests Count336
Pull Requests Open Count9
Pull Requests Close Count171
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private