Add KCP support

This commit is contained in:
KernelErr
2021-10-26 21:36:12 +08:00
parent 4c9b7a6990
commit 55eef8581c
12 changed files with 404 additions and 143 deletions

76
Cargo.lock generated
View File

@@ -34,6 +34,28 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
[[package]]
name = "byte_string"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11aade7a05aa8c3a351cedc44c3fc45806430543382fcc4743a9b757a2a0b4ed"
[[package]]
name = "byteorder"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
[[package]]
name = "bytes"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c"
dependencies = [
"byteorder",
"iovec",
]
[[package]]
name = "bytes"
version = "1.1.0"
@@ -69,22 +91,23 @@ checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
dependencies = [
"atty",
"humantime",
"log",
"log 0.4.14",
"regex",
"termcolor",
]
[[package]]
name = "fourth"
version = "0.1.1"
version = "0.1.2"
dependencies = [
"futures",
"log",
"log 0.4.14",
"pretty_env_logger",
"serde",
"serde_yaml",
"tls-parser",
"tokio",
"tokio_kcp",
]
[[package]]
@@ -235,6 +258,25 @@ dependencies = [
"cfg-if",
]
[[package]]
name = "iovec"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
dependencies = [
"libc",
]
[[package]]
name = "kcp"
version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09481e52ffe09d417d8b770217faca77eeb048ab5f337562cede72070fc91b21"
dependencies = [
"bytes 0.4.12",
"log 0.3.9",
]
[[package]]
name = "libc"
version = "0.2.103"
@@ -256,6 +298,15 @@ dependencies = [
"scopeguard",
]
[[package]]
name = "log"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
dependencies = [
"log 0.4.14",
]
[[package]]
name = "log"
version = "0.4.14"
@@ -284,7 +335,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc"
dependencies = [
"libc",
"log",
"log 0.4.14",
"miow",
"ntapi",
"winapi",
@@ -463,7 +514,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d"
dependencies = [
"env_logger",
"log",
"log 0.4.14",
]
[[package]]
@@ -689,7 +740,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2c2416fdedca8443ae44b4527de1ea633af61d8f7169ffa6e72c5b53d24efcc"
dependencies = [
"autocfg",
"bytes",
"bytes 1.1.0",
"libc",
"memchr",
"mio",
@@ -713,6 +764,19 @@ dependencies = [
"syn",
]
[[package]]
name = "tokio_kcp"
version = "0.8.0"
source = "git+https://github.com/Matrix-Zhang/tokio_kcp?rev=d93a2f2#d93a2f2ad2cba731dce8490f0960246d2a655033"
dependencies = [
"byte_string",
"bytes 1.1.0",
"futures",
"kcp",
"log 0.4.14",
"tokio",
]
[[package]]
name = "unicode-xid"
version = "0.2.2"