From c698e0b3dd749d9d02c015231f76f87f06ce9328 Mon Sep 17 00:00:00 2001 From: Maple Date: Tue, 7 Oct 2025 20:39:52 +0200 Subject: [PATCH] chore: anti pretendo people note and cleanup --- Cargo.lock | 542 +----------------- README.md | 15 +- macros/Cargo.toml | 1 - macros/src/protos.rs | 2 + prudpv1/src/executables/proxy_insecure.rs | 15 +- prudpv1/src/executables/proxy_secure.rs | 17 +- prudpv1/src/prudp/auth_module.rs | 4 +- prudpv1/src/prudp/router.rs | 13 +- prudpv1/src/prudp/socket.rs | 2 +- prudpv1/src/prudp/unsecure.rs | 2 +- rnex-core/Cargo.toml | 14 - .../executables/backend_server_insecure.rs | 25 +- .../src/executables/backend_server_secure.rs | 10 +- rnex-core/src/executables/common.rs | 7 +- .../executables/edge_node_holder_server.rs | 3 +- rnex-core/src/main.rs | 29 +- rnex-core/src/nex/matchmake.rs | 4 +- rnex-core/src/prudp/socket_addr.rs | 2 +- rnex-core/src/reggie.rs | 29 +- rnex-core/src/rmc/protocols/matchmake.rs | 2 - rnex-core/src/rmc/protocols/mod.rs | 1 + rnex-core/src/rmc/structures/list.rs | 2 - rnex-core/src/rmc/structures/mod.rs | 4 +- rnex-core/src/util.rs | 4 +- rnex-core/src/web/mod.rs | 2 +- 25 files changed, 69 insertions(+), 682 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d7d6490..fb9c740 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -41,12 +41,6 @@ dependencies = [ "libc", ] -[[package]] -name = "anyhow" -version = "1.0.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" - [[package]] name = "async-stream" version = "0.3.6" @@ -107,29 +101,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" 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]] name = "axum" version = "0.7.9" @@ -198,41 +169,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "base64ct" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" - [[package]] name = "binascii" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" 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]] name = "bitflags" version = "2.9.1" @@ -274,12 +216,6 @@ dependencies = [ "syn 2.0.104", ] -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - [[package]] name = "bytes" version = "1.10.1" @@ -292,20 +228,9 @@ version = "1.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3a42d84bb6b69d3a8b3eaacf0d88f179e1929695e1ad012b6cf64d9caaa5fd2" dependencies = [ - "jobserver", - "libc", "shlex", ] -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfg-if" version = "1.0.1" @@ -318,17 +243,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" 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]] name = "chrono" version = "0.4.41" @@ -353,32 +267,6 @@ dependencies = [ "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]] name = "cookie" version = "0.18.1" @@ -406,15 +294,6 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - [[package]] name = "crypto-common" version = "0.1.6" @@ -435,23 +314,6 @@ dependencies = [ "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]] name = "deranged" version = "0.4.0" @@ -501,7 +363,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", - "const-oid", "crypto-common", "subtle", ] @@ -523,12 +384,6 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" -[[package]] -name = "dunce" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" - [[package]] name = "either" version = "1.15.0" @@ -610,12 +465,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - [[package]] name = "futures" version = "0.3.31" @@ -624,7 +473,6 @@ checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", - "futures-executor", "futures-io", "futures-sink", "futures-task", @@ -647,34 +495,12 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" 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]] name = "futures-io" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" 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]] name = "futures-sink" version = "0.3.31" @@ -696,7 +522,6 @@ dependencies = [ "futures-channel", "futures-core", "futures-io", - "futures-macro", "futures-sink", "futures-task", "memchr", @@ -834,15 +659,6 @@ dependencies = [ "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]] name = "http" version = "0.2.12" @@ -1232,40 +1048,12 @@ dependencies = [ "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]] name = "itoa" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" 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]] name = "js-sys" version = "0.3.77" @@ -1287,15 +1075,6 @@ name = "lazy_static" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -dependencies = [ - "spin", -] - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" @@ -1303,28 +1082,6 @@ version = "0.2.174" source = "registry+https://github.com/rust-lang/crates.io-index" 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]] name = "linux-raw-sys" version = "0.9.4" @@ -1374,7 +1131,6 @@ version = "0.0.0" dependencies = [ "proc-macro2", "quote", - "rand 0.9.2", "syn 2.0.104", ] @@ -1425,12 +1181,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.8.9" @@ -1499,16 +1249,6 @@ dependencies = [ "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]] name = "nu-ansi-term" version = "0.46.0" @@ -1519,49 +1259,12 @@ dependencies = [ "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]] name = "num-conv" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" 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]] name = "num-traits" version = "0.2.19" @@ -1569,7 +1272,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", - "libm", ] [[package]] @@ -1708,15 +1410,6 @@ dependencies = [ "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]] name = "percent-encoding" version = "2.3.1" @@ -1755,27 +1448,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" 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]] name = "pkg-config" version = "0.3.32" @@ -1806,16 +1478,6 @@ dependencies = [ "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]] name = "proc-macro2" version = "1.0.95" @@ -1845,20 +1507,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" dependencies = [ "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]] @@ -1901,18 +1549,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[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", + "rand_chacha", + "rand_core", ] [[package]] @@ -1922,17 +1560,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", -] - -[[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", + "rand_core", ] [[package]] @@ -1944,15 +1572,6 @@ dependencies = [ "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]] name = "rc4" version = "0.1.0" @@ -2093,14 +1712,11 @@ dependencies = [ name = "rnex-core" version = "0.1.1" dependencies = [ - "anyhow", "async-trait", "bytemuck", - "chacha20", "chrono", "ctrlc", "dotenv", - "futures", "hex", "hmac", "json", @@ -2109,25 +1725,14 @@ dependencies = [ "md-5", "once_cell", "paste", - "prost", - "rand 0.8.5", + "rand", "rc4", "reqwest", "rocket", - "rsa", - "rustls", - "rustls-pki-types", - "rustls-webpki", - "serde", - "sha2", "simplelog", "thiserror", "tokio", - "tokio-rustls", - "tokio-stream", - "tokio-tungstenite", "tonic", - "tungstenite", "typenum", "v-byte-helpers", ] @@ -2153,7 +1758,7 @@ dependencies = [ "num_cpus", "parking_lot", "pin-project-lite", - "rand 0.8.5", + "rand", "ref-cast", "rocket_codegen", "rocket_http", @@ -2214,51 +1819,12 @@ dependencies = [ "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]] name = "rustc-demangle" version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" 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]] name = "rustix" version = "1.0.8" @@ -2268,7 +1834,7 @@ dependencies = [ "bitflags", "errno", "libc", - "linux-raw-sys 0.9.4", + "linux-raw-sys", "windows-sys 0.60.2", ] @@ -2278,8 +1844,6 @@ version = "0.23.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" dependencies = [ - "aws-lc-rs", - "log", "once_cell", "rustls-pki-types", "rustls-webpki", @@ -2302,7 +1866,6 @@ version = "0.103.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" dependencies = [ - "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -2417,28 +1980,6 @@ dependencies = [ "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]] name = "sharded-slab" version = "0.1.7" @@ -2463,16 +2004,6 @@ dependencies = [ "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]] name = "simplelog" version = "0.12.2" @@ -2522,16 +2053,6 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" 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]] name = "stable-pattern" version = "0.1.0" @@ -2634,7 +2155,7 @@ dependencies = [ "fastrand", "getrandom 0.3.3", "once_cell", - "rustix 1.0.8", + "rustix", "windows-sys 0.59.0", ] @@ -2781,18 +2302,6 @@ dependencies = [ "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]] name = "tokio-util" version = "0.7.15" @@ -2888,7 +2397,7 @@ dependencies = [ "indexmap 1.9.3", "pin-project", "pin-project-lite", - "rand 0.8.5", + "rand", "slab", "tokio", "tokio-util", @@ -3009,23 +2518,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" 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]] name = "typenum" version = "1.18.0" @@ -3080,12 +2572,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - [[package]] name = "utf8_iter" version = "1.0.4" @@ -3224,18 +2710,6 @@ dependencies = [ "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]] name = "winapi" version = "0.3.9" diff --git a/README.md b/README.md index f0526a0..c5f1ada 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,17 @@ - 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/) - Splatfestival testing team for helping us test our messes of code -- The SPFN team(Bloxer, Ceantix and Maple(aka TV)) \ No newline at end of file +- 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. diff --git a/macros/Cargo.toml b/macros/Cargo.toml index e301949..d0bb83b 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -13,5 +13,4 @@ proc-macro = true quote = "1.0.38" proc-macro2 = "1.0.93" syn = { version = "2.0.98", features = ["full"] } -rand = "0.9.0" diff --git a/macros/src/protos.rs b/macros/src/protos.rs index 711e931..a19f01e 100644 --- a/macros/src/protos.rs +++ b/macros/src/protos.rs @@ -39,6 +39,7 @@ impl RmcProtocolData{ // boilerplate tokens which all raw traits need quote!{ #[doc(hidden)] + #[allow(unused_must_use)] pub trait #raw_name: #name }.to_tokens(tokens); @@ -209,6 +210,7 @@ impl RmcProtocolData{ // boilerplate tokens which all raw traits need quote!{ #[doc(hidden)] + #[allow(unused_must_use)] pub trait #remote_name: rnex_core::rmc::protocols::HasRmcConnection }.to_tokens(tokens); diff --git a/prudpv1/src/executables/proxy_insecure.rs b/prudpv1/src/executables/proxy_insecure.rs index 3ffe039..b33e069 100644 --- a/prudpv1/src/executables/proxy_insecure.rs +++ b/prudpv1/src/executables/proxy_insecure.rs @@ -2,17 +2,11 @@ use rnex_core::reggie::UnitPacketRead; use rnex_core::reggie::UnitPacketWrite; use rnex_core::rmc::structures::RmcSerialize; -use std::env; -use std::ffi::CStr; -use std::io::{Read, Write}; -use std::net::{Ipv4Addr, SocketAddrV4}; -use std::sync::{Arc, OnceLock}; +use std::net::SocketAddrV4; +use std::sync::Arc; use std::time::Duration; -use bytemuck::{Pod, Zeroable}; -use log::{error, warn}; -use once_cell::sync::Lazy; -use tokio::net::{TcpSocket, TcpStream}; -use tokio::sync::RwLock; +use log::error; +use tokio::net::TcpStream; use tokio::task; use tokio::time::sleep; use prudpv1::executables::common::{FORWARD_DESTINATION, EDGE_NODE_HOLDER}; @@ -110,4 +104,5 @@ async fn main() { } }); } + drop(conn); } \ No newline at end of file diff --git a/prudpv1/src/executables/proxy_secure.rs b/prudpv1/src/executables/proxy_secure.rs index b66fbc2..91a66fa 100644 --- a/prudpv1/src/executables/proxy_secure.rs +++ b/prudpv1/src/executables/proxy_secure.rs @@ -1,23 +1,16 @@ use rnex_core::reggie::UnitPacketRead; use rnex_core::reggie::UnitPacketWrite; use rnex_core::rmc::structures::RmcSerialize; -use std::env; -use std::ffi::CStr; -use std::io::{Read, Write}; -use std::net::{Ipv4Addr, SocketAddrV4}; -use std::sync::{Arc, OnceLock}; +use std::net::SocketAddrV4; +use std::sync::Arc; use std::time::Duration; -use bytemuck::{Pod, Zeroable}; -use log::{error, warn}; -use once_cell::sync::Lazy; -use tokio::net::{TcpSocket, TcpStream}; -use tokio::sync::RwLock; +use log::error; +use tokio::net::TcpStream; use tokio::task; use tokio::time::sleep; use prudpv1::executables::common::{FORWARD_DESTINATION, EDGE_NODE_HOLDER}; use prudpv1::prudp::router::Router; use prudpv1::prudp::secure::Secure; -use prudpv1::prudp::unsecure::Unsecure; use rnex_core::common::setup; use rnex_core::executables::common::{OWN_IP_PRIVATE, OWN_IP_PUBLIC, SECURE_SERVER_ACCOUNT, SERVER_PORT}; use rnex_core::prudp::virtual_port::VirtualPort; @@ -113,4 +106,6 @@ async fn main() { } }); } + + drop(conn); } \ No newline at end of file diff --git a/prudpv1/src/prudp/auth_module.rs b/prudpv1/src/prudp/auth_module.rs index d7e93b0..28659d6 100644 --- a/prudpv1/src/prudp/auth_module.rs +++ b/prudpv1/src/prudp/auth_module.rs @@ -1,8 +1,8 @@ +/* use std::net::Ipv4Addr; - pub trait AuthModule{ fn get_auth_key(addr: Ipv4Addr) -> [u8; 32]; -} +}*/ /* struct AuthServerAuthModule; diff --git a/prudpv1/src/prudp/router.rs b/prudpv1/src/prudp/router.rs index 3212155..ca28dd6 100644 --- a/prudpv1/src/prudp/router.rs +++ b/prudpv1/src/prudp/router.rs @@ -1,14 +1,12 @@ -use std::{env, io}; +use std::io; use std::io::Cursor; use std::marker::PhantomData; use tokio::net::UdpSocket; use std::net::{SocketAddr, SocketAddrV4}; use std::net::SocketAddr::V4; use std::sync::{Arc, Weak}; -use std::sync::atomic::{AtomicBool}; use std::time::Duration; use tokio::task::JoinHandle; -use once_cell::sync::Lazy; use log::{error, info}; use thiserror::Error; use tokio::select; @@ -19,16 +17,11 @@ use crate::prudp::packet::{PRUDPV1Packet}; use rnex_core::prudp::virtual_port::VirtualPort; use crate::prudp::router::Error::VirtualPortTaken; -static SERVER_DATAGRAMS: Lazy = Lazy::new(||{ - env::var("SERVER_DATAGRAM_COUNT").ok() - .and_then(|s| s.parse().ok()) - .unwrap_or(1) -}); pub struct Router { endpoints: RwLock<[Option>; 16]>, - running: AtomicBool, + //running: AtomicBool, socket: Arc, _no_outside_construction: PhantomData<()> } @@ -114,7 +107,7 @@ impl Router { let own_impl = Router { endpoints: Default::default(), - running: AtomicBool::new(true), + // running: AtomicBool::new(true), socket: socket.clone(), _no_outside_construction: Default::default() }; diff --git a/prudpv1/src/prudp/socket.rs b/prudpv1/src/prudp/socket.rs index dde9b4d..4aca993 100644 --- a/prudpv1/src/prudp/socket.rs +++ b/prudpv1/src/prudp/socket.rs @@ -679,7 +679,7 @@ impl AnyInternalSocket for InternalSocket { 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"); return None; }; diff --git a/prudpv1/src/prudp/unsecure.rs b/prudpv1/src/prudp/unsecure.rs index 6d7d9ff..6c45824 100644 --- a/prudpv1/src/prudp/unsecure.rs +++ b/prudpv1/src/prudp/unsecure.rs @@ -78,7 +78,7 @@ impl CryptoHandlerConnectionInstance for UnsecureInstance { 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 } } \ No newline at end of file diff --git a/rnex-core/Cargo.toml b/rnex-core/Cargo.toml index 8a5c9bd..b41bc8d 100644 --- a/rnex-core/Cargo.toml +++ b/rnex-core/Cargo.toml @@ -13,38 +13,24 @@ v-byte-helpers = { git = "https://github.com/DJMrTV/VByteMacros", version = "0.1 simplelog = "0.12.2" chrono = "0.4.39" log = "0.4.25" -anyhow = "1.0.95" rand = "0.8.5" hmac = "0.12.1" md-5 = "^0.10.6" 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" -prost = "0.13.4" hex = "0.4.3" macros = { path = "../macros" } rocket = { version = "0.5.1", features = ["json", "serde_json"] } -serde = { version = "1.0.217", features = ["derive"] } async-trait = "0.1.86" paste = "1.0.15" typenum = "1.18.0" -futures = "0.3.31" reqwest = "0.12.18" json = "0.12.4" 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]] diff --git a/rnex-core/src/executables/backend_server_insecure.rs b/rnex-core/src/executables/backend_server_insecure.rs index 005936b..7a9f88a 100644 --- a/rnex-core/src/executables/backend_server_insecure.rs +++ b/rnex-core/src/executables/backend_server_insecure.rs @@ -1,32 +1,17 @@ use rnex_core::reggie::{RemoteEdgeNodeHolder, UnitPacketRead}; use log::{error, info}; 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 std::borrow::ToOwned; -use std::{env, fs}; +use std::{env}; use std::io::Cursor; -use std::net::{IpAddr, Ipv4Addr, SocketAddr, SocketAddrV4}; +use std::net::SocketAddrV4; use std::sync::Arc; -use macros::{method_id, rmc_proto, rmc_struct}; -use tokio::io::AsyncReadExt; -use tokio::net::{TcpListener, TcpSocket, TcpStream}; +use tokio::net::{TcpListener, TcpStream}; 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::nex::auth_handler::AuthHandler; use rnex_core::reggie::EdgeNodeHolderConnectOption::DontRegister; 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::rnex_proxy_common::ConnectionInitData; 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{ Ok(v) => v, Err(e) => { @@ -68,7 +53,7 @@ async fn main() { 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, Err(e) => { error!("an error ocurred whilest reading connection data: {:?}", e); diff --git a/rnex-core/src/executables/backend_server_secure.rs b/rnex-core/src/executables/backend_server_secure.rs index f758679..82d1a39 100644 --- a/rnex-core/src/executables/backend_server_secure.rs +++ b/rnex-core/src/executables/backend_server_secure.rs @@ -1,22 +1,20 @@ use std::io::Cursor; use rnex_core::rmc::structures::RmcSerialize; -use rnex_core::reggie::{RemoteEdgeNodeHolder, UnitPacketRead}; +use rnex_core::reggie::UnitPacketRead; use std::net::SocketAddrV4; use std::sync::Arc; use std::sync::atomic::AtomicU32; use log::{error, info}; -use tokio::net::{TcpListener, TcpStream}; +use tokio::net::TcpListener; use tokio::task; use rnex_core::common::setup; use rnex_core::executables::common::{OWN_IP_PRIVATE, SERVER_PORT}; use rnex_core::nex::matchmake::MatchmakeManager; use rnex_core::nex::remote_console::RemoteConsole; use rnex_core::nex::user::User; -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; use rnex_core::rnex_proxy_common::ConnectionInitData; use rnex_core::rmc::protocols::RemoteInstantiatable; -use rnex_core::util::SplittableBufferConnection; #[tokio::main] async fn main() { @@ -35,7 +33,7 @@ async fn main() { 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{ Ok(v) => v, Err(e) => { diff --git a/rnex-core/src/executables/common.rs b/rnex-core/src/executables/common.rs index 77bccf7..f12a84c 100644 --- a/rnex-core/src/executables/common.rs +++ b/rnex-core/src/executables/common.rs @@ -1,12 +1,7 @@ use std::env; -use std::net::{Ipv4Addr, SocketAddrV4}; -use macros::{method_id, rmc_proto, RmcSerialize}; +use std::net::Ipv4Addr; 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::rmc::response::ErrorCode; pub static OWN_IP_PRIVATE: Lazy = Lazy::new(|| { env::var("SERVER_IP") diff --git a/rnex-core/src/executables/edge_node_holder_server.rs b/rnex-core/src/executables/edge_node_holder_server.rs index 5146a86..ea798c5 100644 --- a/rnex-core/src/executables/edge_node_holder_server.rs +++ b/rnex-core/src/executables/edge_node_holder_server.rs @@ -1,7 +1,6 @@ use std::io::Cursor; use std::net::SocketAddrV4; use std::sync::{Arc, Weak}; -use log::error; use macros::rmc_struct; use tokio::net::TcpListener; use tokio::sync::RwLock; @@ -56,7 +55,7 @@ async fn main() { let holder: Arc = 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 Some(data) = conn.recv().await else { diff --git a/rnex-core/src/main.rs b/rnex-core/src/main.rs index b3b226b..0af4975 100644 --- a/rnex-core/src/main.rs +++ b/rnex-core/src/main.rs @@ -11,40 +11,15 @@ extern crate self as rust_nex; 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 log::{error, info}; -use macros::rmc_struct; use once_cell::sync::Lazy; use simplelog::{ ColorChoice, CombinedLogger, Config, LevelFilter, TermLogger, TerminalMode, WriteLogger, }; use std::fs::File; -use std::marker::PhantomData; -use std::net::{Ipv4Addr, SocketAddrV4}; -use std::ops::{BitAnd, BitOr}; -use std::str::FromStr; -use std::sync::{Arc, Once, Weak}; -use std::time::Duration; +use std::net::{Ipv4Addr}; +use std::sync::Once; 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; pub mod rmc; diff --git a/rnex-core/src/nex/matchmake.rs b/rnex-core/src/nex/matchmake.rs index 1f4f61a..93e8ced 100644 --- a/rnex-core/src/nex/matchmake.rs +++ b/rnex-core/src/nex/matchmake.rs @@ -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 && joining_pid == self.session.gathering.owner_pid{ continue; @@ -341,7 +341,7 @@ impl ExtendedMatchmakeSession{ } 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; diff --git a/rnex-core/src/prudp/socket_addr.rs b/rnex-core/src/prudp/socket_addr.rs index f3ea10c..5c55e88 100644 --- a/rnex-core/src/prudp/socket_addr.rs +++ b/rnex-core/src/prudp/socket_addr.rs @@ -28,7 +28,7 @@ impl PRUDPSockAddr{ pub fn calculate_connection_signature(&self) -> [u8; 16] { 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()); hmac.write_all(&data).expect("figuring this out was complete ass"); diff --git a/rnex-core/src/reggie.rs b/rnex-core/src/reggie.rs index b3d73c9..47bf2d2 100644 --- a/rnex-core/src/reggie.rs +++ b/rnex-core/src/reggie.rs @@ -1,29 +1,8 @@ -use std::{env, fs, io}; -use std::hash::Hash; -use std::io::{Error, ErrorKind}; -use std::net::{SocketAddrV4, ToSocketAddrs}; -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 std::io; +use std::net::SocketAddrV4; +use macros::{method_id, rmc_proto, RmcSerialize}; +use tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt}; 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 crate::rmc::structures::RmcSerialize; diff --git a/rnex-core/src/rmc/protocols/matchmake.rs b/rnex-core/src/rmc/protocols/matchmake.rs index 24942c0..595127a 100644 --- a/rnex-core/src/rmc/protocols/matchmake.rs +++ b/rnex-core/src/rmc/protocols/matchmake.rs @@ -8,10 +8,8 @@ pub trait Matchmake{ async fn unregister_gathering(&self, gid: u32) -> Result; #[method_id(41)] async fn get_session_urls(&self, gid: u32) -> Result, ErrorCode>; - #[method_id(42)] async fn update_session_host(&self, gid: u32, change_owner: bool) -> Result<(), ErrorCode>; - #[method_id(44)] async fn migrate_gathering_ownership(&self, gid: u32, candidates: Vec, participants_only: bool) -> Result<(), ErrorCode>; } \ No newline at end of file diff --git a/rnex-core/src/rmc/protocols/mod.rs b/rnex-core/src/rmc/protocols/mod.rs index 7ad8e8c..0b6fc65 100644 --- a/rnex-core/src/rmc/protocols/mod.rs +++ b/rnex-core/src/rmc/protocols/mod.rs @@ -153,6 +153,7 @@ macro_rules! define_rmc_proto { $($protocol:path),* }) => { paste::paste!{ + #[allow(unused_variables)] pub trait []: std::any::Any $( + [] + $protocol)* { async fn rmc_call(&self, remote_response_connection: &rnex_core::util::SendingBufferConnection, protocol_id: u16, method_id: u32, call_id: u32, rest: Vec){ match protocol_id{ diff --git a/rnex-core/src/rmc/structures/list.rs b/rnex-core/src/rmc/structures/list.rs index 1ebb60b..f4843c1 100644 --- a/rnex-core/src/rmc/structures/list.rs +++ b/rnex-core/src/rmc/structures/list.rs @@ -1,8 +1,6 @@ -use std::array::from_fn; use std::io::{Read, Write}; use std::mem::MaybeUninit; use bytemuck::bytes_of; -use serde::Serialize; use v_byte_helpers::{IS_BIG_ENDIAN, ReadExtensions}; use crate::rmc::structures::RmcSerialize; diff --git a/rnex-core/src/rmc/structures/mod.rs b/rnex-core/src/rmc/structures/mod.rs index fd6d61d..9d127f7 100644 --- a/rnex-core/src/rmc/structures/mod.rs +++ b/rnex-core/src/rmc/structures/mod.rs @@ -49,10 +49,10 @@ pub trait RmcSerialize{ } impl RmcSerialize for (){ - fn serialize(&self, writer: &mut dyn Write) -> Result<()> { + fn serialize(&self, _writer: &mut dyn Write) -> Result<()> { Ok(()) } - fn deserialize(reader: &mut dyn Read) -> Result { + fn deserialize(_reader: &mut dyn Read) -> Result { Ok(()) } diff --git a/rnex-core/src/util.rs b/rnex-core/src/util.rs index b052fe2..ff0150c 100644 --- a/rnex-core/src/util.rs +++ b/rnex-core/src/util.rs @@ -81,7 +81,9 @@ impl SplittableBufferConnection { } } } - stream.shutdown().await; + if let Err(e) = stream.shutdown().await{ + error!("failed to shut down stream: {}", e); + } }); } diff --git a/rnex-core/src/web/mod.rs b/rnex-core/src/web/mod.rs index cd2bcf2..9412967 100644 --- a/rnex-core/src/web/mod.rs +++ b/rnex-core/src/web/mod.rs @@ -13,7 +13,7 @@ struct RnexApiAuth; impl<'r> FromRequest<'r> for RnexApiAuth{ type Error = (); - async fn from_request<'a>(request: &'r Request<'a>) -> Outcome { + async fn from_request<'a>(_request: &'r Request<'a>) -> Outcome { Outcome::Success(RnexApiAuth) } }