chore: anti pretendo people note and cleanup

This commit is contained in:
Maple 2025-10-07 20:39:52 +02:00
commit c698e0b3dd
25 changed files with 69 additions and 682 deletions

542
Cargo.lock generated
View file

@ -41,12 +41,6 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "anyhow"
version = "1.0.98"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487"
[[package]] [[package]]
name = "async-stream" name = "async-stream"
version = "0.3.6" version = "0.3.6"
@ -107,29 +101,6 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
[[package]]
name = "aws-lc-rs"
version = "1.13.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c953fe1ba023e6b7730c0d4b031d06f267f23a46167dcbd40316644b10a17ba"
dependencies = [
"aws-lc-sys",
"zeroize",
]
[[package]]
name = "aws-lc-sys"
version = "0.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbfd150b5dbdb988bcc8fb1fe787eb6b7ee6180ca24da683b61ea5405f3d43ff"
dependencies = [
"bindgen",
"cc",
"cmake",
"dunce",
"fs_extra",
]
[[package]] [[package]]
name = "axum" name = "axum"
version = "0.7.9" version = "0.7.9"
@ -198,41 +169,12 @@ version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]]
name = "base64ct"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba"
[[package]] [[package]]
name = "binascii" name = "binascii"
version = "0.1.4" version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "383d29d513d8764dcdc42ea295d979eb99c3c9f00607b3692cf68a431f7dca72" checksum = "383d29d513d8764dcdc42ea295d979eb99c3c9f00607b3692cf68a431f7dca72"
[[package]]
name = "bindgen"
version = "0.69.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
dependencies = [
"bitflags",
"cexpr",
"clang-sys",
"itertools 0.12.1",
"lazy_static",
"lazycell",
"log",
"prettyplease",
"proc-macro2",
"quote",
"regex",
"rustc-hash",
"shlex",
"syn 2.0.104",
"which",
]
[[package]] [[package]]
name = "bitflags" name = "bitflags"
version = "2.9.1" version = "2.9.1"
@ -274,12 +216,6 @@ dependencies = [
"syn 2.0.104", "syn 2.0.104",
] ]
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]] [[package]]
name = "bytes" name = "bytes"
version = "1.10.1" version = "1.10.1"
@ -292,20 +228,9 @@ version = "1.2.31"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3a42d84bb6b69d3a8b3eaacf0d88f179e1929695e1ad012b6cf64d9caaa5fd2" checksum = "c3a42d84bb6b69d3a8b3eaacf0d88f179e1929695e1ad012b6cf64d9caaa5fd2"
dependencies = [ dependencies = [
"jobserver",
"libc",
"shlex", "shlex",
] ]
[[package]]
name = "cexpr"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
dependencies = [
"nom",
]
[[package]] [[package]]
name = "cfg-if" name = "cfg-if"
version = "1.0.1" version = "1.0.1"
@ -318,17 +243,6 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
[[package]]
name = "chacha20"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818"
dependencies = [
"cfg-if",
"cipher",
"cpufeatures",
]
[[package]] [[package]]
name = "chrono" name = "chrono"
version = "0.4.41" version = "0.4.41"
@ -353,32 +267,6 @@ dependencies = [
"inout", "inout",
] ]
[[package]]
name = "clang-sys"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
dependencies = [
"glob",
"libc",
"libloading",
]
[[package]]
name = "cmake"
version = "0.1.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0"
dependencies = [
"cc",
]
[[package]]
name = "const-oid"
version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
[[package]] [[package]]
name = "cookie" name = "cookie"
version = "0.18.1" version = "0.18.1"
@ -406,15 +294,6 @@ version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
[[package]]
name = "cpufeatures"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
dependencies = [
"libc",
]
[[package]] [[package]]
name = "crypto-common" name = "crypto-common"
version = "0.1.6" version = "0.1.6"
@ -435,23 +314,6 @@ dependencies = [
"windows-sys 0.59.0", "windows-sys 0.59.0",
] ]
[[package]]
name = "data-encoding"
version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476"
[[package]]
name = "der"
version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb"
dependencies = [
"const-oid",
"pem-rfc7468",
"zeroize",
]
[[package]] [[package]]
name = "deranged" name = "deranged"
version = "0.4.0" version = "0.4.0"
@ -501,7 +363,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [ dependencies = [
"block-buffer", "block-buffer",
"const-oid",
"crypto-common", "crypto-common",
"subtle", "subtle",
] ]
@ -523,12 +384,6 @@ version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f"
[[package]]
name = "dunce"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
[[package]] [[package]]
name = "either" name = "either"
version = "1.15.0" version = "1.15.0"
@ -610,12 +465,6 @@ dependencies = [
"percent-encoding", "percent-encoding",
] ]
[[package]]
name = "fs_extra"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
[[package]] [[package]]
name = "futures" name = "futures"
version = "0.3.31" version = "0.3.31"
@ -624,7 +473,6 @@ checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
dependencies = [ dependencies = [
"futures-channel", "futures-channel",
"futures-core", "futures-core",
"futures-executor",
"futures-io", "futures-io",
"futures-sink", "futures-sink",
"futures-task", "futures-task",
@ -647,34 +495,12 @@ version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
[[package]]
name = "futures-executor"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
dependencies = [
"futures-core",
"futures-task",
"futures-util",
]
[[package]] [[package]]
name = "futures-io" name = "futures-io"
version = "0.3.31" version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
[[package]]
name = "futures-macro"
version = "0.3.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.104",
]
[[package]] [[package]]
name = "futures-sink" name = "futures-sink"
version = "0.3.31" version = "0.3.31"
@ -696,7 +522,6 @@ dependencies = [
"futures-channel", "futures-channel",
"futures-core", "futures-core",
"futures-io", "futures-io",
"futures-macro",
"futures-sink", "futures-sink",
"futures-task", "futures-task",
"memchr", "memchr",
@ -834,15 +659,6 @@ dependencies = [
"digest", "digest",
] ]
[[package]]
name = "home"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf"
dependencies = [
"windows-sys 0.59.0",
]
[[package]] [[package]]
name = "http" name = "http"
version = "0.2.12" version = "0.2.12"
@ -1232,40 +1048,12 @@ dependencies = [
"windows-sys 0.59.0", "windows-sys 0.59.0",
] ]
[[package]]
name = "itertools"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
dependencies = [
"either",
]
[[package]]
name = "itertools"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285"
dependencies = [
"either",
]
[[package]] [[package]]
name = "itoa" name = "itoa"
version = "1.0.15" version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
[[package]]
name = "jobserver"
version = "0.1.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a"
dependencies = [
"getrandom 0.3.3",
"libc",
]
[[package]] [[package]]
name = "js-sys" name = "js-sys"
version = "0.3.77" version = "0.3.77"
@ -1287,15 +1075,6 @@ name = "lazy_static"
version = "1.5.0" version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
dependencies = [
"spin",
]
[[package]]
name = "lazycell"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]] [[package]]
name = "libc" name = "libc"
@ -1303,28 +1082,6 @@ version = "0.2.174"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
[[package]]
name = "libloading"
version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667"
dependencies = [
"cfg-if",
"windows-targets 0.53.3",
]
[[package]]
name = "libm"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de"
[[package]]
name = "linux-raw-sys"
version = "0.4.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
[[package]] [[package]]
name = "linux-raw-sys" name = "linux-raw-sys"
version = "0.9.4" version = "0.9.4"
@ -1374,7 +1131,6 @@ version = "0.0.0"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"rand 0.9.2",
"syn 2.0.104", "syn 2.0.104",
] ]
@ -1425,12 +1181,6 @@ version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
[[package]]
name = "minimal-lexical"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]] [[package]]
name = "miniz_oxide" name = "miniz_oxide"
version = "0.8.9" version = "0.8.9"
@ -1499,16 +1249,6 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "nom"
version = "7.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
dependencies = [
"memchr",
"minimal-lexical",
]
[[package]] [[package]]
name = "nu-ansi-term" name = "nu-ansi-term"
version = "0.46.0" version = "0.46.0"
@ -1519,49 +1259,12 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "num-bigint-dig"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151"
dependencies = [
"byteorder",
"lazy_static",
"libm",
"num-integer",
"num-iter",
"num-traits",
"rand 0.8.5",
"smallvec",
"zeroize",
]
[[package]] [[package]]
name = "num-conv" name = "num-conv"
version = "0.1.0" version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
[[package]]
name = "num-integer"
version = "0.1.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
dependencies = [
"num-traits",
]
[[package]]
name = "num-iter"
version = "0.1.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf"
dependencies = [
"autocfg",
"num-integer",
"num-traits",
]
[[package]] [[package]]
name = "num-traits" name = "num-traits"
version = "0.2.19" version = "0.2.19"
@ -1569,7 +1272,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"libm",
] ]
[[package]] [[package]]
@ -1708,15 +1410,6 @@ dependencies = [
"syn 2.0.104", "syn 2.0.104",
] ]
[[package]]
name = "pem-rfc7468"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412"
dependencies = [
"base64ct",
]
[[package]] [[package]]
name = "percent-encoding" name = "percent-encoding"
version = "2.3.1" version = "2.3.1"
@ -1755,27 +1448,6 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "pkcs1"
version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f"
dependencies = [
"der",
"pkcs8",
"spki",
]
[[package]]
name = "pkcs8"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
dependencies = [
"der",
"spki",
]
[[package]] [[package]]
name = "pkg-config" name = "pkg-config"
version = "0.3.32" version = "0.3.32"
@ -1806,16 +1478,6 @@ dependencies = [
"zerocopy", "zerocopy",
] ]
[[package]]
name = "prettyplease"
version = "0.2.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2"
dependencies = [
"proc-macro2",
"syn 2.0.104",
]
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.95" version = "1.0.95"
@ -1845,20 +1507,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5"
dependencies = [ dependencies = [
"bytes", "bytes",
"prost-derive",
]
[[package]]
name = "prost-derive"
version = "0.13.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d"
dependencies = [
"anyhow",
"itertools 0.14.0",
"proc-macro2",
"quote",
"syn 2.0.104",
] ]
[[package]] [[package]]
@ -1901,18 +1549,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [ dependencies = [
"libc", "libc",
"rand_chacha 0.3.1", "rand_chacha",
"rand_core 0.6.4", "rand_core",
]
[[package]]
name = "rand"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"
dependencies = [
"rand_chacha 0.9.0",
"rand_core 0.9.3",
] ]
[[package]] [[package]]
@ -1922,17 +1560,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [ dependencies = [
"ppv-lite86", "ppv-lite86",
"rand_core 0.6.4", "rand_core",
]
[[package]]
name = "rand_chacha"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
dependencies = [
"ppv-lite86",
"rand_core 0.9.3",
] ]
[[package]] [[package]]
@ -1944,15 +1572,6 @@ dependencies = [
"getrandom 0.2.16", "getrandom 0.2.16",
] ]
[[package]]
name = "rand_core"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
dependencies = [
"getrandom 0.3.3",
]
[[package]] [[package]]
name = "rc4" name = "rc4"
version = "0.1.0" version = "0.1.0"
@ -2093,14 +1712,11 @@ dependencies = [
name = "rnex-core" name = "rnex-core"
version = "0.1.1" version = "0.1.1"
dependencies = [ dependencies = [
"anyhow",
"async-trait", "async-trait",
"bytemuck", "bytemuck",
"chacha20",
"chrono", "chrono",
"ctrlc", "ctrlc",
"dotenv", "dotenv",
"futures",
"hex", "hex",
"hmac", "hmac",
"json", "json",
@ -2109,25 +1725,14 @@ dependencies = [
"md-5", "md-5",
"once_cell", "once_cell",
"paste", "paste",
"prost", "rand",
"rand 0.8.5",
"rc4", "rc4",
"reqwest", "reqwest",
"rocket", "rocket",
"rsa",
"rustls",
"rustls-pki-types",
"rustls-webpki",
"serde",
"sha2",
"simplelog", "simplelog",
"thiserror", "thiserror",
"tokio", "tokio",
"tokio-rustls",
"tokio-stream",
"tokio-tungstenite",
"tonic", "tonic",
"tungstenite",
"typenum", "typenum",
"v-byte-helpers", "v-byte-helpers",
] ]
@ -2153,7 +1758,7 @@ dependencies = [
"num_cpus", "num_cpus",
"parking_lot", "parking_lot",
"pin-project-lite", "pin-project-lite",
"rand 0.8.5", "rand",
"ref-cast", "ref-cast",
"rocket_codegen", "rocket_codegen",
"rocket_http", "rocket_http",
@ -2214,51 +1819,12 @@ dependencies = [
"uncased", "uncased",
] ]
[[package]]
name = "rsa"
version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78928ac1ed176a5ca1d17e578a1825f3d81ca54cf41053a592584b020cfd691b"
dependencies = [
"const-oid",
"digest",
"num-bigint-dig",
"num-integer",
"num-traits",
"pkcs1",
"pkcs8",
"rand_core 0.6.4",
"signature",
"spki",
"subtle",
"zeroize",
]
[[package]] [[package]]
name = "rustc-demangle" name = "rustc-demangle"
version = "0.1.26" version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace"
[[package]]
name = "rustc-hash"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
[[package]]
name = "rustix"
version = "0.38.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
dependencies = [
"bitflags",
"errno",
"libc",
"linux-raw-sys 0.4.15",
"windows-sys 0.59.0",
]
[[package]] [[package]]
name = "rustix" name = "rustix"
version = "1.0.8" version = "1.0.8"
@ -2268,7 +1834,7 @@ dependencies = [
"bitflags", "bitflags",
"errno", "errno",
"libc", "libc",
"linux-raw-sys 0.9.4", "linux-raw-sys",
"windows-sys 0.60.2", "windows-sys 0.60.2",
] ]
@ -2278,8 +1844,6 @@ version = "0.23.31"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc"
dependencies = [ dependencies = [
"aws-lc-rs",
"log",
"once_cell", "once_cell",
"rustls-pki-types", "rustls-pki-types",
"rustls-webpki", "rustls-webpki",
@ -2302,7 +1866,6 @@ version = "0.103.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc"
dependencies = [ dependencies = [
"aws-lc-rs",
"ring", "ring",
"rustls-pki-types", "rustls-pki-types",
"untrusted", "untrusted",
@ -2417,28 +1980,6 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "sha1"
version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
dependencies = [
"cfg-if",
"cpufeatures",
"digest",
]
[[package]]
name = "sha2"
version = "0.10.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
dependencies = [
"cfg-if",
"cpufeatures",
"digest",
]
[[package]] [[package]]
name = "sharded-slab" name = "sharded-slab"
version = "0.1.7" version = "0.1.7"
@ -2463,16 +2004,6 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "signature"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
dependencies = [
"digest",
"rand_core 0.6.4",
]
[[package]] [[package]]
name = "simplelog" name = "simplelog"
version = "0.12.2" version = "0.12.2"
@ -2522,16 +2053,6 @@ version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
[[package]]
name = "spki"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d"
dependencies = [
"base64ct",
"der",
]
[[package]] [[package]]
name = "stable-pattern" name = "stable-pattern"
version = "0.1.0" version = "0.1.0"
@ -2634,7 +2155,7 @@ dependencies = [
"fastrand", "fastrand",
"getrandom 0.3.3", "getrandom 0.3.3",
"once_cell", "once_cell",
"rustix 1.0.8", "rustix",
"windows-sys 0.59.0", "windows-sys 0.59.0",
] ]
@ -2781,18 +2302,6 @@ dependencies = [
"tokio", "tokio",
] ]
[[package]]
name = "tokio-tungstenite"
version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "489a59b6730eda1b0171fcfda8b121f4bee2b35cba8645ca35c5f7ba3eb736c1"
dependencies = [
"futures-util",
"log",
"tokio",
"tungstenite",
]
[[package]] [[package]]
name = "tokio-util" name = "tokio-util"
version = "0.7.15" version = "0.7.15"
@ -2888,7 +2397,7 @@ dependencies = [
"indexmap 1.9.3", "indexmap 1.9.3",
"pin-project", "pin-project",
"pin-project-lite", "pin-project-lite",
"rand 0.8.5", "rand",
"slab", "slab",
"tokio", "tokio",
"tokio-util", "tokio-util",
@ -3009,23 +2518,6 @@ version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
[[package]]
name = "tungstenite"
version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eadc29d668c91fcc564941132e17b28a7ceb2f3ebf0b9dae3e03fd7a6748eb0d"
dependencies = [
"bytes",
"data-encoding",
"http 1.3.1",
"httparse",
"log",
"rand 0.9.2",
"sha1",
"thiserror",
"utf-8",
]
[[package]] [[package]]
name = "typenum" name = "typenum"
version = "1.18.0" version = "1.18.0"
@ -3080,12 +2572,6 @@ dependencies = [
"percent-encoding", "percent-encoding",
] ]
[[package]]
name = "utf-8"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
[[package]] [[package]]
name = "utf8_iter" name = "utf8_iter"
version = "1.0.4" version = "1.0.4"
@ -3224,18 +2710,6 @@ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
[[package]]
name = "which"
version = "4.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
dependencies = [
"either",
"home",
"once_cell",
"rustix 0.38.44",
]
[[package]] [[package]]
name = "winapi" name = "winapi"
version = "0.3.9" version = "0.3.9"

View file

@ -4,4 +4,17 @@
- Pretendo team for the rest of the Servers and Reverse engineering efforts - Pretendo team for the rest of the Servers and Reverse engineering efforts
- Kinnay for his huge work on reversing nex servers and documentation(https://github.com/Kinnay/NintendoClients/) - Kinnay for his huge work on reversing nex servers and documentation(https://github.com/Kinnay/NintendoClients/)
- Splatfestival testing team for helping us test our messes of code - Splatfestival testing team for helping us test our messes of code
- The SPFN team(Bloxer, Ceantix and Maple(aka TV)) - The SPFN team(Bloxer, Ceantix and RusticMaple)
This nex implementation was not created and is not intended to compete with pretendo,
we wholeheartedly support pretendo.
This project would never have been possible without their reverse engineering efforts.
As such if you want to respect the Authors wishes(Maple(Me) is pretty much the sole author of Rust-Nex), do not
use it if you mean any harm to pretendo. If you do show intent to harm them you will be blocked from ever contributing
and will be refused support, as such please also refrain from asking for support if you have been blocked by pretendo.
I felt like this needed to be said as there are far too many pretendo copycats who blatantly copy their code and use
their reversal efforts with no credits in sight in an attempt to harm them for some grudge or stupid reason.
I feel that by working together and not against each other we can reach a better and healthier future for the community,
health of developers and numerous more reasons.

View file

@ -13,5 +13,4 @@ proc-macro = true
quote = "1.0.38" quote = "1.0.38"
proc-macro2 = "1.0.93" proc-macro2 = "1.0.93"
syn = { version = "2.0.98", features = ["full"] } syn = { version = "2.0.98", features = ["full"] }
rand = "0.9.0"

View file

@ -39,6 +39,7 @@ impl RmcProtocolData{
// boilerplate tokens which all raw traits need // boilerplate tokens which all raw traits need
quote!{ quote!{
#[doc(hidden)] #[doc(hidden)]
#[allow(unused_must_use)]
pub trait #raw_name: #name pub trait #raw_name: #name
}.to_tokens(tokens); }.to_tokens(tokens);
@ -209,6 +210,7 @@ impl RmcProtocolData{
// boilerplate tokens which all raw traits need // boilerplate tokens which all raw traits need
quote!{ quote!{
#[doc(hidden)] #[doc(hidden)]
#[allow(unused_must_use)]
pub trait #remote_name: rnex_core::rmc::protocols::HasRmcConnection pub trait #remote_name: rnex_core::rmc::protocols::HasRmcConnection
}.to_tokens(tokens); }.to_tokens(tokens);

View file

@ -2,17 +2,11 @@
use rnex_core::reggie::UnitPacketRead; use rnex_core::reggie::UnitPacketRead;
use rnex_core::reggie::UnitPacketWrite; use rnex_core::reggie::UnitPacketWrite;
use rnex_core::rmc::structures::RmcSerialize; use rnex_core::rmc::structures::RmcSerialize;
use std::env; use std::net::SocketAddrV4;
use std::ffi::CStr; use std::sync::Arc;
use std::io::{Read, Write};
use std::net::{Ipv4Addr, SocketAddrV4};
use std::sync::{Arc, OnceLock};
use std::time::Duration; use std::time::Duration;
use bytemuck::{Pod, Zeroable}; use log::error;
use log::{error, warn}; use tokio::net::TcpStream;
use once_cell::sync::Lazy;
use tokio::net::{TcpSocket, TcpStream};
use tokio::sync::RwLock;
use tokio::task; use tokio::task;
use tokio::time::sleep; use tokio::time::sleep;
use prudpv1::executables::common::{FORWARD_DESTINATION, EDGE_NODE_HOLDER}; use prudpv1::executables::common::{FORWARD_DESTINATION, EDGE_NODE_HOLDER};
@ -110,4 +104,5 @@ async fn main() {
} }
}); });
} }
drop(conn);
} }

View file

@ -1,23 +1,16 @@
use rnex_core::reggie::UnitPacketRead; use rnex_core::reggie::UnitPacketRead;
use rnex_core::reggie::UnitPacketWrite; use rnex_core::reggie::UnitPacketWrite;
use rnex_core::rmc::structures::RmcSerialize; use rnex_core::rmc::structures::RmcSerialize;
use std::env; use std::net::SocketAddrV4;
use std::ffi::CStr; use std::sync::Arc;
use std::io::{Read, Write};
use std::net::{Ipv4Addr, SocketAddrV4};
use std::sync::{Arc, OnceLock};
use std::time::Duration; use std::time::Duration;
use bytemuck::{Pod, Zeroable}; use log::error;
use log::{error, warn}; use tokio::net::TcpStream;
use once_cell::sync::Lazy;
use tokio::net::{TcpSocket, TcpStream};
use tokio::sync::RwLock;
use tokio::task; use tokio::task;
use tokio::time::sleep; use tokio::time::sleep;
use prudpv1::executables::common::{FORWARD_DESTINATION, EDGE_NODE_HOLDER}; use prudpv1::executables::common::{FORWARD_DESTINATION, EDGE_NODE_HOLDER};
use prudpv1::prudp::router::Router; use prudpv1::prudp::router::Router;
use prudpv1::prudp::secure::Secure; use prudpv1::prudp::secure::Secure;
use prudpv1::prudp::unsecure::Unsecure;
use rnex_core::common::setup; use rnex_core::common::setup;
use rnex_core::executables::common::{OWN_IP_PRIVATE, OWN_IP_PUBLIC, SECURE_SERVER_ACCOUNT, SERVER_PORT}; use rnex_core::executables::common::{OWN_IP_PRIVATE, OWN_IP_PUBLIC, SECURE_SERVER_ACCOUNT, SERVER_PORT};
use rnex_core::prudp::virtual_port::VirtualPort; use rnex_core::prudp::virtual_port::VirtualPort;
@ -113,4 +106,6 @@ async fn main() {
} }
}); });
} }
drop(conn);
} }

View file

@ -1,8 +1,8 @@
/*
use std::net::Ipv4Addr; use std::net::Ipv4Addr;
pub trait AuthModule{ pub trait AuthModule{
fn get_auth_key(addr: Ipv4Addr) -> [u8; 32]; fn get_auth_key(addr: Ipv4Addr) -> [u8; 32];
} }*/
/* /*
struct AuthServerAuthModule; struct AuthServerAuthModule;

View file

@ -1,14 +1,12 @@
use std::{env, io}; use std::io;
use std::io::Cursor; use std::io::Cursor;
use std::marker::PhantomData; use std::marker::PhantomData;
use tokio::net::UdpSocket; use tokio::net::UdpSocket;
use std::net::{SocketAddr, SocketAddrV4}; use std::net::{SocketAddr, SocketAddrV4};
use std::net::SocketAddr::V4; use std::net::SocketAddr::V4;
use std::sync::{Arc, Weak}; use std::sync::{Arc, Weak};
use std::sync::atomic::{AtomicBool};
use std::time::Duration; use std::time::Duration;
use tokio::task::JoinHandle; use tokio::task::JoinHandle;
use once_cell::sync::Lazy;
use log::{error, info}; use log::{error, info};
use thiserror::Error; use thiserror::Error;
use tokio::select; use tokio::select;
@ -19,16 +17,11 @@ use crate::prudp::packet::{PRUDPV1Packet};
use rnex_core::prudp::virtual_port::VirtualPort; use rnex_core::prudp::virtual_port::VirtualPort;
use crate::prudp::router::Error::VirtualPortTaken; use crate::prudp::router::Error::VirtualPortTaken;
static SERVER_DATAGRAMS: Lazy<u8> = Lazy::new(||{
env::var("SERVER_DATAGRAM_COUNT").ok()
.and_then(|s| s.parse().ok())
.unwrap_or(1)
});
pub struct Router { pub struct Router {
endpoints: RwLock<[Option<Arc<dyn AnyInternalSocket>>; 16]>, endpoints: RwLock<[Option<Arc<dyn AnyInternalSocket>>; 16]>,
running: AtomicBool, //running: AtomicBool,
socket: Arc<UdpSocket>, socket: Arc<UdpSocket>,
_no_outside_construction: PhantomData<()> _no_outside_construction: PhantomData<()>
} }
@ -114,7 +107,7 @@ impl Router {
let own_impl = Router { let own_impl = Router {
endpoints: Default::default(), endpoints: Default::default(),
running: AtomicBool::new(true), // running: AtomicBool::new(true),
socket: socket.clone(), socket: socket.clone(),
_no_outside_construction: Default::default() _no_outside_construction: Default::default()
}; };

View file

@ -679,7 +679,7 @@ impl<T: CryptoHandler> AnyInternalSocket for InternalSocket<T> {
self.send_packet_unbuffered(address, packet).await; self.send_packet_unbuffered(address, packet).await;
let Some(connect_ack_packet) = recv.recv().await else { let Some(_connect_ack_packet) = recv.recv().await else {
error!("what"); error!("what");
return None; return None;
}; };

View file

@ -78,7 +78,7 @@ impl CryptoHandlerConnectionInstance for UnsecureInstance {
packet.calculate_and_assign_signature(self.key, None, Some(self.self_signature)); packet.calculate_and_assign_signature(self.key, None, Some(self.self_signature));
} }
fn verify_packet(&self, packet: &PRUDPV1Packet) -> bool { fn verify_packet(&self, _packet: &PRUDPV1Packet) -> bool {
true true
} }
} }

View file

@ -13,38 +13,24 @@ v-byte-helpers = { git = "https://github.com/DJMrTV/VByteMacros", version = "0.1
simplelog = "0.12.2" simplelog = "0.12.2"
chrono = "0.4.39" chrono = "0.4.39"
log = "0.4.25" log = "0.4.25"
anyhow = "1.0.95"
rand = "0.8.5" rand = "0.8.5"
hmac = "0.12.1" hmac = "0.12.1"
md-5 = "^0.10.6" md-5 = "^0.10.6"
tokio = { version = "1.43.0", features = ["macros", "rt-multi-thread", "net", "sync", "fs"] } tokio = { version = "1.43.0", features = ["macros", "rt-multi-thread", "net", "sync", "fs"] }
tokio-stream = { version = "0.1.17", features = ["io-util"] }
tonic = "0.12.3" tonic = "0.12.3"
prost = "0.13.4"
hex = "0.4.3" hex = "0.4.3"
macros = { path = "../macros" } macros = { path = "../macros" }
rocket = { version = "0.5.1", features = ["json", "serde_json"] } rocket = { version = "0.5.1", features = ["json", "serde_json"] }
serde = { version = "1.0.217", features = ["derive"] }
async-trait = "0.1.86" async-trait = "0.1.86"
paste = "1.0.15" paste = "1.0.15"
typenum = "1.18.0" typenum = "1.18.0"
futures = "0.3.31"
reqwest = "0.12.18" reqwest = "0.12.18"
json = "0.12.4" json = "0.12.4"
ctrlc = "3.4.7" ctrlc = "3.4.7"
rsa = "0.9.8"
sha2 = "0.10.9"
chacha20 = "0.9.1"
rustls = "0.23.27"
rustls-pki-types = "1.12.0"
rustls-webpki = "0.103.3"
tokio-rustls = "0.26.2"
tokio-tungstenite = "0.27.0"
tungstenite = "0.27.0"
[[bin]] [[bin]]

View file

@ -1,32 +1,17 @@
use rnex_core::reggie::{RemoteEdgeNodeHolder, UnitPacketRead}; use rnex_core::reggie::{RemoteEdgeNodeHolder, UnitPacketRead};
use log::{error, info}; use log::{error, info};
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
use rustls::client::danger::HandshakeSignatureValid;
use rustls::pki_types::{CertificateDer, TrustAnchor, UnixTime};
use rustls::server::danger::{ClientCertVerified, ClientCertVerifier};
use rustls::server::{ClientCertVerifierBuilder, WebPkiClientVerifier};
use rustls::{
DigitallySignedStruct, DistinguishedName, Error, RootCertStore, ServerConfig, ServerConnection,
SignatureScheme,
};
use rustls_pki_types::PrivateKeyDer;
use rnex_core::common::setup; use rnex_core::common::setup;
use std::borrow::ToOwned; use std::{env};
use std::{env, fs};
use std::io::Cursor; use std::io::Cursor;
use std::net::{IpAddr, Ipv4Addr, SocketAddr, SocketAddrV4}; use std::net::SocketAddrV4;
use std::sync::Arc; use std::sync::Arc;
use macros::{method_id, rmc_proto, rmc_struct}; use tokio::net::{TcpListener, TcpStream};
use tokio::io::AsyncReadExt;
use tokio::net::{TcpListener, TcpSocket, TcpStream};
use tokio::task; use tokio::task;
use tokio_rustls::TlsAcceptor;
use rnex_core::define_rmc_proto;
use rnex_core::executables::common::{OWN_IP_PRIVATE, SECURE_SERVER_ACCOUNT, SERVER_PORT}; use rnex_core::executables::common::{OWN_IP_PRIVATE, SECURE_SERVER_ACCOUNT, SERVER_PORT};
use rnex_core::nex::auth_handler::AuthHandler; use rnex_core::nex::auth_handler::AuthHandler;
use rnex_core::reggie::EdgeNodeHolderConnectOption::DontRegister; use rnex_core::reggie::EdgeNodeHolderConnectOption::DontRegister;
use rnex_core::rmc::protocols::{new_rmc_gateway_connection, OnlyRemote}; use rnex_core::rmc::protocols::{new_rmc_gateway_connection, OnlyRemote};
use rnex_core::rmc::response::ErrorCode;
use rnex_core::rmc::structures::RmcSerialize; use rnex_core::rmc::structures::RmcSerialize;
use rnex_core::rnex_proxy_common::ConnectionInitData; use rnex_core::rnex_proxy_common::ConnectionInitData;
use rnex_core::util::SplittableBufferConnection; use rnex_core::util::SplittableBufferConnection;
@ -57,7 +42,7 @@ async fn main() {
while let Ok((mut stream, addr)) = listen.accept().await { while let Ok((mut stream, _addr)) = listen.accept().await {
let buffer = match stream.read_buffer().await{ let buffer = match stream.read_buffer().await{
Ok(v) => v, Ok(v) => v,
Err(e) => { Err(e) => {
@ -68,7 +53,7 @@ async fn main() {
let user_connection_data = ConnectionInitData::deserialize(&mut Cursor::new(buffer)); let user_connection_data = ConnectionInitData::deserialize(&mut Cursor::new(buffer));
let user_connection_data = match user_connection_data{ let _user_connection_data = match user_connection_data{
Ok(v) => v, Ok(v) => v,
Err(e) => { Err(e) => {
error!("an error ocurred whilest reading connection data: {:?}", e); error!("an error ocurred whilest reading connection data: {:?}", e);

View file

@ -1,22 +1,20 @@
use std::io::Cursor; use std::io::Cursor;
use rnex_core::rmc::structures::RmcSerialize; use rnex_core::rmc::structures::RmcSerialize;
use rnex_core::reggie::{RemoteEdgeNodeHolder, UnitPacketRead}; use rnex_core::reggie::UnitPacketRead;
use std::net::SocketAddrV4; use std::net::SocketAddrV4;
use std::sync::Arc; use std::sync::Arc;
use std::sync::atomic::AtomicU32; use std::sync::atomic::AtomicU32;
use log::{error, info}; use log::{error, info};
use tokio::net::{TcpListener, TcpStream}; use tokio::net::TcpListener;
use tokio::task; use tokio::task;
use rnex_core::common::setup; use rnex_core::common::setup;
use rnex_core::executables::common::{OWN_IP_PRIVATE, SERVER_PORT}; use rnex_core::executables::common::{OWN_IP_PRIVATE, SERVER_PORT};
use rnex_core::nex::matchmake::MatchmakeManager; use rnex_core::nex::matchmake::MatchmakeManager;
use rnex_core::nex::remote_console::RemoteConsole; use rnex_core::nex::remote_console::RemoteConsole;
use rnex_core::nex::user::User; use rnex_core::nex::user::User;
use rnex_core::reggie::EdgeNodeHolderConnectOption::DontRegister; use rnex_core::rmc::protocols::new_rmc_gateway_connection;
use rnex_core::rmc::protocols::{new_rmc_gateway_connection, OnlyRemote};
use rnex_core::rnex_proxy_common::ConnectionInitData; use rnex_core::rnex_proxy_common::ConnectionInitData;
use rnex_core::rmc::protocols::RemoteInstantiatable; use rnex_core::rmc::protocols::RemoteInstantiatable;
use rnex_core::util::SplittableBufferConnection;
#[tokio::main] #[tokio::main]
async fn main() { async fn main() {
@ -35,7 +33,7 @@ async fn main() {
MatchmakeManager::initialize_garbage_collect_thread(weak_mmm).await; MatchmakeManager::initialize_garbage_collect_thread(weak_mmm).await;
while let Ok((mut stream, addr)) = listen.accept().await { while let Ok((mut stream, _addr)) = listen.accept().await {
let buffer = match stream.read_buffer().await{ let buffer = match stream.read_buffer().await{
Ok(v) => v, Ok(v) => v,
Err(e) => { Err(e) => {

View file

@ -1,12 +1,7 @@
use std::env; use std::env;
use std::net::{Ipv4Addr, SocketAddrV4}; use std::net::Ipv4Addr;
use macros::{method_id, rmc_proto, RmcSerialize};
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
use tonic::transport::Server;
use crate::define_rmc_proto;
use crate::prudp::station_url::StationUrl;
use crate::nex::account::Account; use crate::nex::account::Account;
use crate::rmc::response::ErrorCode;
pub static OWN_IP_PRIVATE: Lazy<Ipv4Addr> = Lazy::new(|| { pub static OWN_IP_PRIVATE: Lazy<Ipv4Addr> = Lazy::new(|| {
env::var("SERVER_IP") env::var("SERVER_IP")

View file

@ -1,7 +1,6 @@
use std::io::Cursor; use std::io::Cursor;
use std::net::SocketAddrV4; use std::net::SocketAddrV4;
use std::sync::{Arc, Weak}; use std::sync::{Arc, Weak};
use log::error;
use macros::rmc_struct; use macros::rmc_struct;
use tokio::net::TcpListener; use tokio::net::TcpListener;
use tokio::sync::RwLock; use tokio::sync::RwLock;
@ -56,7 +55,7 @@ async fn main() {
let holder: Arc<DataHolder> = Default::default(); let holder: Arc<DataHolder> = Default::default();
while let Ok((mut stream, addr)) = listen.accept().await { while let Ok((stream, _addr)) = listen.accept().await {
let mut conn: SplittableBufferConnection = stream.into(); let mut conn: SplittableBufferConnection = stream.into();
let Some(data) = conn.recv().await else { let Some(data) = conn.recv().await else {

View file

@ -11,40 +11,15 @@
extern crate self as rust_nex; extern crate self as rust_nex;
use crate::nex::account::Account; use crate::nex::account::Account;
use crate::nex::auth_handler::{AuthHandler, RemoteAuthClientProtocol};
use crate::nex::remote_console::RemoteConsole;
use crate::nex::user::{RemoteUserProtocol, User};
use crate::rmc::protocols::auth::Auth;
use crate::rmc::protocols::auth::RawAuth;
use crate::rmc::protocols::auth::RawAuthInfo;
use crate::rmc::protocols::auth::RemoteAuth;
use crate::rmc::protocols::matchmake_extension::RemoteMatchmakeExtension;
use crate::rmc::protocols::{new_rmc_gateway_connection, OnlyRemote, RemoteInstantiatable};
use crate::rmc::response::ErrorCode;
use crate::rmc::structures::any::Any;
use crate::rmc::structures::connection_data::ConnectionData;
use crate::rmc::structures::matchmake::{CreateMatchmakeSessionParam, Gathering, MatchmakeParam, MatchmakeSession};
use crate::rmc::structures::qresult::QResult;
use chrono::{Local, SecondsFormat}; use chrono::{Local, SecondsFormat};
use log::{error, info};
use macros::rmc_struct;
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
use simplelog::{ use simplelog::{
ColorChoice, CombinedLogger, Config, LevelFilter, TermLogger, TerminalMode, WriteLogger, ColorChoice, CombinedLogger, Config, LevelFilter, TermLogger, TerminalMode, WriteLogger,
}; };
use std::fs::File; use std::fs::File;
use std::marker::PhantomData; use std::net::{Ipv4Addr};
use std::net::{Ipv4Addr, SocketAddrV4}; use std::sync::Once;
use std::ops::{BitAnd, BitOr};
use std::str::FromStr;
use std::sync::{Arc, Once, Weak};
use std::time::Duration;
use std::{env, fs}; use std::{env, fs};
use std::sync::atomic::AtomicU32;
use tokio::task::JoinHandle;
use crate::kerberos::KerberosDateTime;
use crate::nex::matchmake::MatchmakeManager;
use crate::rmc::protocols::secure::RemoteSecure;
mod prudp; mod prudp;
pub mod rmc; pub mod rmc;

View file

@ -203,7 +203,7 @@ impl ExtendedMatchmakeSession{
}; };
let other_pid = other_conn.pid; // let other_pid = other_conn.pid;
/*if other_pid == self.session.gathering.owner_pid && /*if other_pid == self.session.gathering.owner_pid &&
joining_pid == self.session.gathering.owner_pid{ joining_pid == self.session.gathering.owner_pid{
continue; continue;
@ -341,7 +341,7 @@ impl ExtendedMatchmakeSession{
} }
pub async fn migrate_host(&mut self, initiator_pid: u32) -> Result<(), ErrorCode>{ pub async fn migrate_host(&mut self, initiator_pid: u32) -> Result<(), ErrorCode>{
let players: Vec<_> = self.connected_players.iter().filter_map(|p| p.upgrade()).collect(); // let players: Vec<_> = self.connected_players.iter().filter_map(|p| p.upgrade()).collect();
self.session.gathering.host_pid = self.session.gathering.owner_pid; self.session.gathering.host_pid = self.session.gathering.owner_pid;

View file

@ -28,7 +28,7 @@ impl PRUDPSockAddr{
pub fn calculate_connection_signature(&self) -> [u8; 16] { pub fn calculate_connection_signature(&self) -> [u8; 16] {
let mut hmac = Md5Hmac::new_from_slice(&[0; 16]).expect("fuck"); let mut hmac = Md5Hmac::new_from_slice(&[0; 16]).expect("fuck");
let mut data = self.regular_socket_addr.ip().octets().to_vec(); let data = self.regular_socket_addr.ip().octets().to_vec();
//data.extend_from_slice(&self.regular_socket_addr.port().to_be_bytes()); //data.extend_from_slice(&self.regular_socket_addr.port().to_be_bytes());
hmac.write_all(&data).expect("figuring this out was complete ass"); hmac.write_all(&data).expect("figuring this out was complete ass");

View file

@ -1,29 +1,8 @@
use std::{env, fs, io}; use std::io;
use std::hash::Hash; use std::net::SocketAddrV4;
use std::io::{Error, ErrorKind}; use macros::{method_id, rmc_proto, RmcSerialize};
use std::net::{SocketAddrV4, ToSocketAddrs}; use tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt};
use std::pin::Pin;
use std::sync::Arc;
use std::task::{Context, Poll};
use futures::{SinkExt, StreamExt};
use macros::{method_id, rmc_proto, rmc_struct, RmcSerialize};
use once_cell::sync::Lazy;
use rustls::{ClientConfig, RootCertStore, ServerConfig};
use rustls::client::WebPkiServerVerifier;
use rustls::server::WebPkiClientVerifier;
use rustls_pki_types::{CertificateDer, PrivateKeyDer, ServerName, TrustAnchor};
use thiserror::Error;
use tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt, ReadBuf};
use tokio::net::{TcpListener, TcpStream};
use tokio_rustls::{TlsAcceptor, TlsConnector};
use tokio_rustls::client::TlsStream;
use tokio_tungstenite::{connect_async, MaybeTlsStream, WebSocketStream};
use tokio_tungstenite::tungstenite::Message;
use webpki::anchor_from_trusted_cert;
use crate::common::setup;
use crate::define_rmc_proto; use crate::define_rmc_proto;
use crate::nex::account::Account;
use crate::rmc::protocols::{new_rmc_gateway_connection, OnlyRemote, RmcCallable, RmcConnection};
use rnex_core::rmc::response::ErrorCode; use rnex_core::rmc::response::ErrorCode;
use crate::rmc::structures::RmcSerialize; use crate::rmc::structures::RmcSerialize;

View file

@ -8,10 +8,8 @@ pub trait Matchmake{
async fn unregister_gathering(&self, gid: u32) -> Result<bool, ErrorCode>; async fn unregister_gathering(&self, gid: u32) -> Result<bool, ErrorCode>;
#[method_id(41)] #[method_id(41)]
async fn get_session_urls(&self, gid: u32) -> Result<Vec<StationUrl>, ErrorCode>; async fn get_session_urls(&self, gid: u32) -> Result<Vec<StationUrl>, ErrorCode>;
#[method_id(42)] #[method_id(42)]
async fn update_session_host(&self, gid: u32, change_owner: bool) -> Result<(), ErrorCode>; async fn update_session_host(&self, gid: u32, change_owner: bool) -> Result<(), ErrorCode>;
#[method_id(44)] #[method_id(44)]
async fn migrate_gathering_ownership(&self, gid: u32, candidates: Vec<u32>, participants_only: bool) -> Result<(), ErrorCode>; async fn migrate_gathering_ownership(&self, gid: u32, candidates: Vec<u32>, participants_only: bool) -> Result<(), ErrorCode>;
} }

View file

@ -153,6 +153,7 @@ macro_rules! define_rmc_proto {
$($protocol:path),* $($protocol:path),*
}) => { }) => {
paste::paste!{ paste::paste!{
#[allow(unused_variables)]
pub trait [<Local $name>]: std::any::Any $( + [<Raw $protocol>] + $protocol)* { pub trait [<Local $name>]: std::any::Any $( + [<Raw $protocol>] + $protocol)* {
async fn rmc_call(&self, remote_response_connection: &rnex_core::util::SendingBufferConnection, protocol_id: u16, method_id: u32, call_id: u32, rest: Vec<u8>){ async fn rmc_call(&self, remote_response_connection: &rnex_core::util::SendingBufferConnection, protocol_id: u16, method_id: u32, call_id: u32, rest: Vec<u8>){
match protocol_id{ match protocol_id{

View file

@ -1,8 +1,6 @@
use std::array::from_fn;
use std::io::{Read, Write}; use std::io::{Read, Write};
use std::mem::MaybeUninit; use std::mem::MaybeUninit;
use bytemuck::bytes_of; use bytemuck::bytes_of;
use serde::Serialize;
use v_byte_helpers::{IS_BIG_ENDIAN, ReadExtensions}; use v_byte_helpers::{IS_BIG_ENDIAN, ReadExtensions};
use crate::rmc::structures::RmcSerialize; use crate::rmc::structures::RmcSerialize;

View file

@ -49,10 +49,10 @@ pub trait RmcSerialize{
} }
impl RmcSerialize for (){ impl RmcSerialize for (){
fn serialize(&self, writer: &mut dyn Write) -> Result<()> { fn serialize(&self, _writer: &mut dyn Write) -> Result<()> {
Ok(()) Ok(())
} }
fn deserialize(reader: &mut dyn Read) -> Result<Self> { fn deserialize(_reader: &mut dyn Read) -> Result<Self> {
Ok(()) Ok(())
} }

View file

@ -81,7 +81,9 @@ impl SplittableBufferConnection {
} }
} }
} }
stream.shutdown().await; if let Err(e) = stream.shutdown().await{
error!("failed to shut down stream: {}", e);
}
}); });
} }

View file

@ -13,7 +13,7 @@ struct RnexApiAuth;
impl<'r> FromRequest<'r> for RnexApiAuth{ impl<'r> FromRequest<'r> for RnexApiAuth{
type Error = (); type Error = ();
async fn from_request<'a>(request: &'r Request<'a>) -> Outcome<Self, Self::Error> { async fn from_request<'a>(_request: &'r Request<'a>) -> Outcome<Self, Self::Error> {
Outcome::Success(RnexApiAuth) Outcome::Success(RnexApiAuth)
} }
} }