From 170f34cd0ad62ede11ed2f06190c4256cae2dacc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piyush=20=E0=A4=AE=E0=A4=BF=E0=A4=B6=E0=A5=8D=E0=A4=B0?= Date: Fri, 16 Jun 2023 18:09:15 +0530 Subject: [PATCH 1/5] Changes * Removed rate limiter becase it was unmaintained * updated base64, rustls --- Cargo.lock | 1082 ++++++++++++++++++++++++++++++++------------------- Cargo.toml | 11 +- src/main.rs | 19 +- 3 files changed, 689 insertions(+), 423 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b377333..4a9c1b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1be241f88f3b1e7e9a3fbe3b5a8a0f6915b5a1d7ee0d9a248d3376d01068cc60" dependencies = [ - "actix-rt", + "actix-rt 1.1.1", "actix_derive", "bitflags", "bytes 0.5.6", @@ -54,46 +54,63 @@ dependencies = [ "tokio-util 0.3.1", ] +[[package]] +name = "actix-codec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617a8268e3537fe1d8c9ead925fca49ef6400927ee7bc26750e90ecee14ce4b8" +dependencies = [ + "bitflags", + "bytes 1.1.0", + "futures-core", + "futures-sink", + "memchr", + "pin-project-lite 0.2.8", + "tokio 1.15.0", + "tokio-util 0.7.2", + "tracing", +] + [[package]] name = "actix-connect" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "177837a10863f15ba8d3ae3ec12fac1099099529ed20083a27fdfe247381d0dc" dependencies = [ - "actix-codec", - "actix-rt", - "actix-service", - "actix-utils", + "actix-codec 0.3.0", + "actix-rt 1.1.1", + "actix-service 1.0.6", + "actix-utils 2.0.0", "derive_more", "either", "futures-util", "http", "log", - "rustls", - "tokio-rustls", "trust-dns-proto", "trust-dns-resolver", - "webpki", ] [[package]] name = "actix-files" -version = "0.5.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51e8a9146c12fce92a6e4c24b8c4d9b05268130bfd8d61bc587e822c32ce689" +checksum = "d832782fac6ca7369a70c9ee9a20554623c5e51c76e190ad151780ebea1cf689" dependencies = [ - "actix-service", - "actix-web", + "actix-http 3.2.2", + "actix-service 2.0.2", + "actix-utils 3.0.1", + "actix-web 4.2.1", + "askama_escape", "bitflags", - "bytes 0.5.6", + "bytes 1.1.0", "derive_more", "futures-core", - "futures-util", + "http-range", "log", "mime", "mime_guess", "percent-encoding", - "v_htmlescape", + "pin-project-lite 0.2.8", ] [[package]] @@ -102,34 +119,30 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cb8958da437716f3f31b0e76f8daf36554128517d7df37ceba7df00f09622ee" dependencies = [ - "actix", - "actix-codec", + "actix-codec 0.3.0", "actix-connect", - "actix-rt", - "actix-service", + "actix-rt 1.1.1", + "actix-service 1.0.6", "actix-threadpool", - "actix-tls", - "actix-utils", + "actix-utils 2.0.0", "base64 0.13.0", "bitflags", - "brotli2", "bytes 0.5.6", - "cookie", + "cookie 0.14.4", "copyless", "derive_more", "either", "encoding_rs", - "flate2", "futures-channel", "futures-core", "futures-util", "fxhash", - "h2", + "h2 0.2.7", "http", "httparse", "indexmap", "itoa 0.4.8", - "language-tags", + "language-tags 0.2.2", "lazy_static", "log", "mime", @@ -142,7 +155,45 @@ dependencies = [ "serde_urlencoded", "sha-1", "slab", - "time", + "time 0.2.27", +] + +[[package]] +name = "actix-http" +version = "3.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c83abf9903e1f0ad9973cc4f7b9767fd5a03a583f51a5b7a339e07987cd2724" +dependencies = [ + "actix-codec 0.5.1", + "actix-rt 2.7.0", + "actix-service 2.0.2", + "actix-tls 3.0.3", + "actix-utils 3.0.1", + "ahash", + "base64 0.13.0", + "bitflags", + "brotli", + "bytes 1.1.0", + "bytestring", + "derive_more", + "encoding_rs", + "flate2", + "futures-core", + "h2 0.3.19", + "http", + "httparse", + "httpdate", + "itoa 1.0.1", + "language-tags 0.3.2", + "local-channel", + "mime", + "percent-encoding", + "pin-project-lite 0.2.8", + "rand 0.8.4", + "sha1 0.10.5", + "smallvec", + "tracing", + "zstd", ] [[package]] @@ -152,25 +203,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ca8ce00b267af8ccebbd647de0d61e0674b6e61185cc7a592ff88772bed655" dependencies = [ "quote", - "syn", + "syn 1.0.85", ] [[package]] -name = "actix-ratelimit" -version = "0.3.1" +name = "actix-macros" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cab6838f2c71885e4985a61ab96ea9968121c2a41ef416b76875f61091f7d73" +checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" dependencies = [ - "actix", - "actix-http", - "actix-web", - "backoff", - "dashmap", - "failure", - "futures", - "log", - "r2d2-memcache", - "redis", + "quote", + "syn 1.0.85", ] [[package]] @@ -186,13 +229,26 @@ dependencies = [ "serde", ] +[[package]] +name = "actix-router" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66ff4d247d2b160861fa2866457e85706833527840e4133f8f49aa423a38799" +dependencies = [ + "bytestring", + "http", + "regex", + "serde", + "tracing", +] + [[package]] name = "actix-rt" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "143fcc2912e0d1de2bcf4e2f720d2a60c28652ab4179685a1ee159e0fb3db227" dependencies = [ - "actix-macros", + "actix-macros 0.1.3", "actix-threadpool", "copyless", "futures-channel", @@ -201,24 +257,52 @@ dependencies = [ "tokio 0.2.25", ] +[[package]] +name = "actix-rt" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ea16c295198e958ef31930a6ef37d0fb64e9ca3b6116e6b93a8bdae96ee1000" +dependencies = [ + "futures-core", + "tokio 1.15.0", +] + [[package]] name = "actix-server" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45407e6e672ca24784baa667c5d32ef109ccdd8d5e0b5ebb9ef8a67f4dfb708e" dependencies = [ - "actix-codec", - "actix-rt", - "actix-service", - "actix-utils", + "actix-codec 0.3.0", + "actix-rt 1.1.1", + "actix-service 1.0.6", + "actix-utils 2.0.0", "futures-channel", "futures-util", "log", - "mio", + "mio 0.6.23", "mio-uds", "num_cpus", "slab", - "socket2", + "socket2 0.3.19", +] + +[[package]] +name = "actix-server" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0da34f8e659ea1b077bb4637948b815cd3768ad5a188fdcd74ff4d84240cd824" +dependencies = [ + "actix-rt 2.7.0", + "actix-service 2.0.2", + "actix-utils 3.0.1", + "futures-core", + "futures-util", + "mio 0.8.8", + "num_cpus", + "socket2 0.4.9", + "tokio 1.15.0", + "tracing", ] [[package]] @@ -231,18 +315,29 @@ dependencies = [ "pin-project 0.4.29", ] +[[package]] +name = "actix-service" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b894941f818cfdc7ccc4b9e60fa7e53b5042a2e8567270f9147d5591893373a" +dependencies = [ + "futures-core", + "paste", + "pin-project-lite 0.2.8", +] + [[package]] name = "actix-testing" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47239ca38799ab74ee6a8a94d1ce857014b2ac36f242f70f3f75a66f691e791c" dependencies = [ - "actix-macros", - "actix-rt", - "actix-server", - "actix-service", + "actix-macros 0.1.3", + "actix-rt 1.1.1", + "actix-server 1.0.4", + "actix-service 1.0.6", "log", - "socket2", + "socket2 0.3.19", ] [[package]] @@ -266,13 +361,27 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24789b7d7361cf5503a504ebe1c10806896f61e96eca9a7350e23001aca715fb" dependencies = [ - "actix-codec", - "actix-service", - "actix-utils", + "actix-codec 0.3.0", + "actix-service 1.0.6", + "actix-utils 2.0.0", "futures-util", - "rustls", +] + +[[package]] +name = "actix-tls" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fde0cf292f7cdc7f070803cb9a0d45c018441321a78b1042ffbbb81ec333297" +dependencies = [ + "actix-codec 0.5.1", + "actix-rt 2.7.0", + "actix-service 2.0.2", + "actix-utils 3.0.1", + "futures-core", + "log", + "pin-project-lite 0.2.8", "tokio-rustls", - "webpki", + "tokio-util 0.7.2", "webpki-roots", ] @@ -282,9 +391,9 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e9022dec56632d1d7979e59af14f0597a28a830a9c1c7fec8b2327eb9f16b5a" dependencies = [ - "actix-codec", - "actix-rt", - "actix-service", + "actix-codec 0.3.0", + "actix-rt 1.1.1", + "actix-service 1.0.6", "bitflags", "bytes 0.5.6", "either", @@ -296,24 +405,34 @@ dependencies = [ "slab", ] +[[package]] +name = "actix-utils" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" +dependencies = [ + "local-waker", + "pin-project-lite 0.2.8", +] + [[package]] name = "actix-web" version = "3.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6534a126df581caf443ba2751cab42092c89b3f1d06a9d829b1e17edfe3e277" dependencies = [ - "actix-codec", - "actix-http", - "actix-macros", - "actix-router", - "actix-rt", - "actix-server", - "actix-service", + "actix-codec 0.3.0", + "actix-http 2.2.1", + "actix-macros 0.1.3", + "actix-router 0.2.7", + "actix-rt 1.1.1", + "actix-server 1.0.4", + "actix-service 1.0.6", "actix-testing", "actix-threadpool", - "actix-tls", - "actix-utils", - "actix-web-codegen", + "actix-tls 2.0.0", + "actix-utils 2.0.0", + "actix-web-codegen 0.4.0", "awc", "bytes 0.5.6", "derive_more", @@ -326,16 +445,57 @@ dependencies = [ "mime", "pin-project 1.0.10", "regex", - "rustls", "serde", "serde_json", "serde_urlencoded", - "socket2", - "time", + "socket2 0.3.19", + "time 0.2.27", "tinyvec", "url", ] +[[package]] +name = "actix-web" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d48f7b6534e06c7bfc72ee91db7917d4af6afe23e7d223b51e68fffbb21e96b9" +dependencies = [ + "actix-codec 0.5.1", + "actix-http 3.2.2", + "actix-macros 0.2.3", + "actix-router 0.5.1", + "actix-rt 2.7.0", + "actix-server 2.1.1", + "actix-service 2.0.2", + "actix-tls 3.0.3", + "actix-utils 3.0.1", + "actix-web-codegen 4.2.0", + "ahash", + "bytes 1.1.0", + "bytestring", + "cfg-if 1.0.0", + "cookie 0.16.2", + "derive_more", + "encoding_rs", + "futures-core", + "futures-util", + "http", + "itoa 1.0.1", + "language-tags 0.3.2", + "log", + "mime", + "once_cell", + "pin-project-lite 0.2.8", + "regex", + "serde", + "serde_json", + "serde_urlencoded", + "smallvec", + "socket2 0.4.9", + "time 0.3.22", + "url", +] + [[package]] name = "actix-web-actors" version = "3.0.0" @@ -343,9 +503,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f6edf3c2693e2a8c422800c87ee89a6a4eac7dd01109bc172a1093ce1f4f001" dependencies = [ "actix", - "actix-codec", - "actix-http", - "actix-web", + "actix-codec 0.3.0", + "actix-http 2.2.1", + "actix-web 3.3.3", "bytes 0.5.6", "futures-channel", "futures-core", @@ -360,7 +520,19 @@ checksum = "ad26f77093333e0e7c6ffe54ebe3582d908a104e448723eec6d43d08b07143fb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.85", +] + +[[package]] +name = "actix-web-codegen" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2262160a7ae29e3415554a3f1fc04c764b1540c116aa524683208078b7a75bc9" +dependencies = [ + "actix-router 0.5.1", + "proc-macro2", + "quote", + "syn 1.0.85", ] [[package]] @@ -371,7 +543,7 @@ checksum = "b95aceadaf327f18f0df5962fedc1bde2f870566a0b9f65c89508a3b1f79334c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.85", ] [[package]] @@ -389,6 +561,17 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom 0.2.4", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" version = "0.7.18" @@ -398,6 +581,21 @@ dependencies = [ "memchr", ] +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + [[package]] name = "anyhow" version = "1.0.71" @@ -408,10 +606,10 @@ dependencies = [ ] [[package]] -name = "ascii" -version = "0.9.3" +name = "askama_escape" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" +checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341" [[package]] name = "async-trait" @@ -421,7 +619,7 @@ checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.85", ] [[package]] @@ -447,10 +645,10 @@ version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b381e490e7b0cfc37ebc54079b0413d8093ef43d14a4e4747083f7fa47a9e691" dependencies = [ - "actix-codec", - "actix-http", - "actix-rt", - "actix-service", + "actix-codec 0.3.0", + "actix-http 2.2.1", + "actix-rt 1.1.1", + "actix-service 1.0.6", "base64 0.13.0", "bytes 0.5.6", "cfg-if 1.0.0", @@ -460,22 +658,11 @@ dependencies = [ "mime", "percent-encoding", "rand 0.7.3", - "rustls", "serde", "serde_json", "serde_urlencoded", ] -[[package]] -name = "backoff" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721c249ab59cbc483ad4294c9ee2671835c1e43e9ffc277e6b4ecfef733cfdc5" -dependencies = [ - "instant", - "rand 0.7.3", -] - [[package]] name = "backtrace" version = "0.3.63" @@ -497,12 +684,6 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - [[package]] name = "base64" version = "0.13.0" @@ -540,32 +721,24 @@ dependencies = [ ] [[package]] -name = "brotli-sys" -version = "0.3.2" +name = "brotli" +version = "3.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4445dea95f4c2b41cde57cc9fee236ae4dbae88d8fcbdb4750fc1bb5d86aaecd" +checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" dependencies = [ - "cc", - "libc", + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", ] [[package]] -name = "brotli2" -version = "0.3.2" +name = "brotli-decompressor" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cb036c3eade309815c15ddbacec5b22c4d1f3983a774ab2eac2e3e9ea85568e" +checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" dependencies = [ - "brotli-sys", - "libc", -] - -[[package]] -name = "buf-min" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa17aa1cf56bdd6bb30518767d00e58019d326f3f05d8c3e0730b549d332ea83" -dependencies = [ - "bytes 0.5.6", + "alloc-no-stdlib", + "alloc-stdlib", ] [[package]] @@ -606,6 +779,9 @@ name = "cc" version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" +dependencies = [ + "jobserver", +] [[package]] name = "cfg-if" @@ -644,7 +820,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.85", ] [[package]] @@ -656,19 +832,6 @@ dependencies = [ "os_str_bytes", ] -[[package]] -name = "combine" -version = "3.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" -dependencies = [ - "ascii", - "byteorder", - "either", - "memchr", - "unreachable", -] - [[package]] name = "const_fn" version = "0.4.9" @@ -688,8 +851,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03a5d7b21829bc7b4bf4754a978a241ae54ea55a40f92bb20216e54096f4b951" dependencies = [ "percent-encoding", - "time", - "version_check 0.9.4", + "time 0.2.27", + "version_check", +] + +[[package]] +name = "cookie" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" +dependencies = [ + "percent-encoding", + "time 0.3.22", + "version_check", ] [[package]] @@ -739,21 +913,12 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.1.1" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d6b536309245c849479fba3da410962a43ed8e51c26b729208ec0ac2798d0" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", -] - -[[package]] -name = "dashmap" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" -dependencies = [ - "cfg-if 1.0.0", - "num_cpus", + "typenum", ] [[package]] @@ -766,7 +931,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.0", - "syn", + "syn 1.0.85", ] [[package]] @@ -780,13 +945,12 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.1" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b697d66081d42af4fba142d56918a3cb21dc8eb63372c6b85d14f44fb9c5979b" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.0", "crypto-common", - "generic-array", ] [[package]] @@ -795,12 +959,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" -[[package]] -name = "dtoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" - [[package]] name = "either" version = "1.6.1" @@ -825,26 +983,14 @@ dependencies = [ "heck 0.3.3", "proc-macro2", "quote", - "syn", -] - -[[package]] -name = "enum_dispatch" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd53b3fde38a39a06b2e66dc282f3e86191e53bd04cc499929c15742beae3df8" -dependencies = [ - "once_cell", - "proc-macro2", - "quote", - "syn", + "syn 1.0.85", ] [[package]] name = "env_logger" -version = "0.9.0" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" dependencies = [ "atty", "humantime", @@ -853,28 +999,6 @@ dependencies = [ "termcolor", ] -[[package]] -name = "failure" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - [[package]] name = "flate2" version = "1.0.22" @@ -942,7 +1066,6 @@ checksum = "28560757fe2bb34e79f907794bb6b22ae8b0e5c669b638a1132f2592b19035b4" dependencies = [ "futures-channel", "futures-core", - "futures-executor", "futures-io", "futures-sink", "futures-task", @@ -965,17 +1088,6 @@ version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0c8ff0461b82559810cdccfde3215c3f373807f5e5232b71479bff7bb2583d7" -[[package]] -name = "futures-executor" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29d6d2ff5bb10fb95c85b8ce46538a2e5f5e7fdc755623a7d4529ab8a4ed9d2a" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - [[package]] name = "futures-io" version = "0.3.19" @@ -990,7 +1102,7 @@ checksum = "6dbd947adfffb0efc70599b3ddcf7b5597bb5fa9e245eb99f62b3a5f7bb8bd3c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.85", ] [[package]] @@ -1039,7 +1151,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" dependencies = [ "typenum", - "version_check 0.9.4", + "version_check", ] [[package]] @@ -1090,6 +1202,25 @@ dependencies = [ "tracing-futures", ] +[[package]] +name = "h2" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +dependencies = [ + "bytes 1.1.0", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio 1.15.0", + "tokio-util 0.7.2", + "tracing", +] + [[package]] name = "hashbrown" version = "0.11.2" @@ -1133,21 +1264,33 @@ dependencies = [ [[package]] name = "http" -version = "0.2.6" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes 1.1.0", "fnv", "itoa 1.0.1", ] +[[package]] +name = "http-range" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" + [[package]] name = "httparse" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + [[package]] name = "humantime" version = "2.1.0" @@ -1199,7 +1342,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" dependencies = [ - "socket2", + "socket2 0.3.19", "widestring", "winapi 0.3.9", "winreg", @@ -1217,6 +1360,15 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +[[package]] +name = "jobserver" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.55" @@ -1242,6 +1394,12 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" +[[package]] +name = "language-tags" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" + [[package]] name = "lazy_static" version = "1.4.0" @@ -1250,9 +1408,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.112" +version = "0.2.146" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" +checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" [[package]] name = "linked-hash-map" @@ -1260,6 +1418,24 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" +[[package]] +name = "local-channel" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f303ec0e94c6c54447f84f3b0ef7af769858a9c4ef56ef2a986d3dcd4c3fc9c" +dependencies = [ + "futures-core", + "futures-sink", + "futures-util", + "local-waker", +] + +[[package]] +name = "local-waker" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e34f76eb3611940e0e7d53a9aaa4e6a3151f69541a282fd0dad5571420c53ff1" + [[package]] name = "lock_api" version = "0.4.5" @@ -1294,11 +1470,10 @@ dependencies = [ "actix", "actix-broker", "actix-files", - "actix-ratelimit", - "actix-web", + "actix-web 4.2.1", "actix-web-actors", "anyhow", - "base64 0.13.0", + "base64 0.21.0", "clap", "env_logger", "lazy_static", @@ -1331,20 +1506,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" -[[package]] -name = "memcache" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abda83a771818756924a798597a604cb33fde8ad61b49797c353f4505c4a9a83" -dependencies = [ - "byteorder", - "enum_dispatch", - "openssl", - "r2d2", - "rand 0.8.4", - "url", -] - [[package]] name = "memchr" version = "2.4.1" @@ -1390,12 +1551,37 @@ dependencies = [ "kernel32-sys", "libc", "log", - "miow", + "miow 0.2.2", "net2", "slab", "winapi 0.2.8", ] +[[package]] +name = "mio" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +dependencies = [ + "libc", + "log", + "miow 0.3.7", + "ntapi", + "winapi 0.3.9", +] + +[[package]] +name = "mio" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", +] + [[package]] name = "mio-uds" version = "0.6.8" @@ -1404,7 +1590,7 @@ checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" dependencies = [ "iovec", "libc", - "mio", + "mio 0.6.23", ] [[package]] @@ -1419,6 +1605,15 @@ dependencies = [ "ws2_32-sys", ] +[[package]] +name = "miow" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "net2" version = "0.2.37" @@ -1431,13 +1626,12 @@ dependencies = [ ] [[package]] -name = "nom" -version = "4.2.3" +name = "ntapi" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" +checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" dependencies = [ - "memchr", - "version_check 0.1.5", + "winapi 0.3.9", ] [[package]] @@ -1529,6 +1723,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "paste" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" + [[package]] name = "percent-encoding" version = "2.1.0" @@ -1561,7 +1761,7 @@ checksum = "044964427019eed9d49d9d5bbce6047ef18f37100ea400912a9fa4a3523ab12a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.85", ] [[package]] @@ -1572,7 +1772,7 @@ checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.85", ] [[package]] @@ -1614,8 +1814,8 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", - "version_check 0.9.4", + "syn 1.0.85", + "version_check", ] [[package]] @@ -1626,7 +1826,7 @@ checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "version_check 0.9.4", + "version_check", ] [[package]] @@ -1652,34 +1852,13 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.14" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47aa80447ce4daf1717500037052af176af5d38cc3e571d9ec1c7353fc10c87d" +checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" dependencies = [ "proc-macro2", ] -[[package]] -name = "r2d2" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f" -dependencies = [ - "log", - "parking_lot", - "scheduled-thread-pool", -] - -[[package]] -name = "r2d2-memcache" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74b9d7bc44a11909bffe6bf1e4bddae23215ecd6186695e4766d6b57d819f640" -dependencies = [ - "memcache", - "r2d2", -] - [[package]] name = "rand" version = "0.7.3" @@ -1761,26 +1940,6 @@ dependencies = [ "rand_core 0.6.3", ] -[[package]] -name = "redis" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eeb1fe3fc011cde97315f370bc88e4db3c23b08709a04915921e02b1d363b20" -dependencies = [ - "bytes 0.5.6", - "combine", - "dtoa", - "futures-executor", - "futures-util", - "itoa 0.4.8", - "percent-encoding", - "pin-project-lite 0.1.12", - "sha1", - "tokio 0.2.25", - "tokio-util 0.2.0", - "url", -] - [[package]] name = "redox_syscall" version = "0.2.10" @@ -1792,9 +1951,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.4" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" dependencies = [ "aho-corasick", "memchr", @@ -1803,9 +1962,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "resolv-conf" @@ -1858,11 +2017,10 @@ dependencies = [ [[package]] name = "rustls" -version = "0.18.1" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" +checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ - "base64 0.12.3", "log", "ring", "sct", @@ -1884,15 +2042,6 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" -[[package]] -name = "scheduled-thread-pool" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f74fd1204073fa02d5d5d68bec8021be4c38690b61264b2fdb48083d0e7d7" -dependencies = [ - "parking_lot", -] - [[package]] name = "scopeguard" version = "1.1.0" @@ -1901,9 +2050,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "sct" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ "ring", "untrusted", @@ -1947,7 +2096,7 @@ checksum = "ed201699328568d8d08208fdd080e3ff594e6c422e438b6705905da01005d537" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.85", ] [[package]] @@ -1995,6 +2144,17 @@ dependencies = [ "sha1_smol", ] +[[package]] +name = "sha1" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.10.7", +] + [[package]] name = "sha1_smol" version = "1.0.0" @@ -2009,7 +2169,7 @@ checksum = "99c3bd8169c58782adad9290a9af5939994036b76187f7b4f0e6de91dbbfc0ec" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.1", + "digest 0.10.7", ] [[package]] @@ -2044,6 +2204,16 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "socket2" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +dependencies = [ + "libc", + "winapi 0.3.9", +] + [[package]] name = "spin" version = "0.5.2" @@ -2056,7 +2226,7 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" dependencies = [ - "version_check 0.9.4", + "version_check", ] [[package]] @@ -2083,7 +2253,7 @@ dependencies = [ "quote", "serde", "serde_derive", - "syn", + "syn 1.0.85", ] [[package]] @@ -2098,8 +2268,8 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "sha1", - "syn", + "sha1 0.6.1", + "syn 1.0.85", ] [[package]] @@ -2126,15 +2296,14 @@ dependencies = [ ] [[package]] -name = "synstructure" -version = "0.12.6" +name = "syn" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" dependencies = [ "proc-macro2", "quote", - "syn", - "unicode-xid", + "unicode-ident", ] [[package]] @@ -2163,7 +2332,7 @@ checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.85", ] [[package]] @@ -2185,11 +2354,29 @@ dependencies = [ "libc", "standback", "stdweb", - "time-macros", - "version_check 0.9.4", + "time-macros 0.1.1", + "version_check", "winapi 0.3.9", ] +[[package]] +name = "time" +version = "0.3.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" +dependencies = [ + "itoa 1.0.1", + "serde", + "time-core", + "time-macros 0.2.9", +] + +[[package]] +name = "time-core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" + [[package]] name = "time-macros" version = "0.1.1" @@ -2200,6 +2387,15 @@ dependencies = [ "time-macros-impl", ] +[[package]] +name = "time-macros" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +dependencies = [ + "time-core", +] + [[package]] name = "time-macros-impl" version = "0.1.2" @@ -2210,7 +2406,7 @@ dependencies = [ "proc-macro2", "quote", "standback", - "syn", + "syn 1.0.85", ] [[package]] @@ -2241,7 +2437,7 @@ dependencies = [ "lazy_static", "libc", "memchr", - "mio", + "mio 0.6.23", "mio-uds", "pin-project-lite 0.1.12", "signal-hook-registry", @@ -2255,9 +2451,17 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbbf1c778ec206785635ce8ad57fe52b3009ae9e0c9f574a728f3049d3e55838" dependencies = [ + "bytes 1.1.0", + "libc", + "memchr", + "mio 0.7.14", "num_cpus", + "once_cell", + "parking_lot", "pin-project-lite 0.2.8", + "signal-hook-registry", "tokio-macros", + "winapi 0.3.9", ] [[package]] @@ -2268,35 +2472,20 @@ checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.85", ] [[package]] name = "tokio-rustls" -version = "0.14.1" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "futures-core", "rustls", - "tokio 0.2.25", + "tokio 1.15.0", "webpki", ] -[[package]] -name = "tokio-util" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" -dependencies = [ - "bytes 0.5.6", - "futures-core", - "futures-sink", - "log", - "pin-project-lite 0.1.12", - "tokio 0.2.25", -] - [[package]] name = "tokio-util" version = "0.3.1" @@ -2313,24 +2502,50 @@ dependencies = [ ] [[package]] -name = "tracing" -version = "0.1.29" +name = "tokio-util" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" +checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" +dependencies = [ + "bytes 1.1.0", + "futures-core", + "futures-sink", + "pin-project-lite 0.2.8", + "tokio 1.15.0", + "tracing", +] + +[[package]] +name = "tracing" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" dependencies = [ "cfg-if 1.0.0", "log", "pin-project-lite 0.2.8", + "tracing-attributes", "tracing-core", ] [[package]] -name = "tracing-core" -version = "0.1.21" +name = "tracing-attributes" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" +checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" dependencies = [ - "lazy_static", + "proc-macro2", + "quote", + "syn 2.0.18", +] + +[[package]] +name = "tracing-core" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +dependencies = [ + "once_cell", ] [[package]] @@ -2394,7 +2609,7 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ - "version_check 0.9.4", + "version_check", ] [[package]] @@ -2430,15 +2645,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" -[[package]] -name = "unreachable" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -dependencies = [ - "void", -] - [[package]] name = "untrusted" version = "0.7.1" @@ -2457,62 +2663,18 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "v_escape" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3e0ab5fab1db278a9413d2ea794cb66f471f898c5b020c3c394f6447625d9d4" -dependencies = [ - "buf-min", - "v_escape_derive", -] - -[[package]] -name = "v_escape_derive" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29769400af8b264944b851c961a4a6930e76604f59b1fcd51246bab6a296c8c" -dependencies = [ - "nom", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "v_htmlescape" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f9a8af610ad6f7fc9989c9d2590d9764bc61f294884e9ee93baa58795174572" -dependencies = [ - "cfg-if 1.0.0", - "v_escape", -] - [[package]] name = "vcpkg" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "version_check" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" - [[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" - [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" @@ -2525,6 +2687,12 @@ version = "0.10.3+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a2e384a3f170b0c7543787a91411175b71afd56ba4d3a0ae5678d4e2243c0e" +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + [[package]] name = "wasm-bindgen" version = "0.2.78" @@ -2546,7 +2714,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn", + "syn 1.0.85", "wasm-bindgen-shared", ] @@ -2568,7 +2736,7 @@ checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.85", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2591,9 +2759,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.21.4" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" dependencies = [ "ring", "untrusted", @@ -2601,9 +2769,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.20.0" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f20dea7535251981a9670857150d571846545088359b28e4951d350bdaf179f" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ "webpki", ] @@ -2657,6 +2825,72 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + [[package]] name = "winreg" version = "0.6.2" @@ -2675,3 +2909,33 @@ dependencies = [ "winapi 0.2.8", "winapi-build", ] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.8+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +dependencies = [ + "cc", + "libc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index 17a4c8c..2e3961d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,11 +14,10 @@ keywords = ["chat", "Chatting", "Talk", "Stranger"] [dependencies] actix = "0.10" -actix-web = { version = "3", features = ["rustls"] } +actix-web = { version = "4", features = ["rustls"] } actix-web-actors = "3" actix-broker = "0.3" -actix-files = "0.5" -actix-ratelimit = "0.3" +actix-files = "0.6" env_logger = "0.9" openssl = "0.10" @@ -31,8 +30,8 @@ rand = "0.8" tokio = { version = "1.5", features = ['rt', 'rt-multi-thread', 'macros'] } sha2 = "0.10" -base64 = "0.13" -log = "0.4.17" -rustls = "0.18.0" +base64 = "0.21" +log = "0.4" +rustls = "0.20" rustls-pemfile = "1.0.2" anyhow = { version = "1.0.71", features = ["backtrace"] } diff --git a/src/main.rs b/src/main.rs index 09c9a68..e4b3db4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -39,7 +39,7 @@ use actix_web::{ }; use actix_web_actors::ws; use config::CONFIG; -use rustls::{Certificate, NoClientAuth, PrivateKey, ServerConfig}; +use rustls::{Certificate, PrivateKey, ServerConfig}; use std::fs::File; use ws_sansad::WsSansad; @@ -59,11 +59,6 @@ async fn main() -> std::io::Result<()> { let main_server = HttpServer::new(move || { let mut app = App::new() - .wrap( - RateLimiter::new(MemoryStoreActor::from(MemoryStore::new().clone()).start()) - .with_interval(std::time::Duration::from_secs(60)) - .with_max_requests(200), - ) .wrap(Logger::new(&CONFIG.logger_pattern)) .service(web::resource("/ws/").route(web::get().to(ws_index))); @@ -114,8 +109,16 @@ fn gen_rustls_server_config(key: String, cert: String) -> ServerConfig { let private_key = PrivateKey(private_key.to_owned()); - let mut config = ServerConfig::new(NoClientAuth::new()); - config.set_single_cert(certs, private_key).unwrap(); + let mut config = ServerConfig::builder() + .with_safe_default_cipher_suites() + .with_safe_default_kx_groups() + .with_safe_default_protocol_versions() + .map_err(|e| anyhow!(e)) + .expect("Build TLS!") + .with_no_client_auth() + .with_single_cert(certs, private_key) + .map_err(|e| anyhow!(e)) + .expect("Add TLS certificates!"); config } From 8326f8f2847205f6951f7451f202bee23182b0bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piyush=20=E0=A4=AE=E0=A4=BF=E0=A4=B6=E0=A5=8D=E0=A4=B0?= Date: Sun, 18 Jun 2023 12:04:54 +0530 Subject: [PATCH 2/5] Updated actix and related dependencies. --- Cargo.lock | 1510 +++++++---------------------------- Cargo.toml | 14 +- src/broker_messages/mod.rs | 3 +- src/broker_messages/util.rs | 16 +- src/chat_pinnd/user.rs | 44 +- src/main.rs | 20 +- src/ws_sansad/mod.rs | 43 +- 7 files changed, 327 insertions(+), 1323 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4a9c1b9..9c70ab3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,56 +4,39 @@ version = 3 [[package]] name = "actix" -version = "0.10.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1be241f88f3b1e7e9a3fbe3b5a8a0f6915b5a1d7ee0d9a248d3376d01068cc60" +checksum = "f728064aca1c318585bf4bb04ffcfac9e75e508ab4e8b1bd9ba5dfe04e2cbed5" dependencies = [ - "actix-rt 1.1.1", + "actix-rt", "actix_derive", "bitflags", - "bytes 0.5.6", + "bytes", "crossbeam-channel", - "derive_more", - "futures-channel", + "futures-core", + "futures-sink", + "futures-task", "futures-util", "log", "once_cell", "parking_lot", - "pin-project 0.4.29", + "pin-project-lite", "smallvec", - "tokio 0.2.25", - "tokio-util 0.3.1", - "trust-dns-proto", - "trust-dns-resolver", + "tokio", + "tokio-util", ] [[package]] name = "actix-broker" -version = "0.3.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e075eaa04b5a9a1b36ce801fa338f7d477f6b5f28d5f8339a8c2baba5beec33" +checksum = "e089b5c4d0cf02d72a9eca0b6c80aebff1ccd3d1e99c83d1f7b9baeff39dc5e9" dependencies = [ "actix", - "fnv", + "ahash 0.7.6", "log", ] -[[package]] -name = "actix-codec" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78d1833b3838dbe990df0f1f87baf640cf6146e898166afe401839d1b001e570" -dependencies = [ - "bitflags", - "bytes 0.5.6", - "futures-core", - "futures-sink", - "log", - "pin-project 0.4.29", - "tokio 0.2.25", - "tokio-util 0.3.1", -] - [[package]] name = "actix-codec" version = "0.5.1" @@ -61,48 +44,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617a8268e3537fe1d8c9ead925fca49ef6400927ee7bc26750e90ecee14ce4b8" dependencies = [ "bitflags", - "bytes 1.1.0", + "bytes", "futures-core", "futures-sink", "memchr", - "pin-project-lite 0.2.8", - "tokio 1.15.0", - "tokio-util 0.7.2", + "pin-project-lite", + "tokio", + "tokio-util", "tracing", ] -[[package]] -name = "actix-connect" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177837a10863f15ba8d3ae3ec12fac1099099529ed20083a27fdfe247381d0dc" -dependencies = [ - "actix-codec 0.3.0", - "actix-rt 1.1.1", - "actix-service 1.0.6", - "actix-utils 2.0.0", - "derive_more", - "either", - "futures-util", - "http", - "log", - "trust-dns-proto", - "trust-dns-resolver", -] - [[package]] name = "actix-files" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d832782fac6ca7369a70c9ee9a20554623c5e51c76e190ad151780ebea1cf689" dependencies = [ - "actix-http 3.2.2", - "actix-service 2.0.2", - "actix-utils 3.0.1", - "actix-web 4.2.1", + "actix-http", + "actix-service", + "actix-utils", + "actix-web", "askama_escape", "bitflags", - "bytes 1.1.0", + "bytes", "derive_more", "futures-core", "http-range", @@ -110,102 +74,49 @@ dependencies = [ "mime", "mime_guess", "percent-encoding", - "pin-project-lite 0.2.8", + "pin-project-lite", ] [[package]] name = "actix-http" -version = "2.2.1" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cb8958da437716f3f31b0e76f8daf36554128517d7df37ceba7df00f09622ee" +checksum = "c2079246596c18b4a33e274ae10c0e50613f4d32a4198e09c7b93771013fed74" dependencies = [ - "actix-codec 0.3.0", - "actix-connect", - "actix-rt 1.1.1", - "actix-service 1.0.6", - "actix-threadpool", - "actix-utils 2.0.0", - "base64 0.13.0", - "bitflags", - "bytes 0.5.6", - "cookie 0.14.4", - "copyless", - "derive_more", - "either", - "encoding_rs", - "futures-channel", - "futures-core", - "futures-util", - "fxhash", - "h2 0.2.7", - "http", - "httparse", - "indexmap", - "itoa 0.4.8", - "language-tags 0.2.2", - "lazy_static", - "log", - "mime", - "percent-encoding", - "pin-project 1.0.10", - "rand 0.7.3", - "regex", - "serde", - "serde_json", - "serde_urlencoded", - "sha-1", - "slab", - "time 0.2.27", -] - -[[package]] -name = "actix-http" -version = "3.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c83abf9903e1f0ad9973cc4f7b9767fd5a03a583f51a5b7a339e07987cd2724" -dependencies = [ - "actix-codec 0.5.1", - "actix-rt 2.7.0", - "actix-service 2.0.2", - "actix-tls 3.0.3", - "actix-utils 3.0.1", - "ahash", - "base64 0.13.0", + "actix-codec", + "actix-rt", + "actix-service", + "actix-tls", + "actix-utils", + "ahash 0.8.3", + "base64", "bitflags", "brotli", - "bytes 1.1.0", + "bytes", "bytestring", "derive_more", "encoding_rs", "flate2", "futures-core", - "h2 0.3.19", + "h2", "http", "httparse", "httpdate", - "itoa 1.0.1", - "language-tags 0.3.2", + "itoa", + "language-tags", "local-channel", "mime", "percent-encoding", - "pin-project-lite 0.2.8", - "rand 0.8.4", - "sha1 0.10.5", + "pin-project-lite", + "rand", + "sha1", "smallvec", + "tokio", + "tokio-util", "tracing", "zstd", ] -[[package]] -name = "actix-macros" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ca8ce00b267af8ccebbd647de0d61e0674b6e61185cc7a592ff88772bed655" -dependencies = [ - "quote", - "syn 1.0.85", -] - [[package]] name = "actix-macros" version = "0.2.3" @@ -216,19 +127,6 @@ dependencies = [ "syn 1.0.85", ] -[[package]] -name = "actix-router" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad299af73649e1fc893e333ccf86f377751eb95ff875d095131574c6f43452c" -dependencies = [ - "bytestring", - "http", - "log", - "regex", - "serde", -] - [[package]] name = "actix-router" version = "0.5.1" @@ -242,21 +140,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "actix-rt" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143fcc2912e0d1de2bcf4e2f720d2a60c28652ab4179685a1ee159e0fb3db227" -dependencies = [ - "actix-macros 0.1.3", - "actix-threadpool", - "copyless", - "futures-channel", - "futures-util", - "smallvec", - "tokio 0.2.25", -] - [[package]] name = "actix-rt" version = "2.7.0" @@ -264,27 +147,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ea16c295198e958ef31930a6ef37d0fb64e9ca3b6116e6b93a8bdae96ee1000" dependencies = [ "futures-core", - "tokio 1.15.0", -] - -[[package]] -name = "actix-server" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45407e6e672ca24784baa667c5d32ef109ccdd8d5e0b5ebb9ef8a67f4dfb708e" -dependencies = [ - "actix-codec 0.3.0", - "actix-rt 1.1.1", - "actix-service 1.0.6", - "actix-utils 2.0.0", - "futures-channel", - "futures-util", - "log", - "mio 0.6.23", - "mio-uds", - "num_cpus", - "slab", - "socket2 0.3.19", + "tokio", ] [[package]] @@ -293,28 +156,18 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0da34f8e659ea1b077bb4637948b815cd3768ad5a188fdcd74ff4d84240cd824" dependencies = [ - "actix-rt 2.7.0", - "actix-service 2.0.2", - "actix-utils 3.0.1", + "actix-rt", + "actix-service", + "actix-utils", "futures-core", "futures-util", - "mio 0.8.8", + "mio", "num_cpus", - "socket2 0.4.9", - "tokio 1.15.0", + "socket2", + "tokio", "tracing", ] -[[package]] -name = "actix-service" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0052435d581b5be835d11f4eb3bce417c8af18d87ddf8ace99f8e67e595882bb" -dependencies = [ - "futures-util", - "pin-project 0.4.29", -] - [[package]] name = "actix-service" version = "2.0.2" @@ -323,48 +176,7 @@ checksum = "3b894941f818cfdc7ccc4b9e60fa7e53b5042a2e8567270f9147d5591893373a" dependencies = [ "futures-core", "paste", - "pin-project-lite 0.2.8", -] - -[[package]] -name = "actix-testing" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47239ca38799ab74ee6a8a94d1ce857014b2ac36f242f70f3f75a66f691e791c" -dependencies = [ - "actix-macros 0.1.3", - "actix-rt 1.1.1", - "actix-server 1.0.4", - "actix-service 1.0.6", - "log", - "socket2 0.3.19", -] - -[[package]] -name = "actix-threadpool" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d209f04d002854b9afd3743032a27b066158817965bf5d036824d19ac2cc0e30" -dependencies = [ - "derive_more", - "futures-channel", - "lazy_static", - "log", - "num_cpus", - "parking_lot", - "threadpool", -] - -[[package]] -name = "actix-tls" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24789b7d7361cf5503a504ebe1c10806896f61e96eca9a7350e23001aca715fb" -dependencies = [ - "actix-codec 0.3.0", - "actix-service 1.0.6", - "actix-utils 2.0.0", - "futures-util", + "pin-project-lite", ] [[package]] @@ -373,38 +185,19 @@ version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fde0cf292f7cdc7f070803cb9a0d45c018441321a78b1042ffbbb81ec333297" dependencies = [ - "actix-codec 0.5.1", - "actix-rt 2.7.0", - "actix-service 2.0.2", - "actix-utils 3.0.1", + "actix-codec", + "actix-rt", + "actix-service", + "actix-utils", "futures-core", + "http", "log", - "pin-project-lite 0.2.8", + "pin-project-lite", "tokio-rustls", - "tokio-util 0.7.2", + "tokio-util", "webpki-roots", ] -[[package]] -name = "actix-utils" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9022dec56632d1d7979e59af14f0597a28a830a9c1c7fec8b2327eb9f16b5a" -dependencies = [ - "actix-codec 0.3.0", - "actix-rt 1.1.1", - "actix-service 1.0.6", - "bitflags", - "bytes 0.5.6", - "either", - "futures-channel", - "futures-sink", - "futures-util", - "log", - "pin-project 0.4.29", - "slab", -] - [[package]] name = "actix-utils" version = "3.0.1" @@ -412,46 +205,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" dependencies = [ "local-waker", - "pin-project-lite 0.2.8", -] - -[[package]] -name = "actix-web" -version = "3.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6534a126df581caf443ba2751cab42092c89b3f1d06a9d829b1e17edfe3e277" -dependencies = [ - "actix-codec 0.3.0", - "actix-http 2.2.1", - "actix-macros 0.1.3", - "actix-router 0.2.7", - "actix-rt 1.1.1", - "actix-server 1.0.4", - "actix-service 1.0.6", - "actix-testing", - "actix-threadpool", - "actix-tls 2.0.0", - "actix-utils 2.0.0", - "actix-web-codegen 0.4.0", - "awc", - "bytes 0.5.6", - "derive_more", - "encoding_rs", - "futures-channel", - "futures-core", - "futures-util", - "fxhash", - "log", - "mime", - "pin-project 1.0.10", - "regex", - "serde", - "serde_json", - "serde_urlencoded", - "socket2 0.3.19", - "time 0.2.27", - "tinyvec", - "url", + "pin-project-lite", ] [[package]] @@ -460,67 +214,58 @@ version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d48f7b6534e06c7bfc72ee91db7917d4af6afe23e7d223b51e68fffbb21e96b9" dependencies = [ - "actix-codec 0.5.1", - "actix-http 3.2.2", - "actix-macros 0.2.3", - "actix-router 0.5.1", - "actix-rt 2.7.0", - "actix-server 2.1.1", - "actix-service 2.0.2", - "actix-tls 3.0.3", - "actix-utils 3.0.1", - "actix-web-codegen 4.2.0", - "ahash", - "bytes 1.1.0", + "actix-codec", + "actix-http", + "actix-macros", + "actix-router", + "actix-rt", + "actix-server", + "actix-service", + "actix-tls", + "actix-utils", + "actix-web-codegen", + "ahash 0.7.6", + "bytes", "bytestring", - "cfg-if 1.0.0", - "cookie 0.16.2", + "cfg-if", + "cookie", "derive_more", "encoding_rs", "futures-core", "futures-util", "http", - "itoa 1.0.1", - "language-tags 0.3.2", + "itoa", + "language-tags", "log", "mime", "once_cell", - "pin-project-lite 0.2.8", + "pin-project-lite", "regex", "serde", "serde_json", "serde_urlencoded", "smallvec", - "socket2 0.4.9", - "time 0.3.22", + "socket2", + "time", "url", ] [[package]] name = "actix-web-actors" -version = "3.0.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6edf3c2693e2a8c422800c87ee89a6a4eac7dd01109bc172a1093ce1f4f001" +checksum = "bf6e9ccc371cfddbed7aa842256a4abc7a6dcac9f3fce392fe1d0f68cfd136b2" dependencies = [ "actix", - "actix-codec 0.3.0", - "actix-http 2.2.1", - "actix-web 3.3.3", - "bytes 0.5.6", - "futures-channel", + "actix-codec", + "actix-http", + "actix-web", + "bytes", + "bytestring", "futures-core", - "pin-project 0.4.29", -] - -[[package]] -name = "actix-web-codegen" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad26f77093333e0e7c6ffe54ebe3582d908a104e448723eec6d43d08b07143fb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.85", + "pin-project-lite", + "tokio", + "tokio-util", ] [[package]] @@ -529,7 +274,7 @@ version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2262160a7ae29e3415554a3f1fc04c764b1540c116aa524683208078b7a75bc9" dependencies = [ - "actix-router 0.5.1", + "actix-router", "proc-macro2", "quote", "syn 1.0.85", @@ -537,9 +282,9 @@ dependencies = [ [[package]] name = "actix_derive" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b95aceadaf327f18f0df5962fedc1bde2f870566a0b9f65c89508a3b1f79334c" +checksum = "6d44b8fee1ced9671ba043476deddef739dd0959bf77030b26b738cc591737a7" dependencies = [ "proc-macro2", "quote", @@ -567,7 +312,19 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.4", + "getrandom", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "getrandom", "once_cell", "version_check", ] @@ -611,56 +368,55 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341" -[[package]] -name = "async-trait" -version = "0.1.52" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.85", -] - [[package]] name = "atty" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "awc" -version = "2.0.3" +version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b381e490e7b0cfc37ebc54079b0413d8093ef43d14a4e4747083f7fa47a9e691" +checksum = "87ef547a81796eb2dfe9b345aba34c2e08391a0502493711395b36dd64052b69" dependencies = [ - "actix-codec 0.3.0", - "actix-http 2.2.1", - "actix-rt 1.1.1", - "actix-service 1.0.6", - "base64 0.13.0", - "bytes 0.5.6", - "cfg-if 1.0.0", + "actix-codec", + "actix-http", + "actix-rt", + "actix-service", + "actix-tls", + "actix-utils", + "ahash 0.7.6", + "base64", + "bytes", + "cfg-if", + "cookie", "derive_more", "futures-core", + "futures-util", + "h2", + "http", + "itoa", "log", "mime", "percent-encoding", - "rand 0.7.3", + "pin-project-lite", + "rand", "serde", "serde_json", "serde_urlencoded", + "tokio", ] [[package]] @@ -671,25 +427,13 @@ checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6" dependencies = [ "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", ] -[[package]] -name = "base-x" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" - -[[package]] -name = "base64" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - [[package]] name = "base64" version = "0.21.0" @@ -702,15 +446,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - [[package]] name = "block-buffer" version = "0.10.0" @@ -747,18 +482,6 @@ version = "3.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - [[package]] name = "bytes" version = "1.1.0" @@ -771,7 +494,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90706ba19e97b90786e19dc0d5e2abd80008d99d4c0c5d1ad0b5e72cec7c494d" dependencies = [ - "bytes 1.1.0", + "bytes", ] [[package]] @@ -783,12 +506,6 @@ dependencies = [ "jobserver", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -816,7 +533,7 @@ version = "4.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014" dependencies = [ - "heck 0.4.0", + "heck", "proc-macro-error", "proc-macro2", "quote", @@ -832,29 +549,12 @@ dependencies = [ "os_str_bytes", ] -[[package]] -name = "const_fn" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" - [[package]] name = "convert_case" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" -[[package]] -name = "cookie" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a5d7b21829bc7b4bf4754a978a241ae54ea55a40f92bb20216e54096f4b951" -dependencies = [ - "percent-encoding", - "time 0.2.27", - "version_check", -] - [[package]] name = "cookie" version = "0.16.2" @@ -862,16 +562,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ "percent-encoding", - "time 0.3.22", + "time", "version_check", ] -[[package]] -name = "copyless" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536" - [[package]] name = "cpufeatures" version = "0.2.1" @@ -887,28 +581,26 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "738c290dfaea84fc1ca15ad9c168d083b05a714e1efddd8edaab678dc28d2836" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.4.4" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ + "cfg-if", "crossbeam-utils", - "maybe-uninit", ] [[package]] name = "crossbeam-utils" -version = "0.7.2" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "lazy_static", + "cfg-if", ] [[package]] @@ -930,82 +622,70 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", + "rustc_version", "syn 1.0.85", ] -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.0", + "block-buffer", "crypto-common", ] -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - [[package]] name = "encoding_rs" version = "0.8.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "enum-as-inner" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" -dependencies = [ - "heck 0.3.3", - "proc-macro2", - "quote", - "syn 1.0.85", + "cfg-if", ] [[package]] name = "env_logger" -version = "0.9.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" dependencies = [ - "atty", "humantime", + "is-terminal", "log", "regex", "termcolor", ] +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "flate2" version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crc32fast", "libc", "miniz_oxide", @@ -1042,22 +722,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - [[package]] name = "futures" version = "0.3.19" @@ -1066,6 +730,7 @@ checksum = "28560757fe2bb34e79f907794bb6b22ae8b0e5c669b638a1132f2592b19035b4" dependencies = [ "futures-channel", "futures-core", + "futures-executor", "futures-io", "futures-sink", "futures-task", @@ -1089,10 +754,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0c8ff0461b82559810cdccfde3215c3f373807f5e5232b71479bff7bb2583d7" [[package]] -name = "futures-io" +name = "futures-executor" version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f9d34af5a1aac6fb380f735fe510746c38067c5bf16c7fd250280503c971b2" +checksum = "29d6d2ff5bb10fb95c85b8ce46538a2e5f5e7fdc755623a7d4529ab8a4ed9d2a" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-macro" @@ -1130,20 +806,11 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.8", + "pin-project-lite", "pin-utils", "slab", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "generic-array" version = "0.14.5" @@ -1156,24 +823,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.16" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.10.3+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -1182,33 +838,13 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" -[[package]] -name = "h2" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" -dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio 0.2.25", - "tokio-util 0.3.1", - "tracing", - "tracing-futures", -] - [[package]] name = "h2" version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" dependencies = [ - "bytes 1.1.0", + "bytes", "fnv", "futures-core", "futures-sink", @@ -1216,8 +852,8 @@ dependencies = [ "http", "indexmap", "slab", - "tokio 1.15.0", - "tokio-util 0.7.2", + "tokio", + "tokio-util", "tracing", ] @@ -1227,15 +863,6 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "heck" version = "0.4.0" @@ -1252,15 +879,10 @@ dependencies = [ ] [[package]] -name = "hostname" +name = "hermit-abi" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" -dependencies = [ - "libc", - "match_cfg", - "winapi 0.3.9", -] +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" [[package]] name = "http" @@ -1268,9 +890,9 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ - "bytes 1.1.0", + "bytes", "fnv", - "itoa 1.0.1", + "itoa", ] [[package]] @@ -1319,41 +941,28 @@ dependencies = [ ] [[package]] -name = "instant" -version = "0.1.12" +name = "io-lifetimes" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ + "hermit-abi 0.3.1", "libc", + "windows-sys", ] [[package]] -name = "ipconfig" -version = "0.2.2" +name = "is-terminal" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" +checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ - "socket2 0.3.19", - "widestring", - "winapi 0.3.9", - "winreg", + "hermit-abi 0.3.1", + "io-lifetimes", + "rustix", + "windows-sys", ] -[[package]] -name = "itoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - [[package]] name = "itoa" version = "1.0.1" @@ -1378,22 +987,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" - [[package]] name = "language-tags" version = "0.3.2" @@ -1413,10 +1006,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" [[package]] -name = "linked-hash-map" -version = "0.5.4" +name = "linux-raw-sys" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "local-channel" @@ -1438,10 +1031,11 @@ checksum = "e34f76eb3611940e0e7d53a9aaa4e6a3151f69541a282fd0dad5571420c53ff1" [[package]] name = "lock_api" -version = "0.4.5" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ + "autocfg", "scopeguard", ] @@ -1451,16 +1045,7 @@ version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "lru-cache" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" -dependencies = [ - "linked-hash-map", + "cfg-if", ] [[package]] @@ -1470,42 +1055,31 @@ dependencies = [ "actix", "actix-broker", "actix-files", - "actix-web 4.2.1", + "actix-web", "actix-web-actors", "anyhow", - "base64 0.21.0", + "awc", + "base64", "clap", "env_logger", + "futures", "lazy_static", "log", "openssl", - "rand 0.8.4", + "rand", "rustls", "rustls-pemfile", "serde", "serde_json", "sha2", - "tokio 1.15.0", ] -[[package]] -name = "match_cfg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" - [[package]] name = "matches" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "memchr" version = "2.4.1" @@ -1538,38 +1112,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "mio" -version = "0.6.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" -dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log", - "miow 0.2.2", - "net2", - "slab", - "winapi 0.2.8", -] - -[[package]] -name = "mio" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" -dependencies = [ - "libc", - "log", - "miow 0.3.7", - "ntapi", - "winapi 0.3.9", -] - [[package]] name = "mio" version = "0.8.8" @@ -1578,69 +1120,17 @@ checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys", ] -[[package]] -name = "mio-uds" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -dependencies = [ - "iovec", - "libc", - "mio 0.6.23", -] - -[[package]] -name = "miow" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "net2" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "ntapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" -dependencies = [ - "winapi 0.3.9", -] - [[package]] name = "num_cpus" version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", ] @@ -1659,12 +1149,6 @@ version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - [[package]] name = "openssl" version = "0.10.38" @@ -1672,7 +1156,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" dependencies = [ "bitflags", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -1700,27 +1184,25 @@ checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" [[package]] name = "parking_lot" -version = "0.11.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "instant", "lock_api", "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ - "cfg-if 1.0.0", - "instant", + "cfg-if", "libc", "redox_syscall", "smallvec", - "winapi 0.3.9", + "windows-targets", ] [[package]] @@ -1735,52 +1217,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" -[[package]] -name = "pin-project" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9615c18d31137579e9ff063499264ddc1278e7b1982757ebc111028c4d1dc909" -dependencies = [ - "pin-project-internal 0.4.29", -] - -[[package]] -name = "pin-project" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" -dependencies = [ - "pin-project-internal 1.0.10", -] - -[[package]] -name = "pin-project-internal" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "044964427019eed9d49d9d5bbce6047ef18f37100ea400912a9fa4a3523ab12a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.85", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.85", -] - -[[package]] -name = "pin-project-lite" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" - [[package]] name = "pin-project-lite" version = "0.2.8" @@ -1829,12 +1265,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - [[package]] name = "proc-macro2" version = "1.0.60" @@ -1844,12 +1274,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - [[package]] name = "quote" version = "1.0.28" @@ -1859,19 +1283,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc 0.2.0", -] - [[package]] name = "rand" version = "0.8.4" @@ -1879,19 +1290,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.3", - "rand_hc 0.3.1", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", + "rand_hc", ] [[package]] @@ -1901,16 +1302,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -1919,16 +1311,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.4", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "getrandom", ] [[package]] @@ -1937,14 +1320,14 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" dependencies = [ - "rand_core 0.6.3", + "rand_core", ] [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ "bitflags", ] @@ -1966,16 +1349,6 @@ version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" -[[package]] -name = "resolv-conf" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" -dependencies = [ - "hostname", - "quick-error", -] - [[package]] name = "ring" version = "0.16.20" @@ -1988,7 +1361,7 @@ dependencies = [ "spin", "untrusted", "web-sys", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1997,22 +1370,27 @@ version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.4", + "semver", +] + +[[package]] +name = "rustix" +version = "0.37.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys", ] [[package]] @@ -2033,7 +1411,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" dependencies = [ - "base64 0.21.0", + "base64", ] [[package]] @@ -2058,27 +1436,12 @@ dependencies = [ "untrusted", ] -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - [[package]] name = "semver" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "568a8e6258aa33c13358f81fd834adb854c6f7c9468520910a9b1e8fac068012" -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - [[package]] name = "serde" version = "1.0.133" @@ -2105,7 +1468,7 @@ version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c059c05b48c5c0067d4b4b2b4f0732dd65feb52daf7e0ea09cd87e7dadc1af79" dependencies = [ - "itoa 1.0.1", + "itoa", "ryu", "serde", ] @@ -2117,59 +1480,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.1", + "itoa", "ryu", "serde", ] -[[package]] -name = "sha-1" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "sha1" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" -dependencies = [ - "sha1_smol", -] - [[package]] name = "sha1" version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] -[[package]] -name = "sha1_smol" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" - [[package]] name = "sha2" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99c3bd8169c58782adad9290a9af5939994036b76187f7b4f0e6de91dbbfc0ec" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest 0.10.7", + "digest", ] [[package]] @@ -2193,17 +1528,6 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" -[[package]] -name = "socket2" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "winapi 0.3.9", -] - [[package]] name = "socket2" version = "0.4.9" @@ -2211,7 +1535,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2220,64 +1544,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -[[package]] -name = "standback" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" -dependencies = [ - "version_check", -] - -[[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version 0.2.3", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "serde_derive", - "syn 1.0.85", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2", - "quote", - "serde", - "serde_derive", - "serde_json", - "sha1 0.6.1", - "syn 1.0.85", -] - -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - [[package]] name = "strsim" version = "0.10.0" @@ -2315,60 +1581,16 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "thiserror" -version = "1.0.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.85", -] - -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "time" -version = "0.2.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" -dependencies = [ - "const_fn", - "libc", - "standback", - "stdweb", - "time-macros 0.1.1", - "version_check", - "winapi 0.3.9", -] - [[package]] name = "time" version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" dependencies = [ - "itoa 1.0.1", + "itoa", "serde", "time-core", - "time-macros 0.2.9", + "time-macros", ] [[package]] @@ -2377,16 +1599,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" -[[package]] -name = "time-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" -dependencies = [ - "proc-macro-hack", - "time-macros-impl", -] - [[package]] name = "time-macros" version = "0.2.9" @@ -2396,19 +1608,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "time-macros-impl" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "standback", - "syn 1.0.85", -] - [[package]] name = "tinyvec" version = "1.5.1" @@ -2426,53 +1625,19 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "0.2.25" +version = "1.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092" +checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "iovec", - "lazy_static", + "autocfg", + "bytes", "libc", - "memchr", - "mio 0.6.23", - "mio-uds", - "pin-project-lite 0.1.12", - "signal-hook-registry", - "slab", - "winapi 0.3.9", -] - -[[package]] -name = "tokio" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbbf1c778ec206785635ce8ad57fe52b3009ae9e0c9f574a728f3049d3e55838" -dependencies = [ - "bytes 1.1.0", - "libc", - "memchr", - "mio 0.7.14", - "num_cpus", - "once_cell", + "mio", "parking_lot", - "pin-project-lite 0.2.8", + "pin-project-lite", "signal-hook-registry", - "tokio-macros", - "winapi 0.3.9", -] - -[[package]] -name = "tokio-macros" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.85", + "socket2", + "windows-sys", ] [[package]] @@ -2482,36 +1647,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ "rustls", - "tokio 1.15.0", + "tokio", "webpki", ] -[[package]] -name = "tokio-util" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" -dependencies = [ - "bytes 0.5.6", - "futures-core", - "futures-io", - "futures-sink", - "log", - "pin-project-lite 0.1.12", - "tokio 0.2.25", -] - [[package]] name = "tokio-util" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" dependencies = [ - "bytes 1.1.0", + "bytes", "futures-core", "futures-sink", - "pin-project-lite 0.2.8", - "tokio 1.15.0", + "pin-project-lite", + "tokio", "tracing", ] @@ -2521,9 +1671,9 @@ version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log", - "pin-project-lite 0.2.8", + "pin-project-lite", "tracing-attributes", "tracing-core", ] @@ -2548,55 +1698,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project 1.0.10", - "tracing", -] - -[[package]] -name = "trust-dns-proto" -version = "0.19.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cad71a0c0d68ab9941d2fb6e82f8fb2e86d9945b94e1661dd0aaea2b88215a9" -dependencies = [ - "async-trait", - "cfg-if 1.0.0", - "enum-as-inner", - "futures", - "idna", - "lazy_static", - "log", - "rand 0.7.3", - "smallvec", - "thiserror", - "tokio 0.2.25", - "url", -] - -[[package]] -name = "trust-dns-resolver" -version = "0.19.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "710f593b371175db53a26d0b38ed2978fafb9e9e8d3868b1acd753ea18df0ceb" -dependencies = [ - "cfg-if 0.1.10", - "futures", - "ipconfig", - "lazy_static", - "log", - "lru-cache", - "resolv-conf", - "smallvec", - "thiserror", - "tokio 0.2.25", - "trust-dns-proto", -] - [[package]] name = "typenum" version = "1.15.0" @@ -2633,12 +1734,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" - [[package]] name = "unicode-xid" version = "0.2.2" @@ -2675,18 +1770,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.10.3+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a2e384a3f170b0c7543787a91411175b71afd56ba4d3a0ae5678d4e2243c0e" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -2699,7 +1782,7 @@ version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] @@ -2776,18 +1859,6 @@ dependencies = [ "webpki", ] -[[package]] -name = "widestring" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -2798,12 +1869,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2816,7 +1881,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2891,39 +1956,20 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" -[[package]] -name = "winreg" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "zstd" -version = "0.11.2+zstd.1.5.2" +version = "0.12.3+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +checksum = "76eea132fb024e0e13fd9c2f5d5d595d8a967aa72382ac2f9d39fcc95afd0806" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" +version = "6.0.5+zstd.1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +checksum = "d56d9e60b4b1758206c238a10165fbcae3ca37b01744e394c463463f6529d23b" dependencies = [ "libc", "zstd-sys", diff --git a/Cargo.toml b/Cargo.toml index 2e3961d..205933c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,21 +13,21 @@ keywords = ["chat", "Chatting", "Talk", "Stranger"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -actix = "0.10" +actix = "0.13" actix-web = { version = "4", features = ["rustls"] } -actix-web-actors = "3" -actix-broker = "0.3" +actix-web-actors = "4" +actix-broker = "0.4" actix-files = "0.6" -env_logger = "0.9" +awc = "3.1" +env_logger = "0.10" openssl = "0.10" clap = { version = "4", features = ["derive"] } lazy_static = "1.4" - -serde = "1.0" +serde = { version = "1.0", features = ["serde_derive"] } serde_json = "1.0" rand = "0.8" -tokio = { version = "1.5", features = ['rt', 'rt-multi-thread', 'macros'] } +futures = "0.3" sha2 = "0.10" base64 = "0.21" diff --git a/src/broker_messages/mod.rs b/src/broker_messages/mod.rs index e2d7827..c83f19a 100644 --- a/src/broker_messages/mod.rs +++ b/src/broker_messages/mod.rs @@ -17,7 +17,8 @@ use crate::ws_sansad::WsSansad; use actix::prelude::*; -use dev::{MessageResponse, ResponseChannel}; +use dev::MessageResponse; +// use dev::ResponseChannel; pub mod pind; pub mod sansad; diff --git a/src/broker_messages/util.rs b/src/broker_messages/util.rs index b7cc558..461f212 100644 --- a/src/broker_messages/util.rs +++ b/src/broker_messages/util.rs @@ -15,24 +15,10 @@ along with Lupt. If not, see */ -use super::*; - -//################################################## Helper ################################################## +// //################################################## Helper ################################################## #[derive(Debug)] pub enum Resp { Ok, Err(String), None, } - -impl MessageResponse for Resp -where - A: Actor, - M: Message, -{ - fn handle>(self, _: &mut A::Context, tx: Option) { - if let Some(tx) = tx { - tx.send(self); - } - } -} diff --git a/src/chat_pinnd/user.rs b/src/chat_pinnd/user.rs index 37ec8f1..b63e268 100644 --- a/src/chat_pinnd/user.rs +++ b/src/chat_pinnd/user.rs @@ -19,7 +19,7 @@ use super::*; /// Join kaksh impl Handler for ChatPinnd { - type Result = Resp; + type Result = MessageResult; fn handle(&mut self, msg: ms::pind::JoinKaksh, _: &mut Self::Context) -> Self::Result { // check if user exist @@ -28,7 +28,7 @@ impl Handler for ChatPinnd { .iter() .position(|vk| vk.kunjika == msg.kunjika) { - return Resp::Err("Kunjika already exist".to_owned()); + return MessageResult(Resp::Err("Kunjika already exist".to_owned())); } if let Some(_) = self.kaksh.iter().position(|(_, g)| { @@ -37,7 +37,7 @@ impl Handler for ChatPinnd { None => false, } }) { - return Resp::Err("Kunjika already exist".to_owned()); + return MessageResult(Resp::Err("Kunjika already exist".to_owned())); } // check if kaksh exist and add user @@ -47,7 +47,7 @@ impl Handler for ChatPinnd { // check if kaksh have no space left if let Some(n) = kaksh.length { if kaksh.loog.len() >= n { - return Resp::Err("Kaksh have no space".to_owned()); + return MessageResult(Resp::Err("Kaksh have no space".to_owned())); } } @@ -80,7 +80,7 @@ impl Handler for ChatPinnd { } } - Resp::Ok + MessageResult(Resp::Ok) } } @@ -89,7 +89,7 @@ impl Handler for ChatPinnd { /// Check if watchlist is empty, if yes add the kunjika andaddr to watchlist /// if watchlist have people get 0th person an connect it impl Handler for ChatPinnd { - type Result = Resp; + type Result = MessageResult; fn handle(&mut self, msg: ms::pind::JoinRandom, _: &mut Self::Context) -> Self::Result { // check if user exist if let Some(_) = self @@ -97,7 +97,7 @@ impl Handler for ChatPinnd { .iter() .position(|vk| vk.kunjika == msg.kunjika) { - return Resp::Err("Kunjika already exist".to_owned()); + return MessageResult(Resp::Err("Kunjika already exist".to_owned())); } if let Some(_) = self.kaksh.iter().position(|(_, g)| { @@ -106,7 +106,7 @@ impl Handler for ChatPinnd { None => false, } }) { - return Resp::Err("Kunjika already exist".to_owned()); + return MessageResult(Resp::Err("Kunjika already exist".to_owned())); } // Check if watch list is empty @@ -117,7 +117,7 @@ impl Handler for ChatPinnd { name: msg.name, tags: msg.tags, }); - return Resp::None; + return MessageResult(Resp::None); } // connect person with tag @@ -136,7 +136,7 @@ impl Handler for ChatPinnd { name: msg.name, tags: msg.tags, }); - return Resp::None; + return MessageResult(Resp::None); } } } else { @@ -185,22 +185,22 @@ impl Handler for ChatPinnd { kaksh_kunjika: group_kunjika, }); - Resp::Ok + MessageResult(Resp::Ok) } } /// Next Random next vayakti impl Handler for ChatPinnd { - type Result = Resp; + type Result = MessageResult; fn handle(&mut self, msg: ms::pind::JoinRandomNext, _: &mut Self::Context) -> Self::Result { let kaksh = match self.kaksh.get_mut(&msg.kaksh_kunjika) { Some(v) => v, - None => return Resp::Err("Failed to join, check entries!".to_owned()), + None => return MessageResult(Resp::Err("Failed to join, check entries!".to_owned())), }; let loog_i = match kaksh.loog.iter().position(|a| a.kunjika == msg.kunjika) { Some(v) => v, - None => return Resp::Err("Failed to join, check entries!".to_owned()), + None => return MessageResult(Resp::Err("Failed to join, check entries!".to_owned())), }; let addr; @@ -210,18 +210,22 @@ impl Handler for ChatPinnd { { let loog = match kaksh.loog.get(loog_i) { Some(v) => v, - None => return Resp::Err("Failed to join, check entries!".to_owned()), + None => { + return MessageResult(Resp::Err("Failed to join, check entries!".to_owned())) + } }; if let None = loog.tags { - return Resp::Err("You are not a randome vyakti!".to_owned()); + return MessageResult(Resp::Err("You are not a randome vyakti!".to_owned())); } addr = loog.addr.clone(); name = loog.name.to_owned(); tags = match loog.tags.clone() { Some(v) => v, - None => return Resp::Err("Failed to join, check entries!".to_owned()), + None => { + return MessageResult(Resp::Err("Failed to join, check entries!".to_owned())) + } }; } @@ -242,7 +246,7 @@ impl Handler for ChatPinnd { name, tags, }); - return Resp::None; + return MessageResult(Resp::None); } // connect person with tag or to zero let pos = if tags.len() > 0 { @@ -260,7 +264,7 @@ impl Handler for ChatPinnd { name, tags, }); - return Resp::None; + return MessageResult(Resp::None); } } } else { @@ -314,7 +318,7 @@ impl Handler for ChatPinnd { kaksh_kunjika: group_kunjika, }); - Resp::Ok + MessageResult(Resp::Ok) } } diff --git a/src/main.rs b/src/main.rs index e4b3db4..5ef402c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,13 +31,9 @@ extern crate lazy_static; extern crate anyhow; use actix_files as fs; -use actix_ratelimit::{MemoryStore, MemoryStoreActor, RateLimiter}; -use actix_web::{ - client::{Client, Connector}, - middleware::Logger, - web, App, Error, HttpRequest, HttpResponse, HttpServer, -}; +use actix_web::{middleware::Logger, web, App, Error, HttpRequest, HttpResponse, HttpServer}; use actix_web_actors::ws; +use awc::Client; use config::CONFIG; use rustls::{Certificate, PrivateKey, ServerConfig}; use std::fs::File; @@ -133,9 +129,7 @@ async fn gif(req: HttpRequest) -> Result { pos = "" } - let client = Client::builder() - .connector(Connector::new().finish()) - .finish(); + let client = Client::default(); let tenor_key = CONFIG.tenor_key.clone().unwrap(); @@ -155,11 +149,13 @@ async fn gif(req: HttpRequest) -> Result { let response = client .get(url) - .header("User-Agent", "actix-web/3.0") + .insert_header(("User-Agent", "actix-web/3.0")) .send() - .await? + .await + .unwrap() .body() - .await?; + .await + .unwrap(); // need handle errors Ok(HttpResponse::Ok() .content_type("application/json") diff --git a/src/ws_sansad/mod.rs b/src/ws_sansad/mod.rs index 9672ace..c50ff55 100644 --- a/src/ws_sansad/mod.rs +++ b/src/ws_sansad/mod.rs @@ -39,11 +39,6 @@ const HEARTBEAT_INTERVAL: Duration = Duration::from_secs(5); /// How long before lack of client response causes a timeout const CLIENT_TIMEOUT: Duration = Duration::from_secs(15); -/// How often heartbeat pings are sent -const SPECIAL_HEARTBEAT_INTERVAL: Duration = Duration::from_secs(3 * 60); -/// How long before lack of client response causes a timeout -const SPECIAL_CLIENT_TIMEOUT: Duration = Duration::from_secs(15 * 60); - pub struct WsSansad { kunjika: String, isthiti: Isthiti, @@ -65,13 +60,11 @@ impl Actor for WsSansad { fn started(&mut self, ctx: &mut Self::Context) { self.addr = Some(ctx.address().clone()); // own addr self.hb(ctx); - self.special_hb(ctx); } fn stopping(&mut self, _: &mut Self::Context) -> Running { - tokio::runtime::Runtime::new() - .unwrap() - .block_on(self.leave_kaksh()); // notify leaving + futures::executor::block_on(self.leave_kaksh()); + Running::Stop } } @@ -89,9 +82,10 @@ impl StreamHandler> for WsSansad { } Ok(ws::Message::Text(msg)) => { self.special_hb = Instant::now(); - tokio::runtime::Runtime::new() - .unwrap() - .block_on(self.parse_text_handle(msg)); + // tokio::runtime::Runtime::new() + // .unwrap() + // .block_on(self.parse_text_handle(msg.to_string())); + futures::executor::block_on(self.parse_text_handle(msg.to_string())); } Ok(ws::Message::Close(msg)) => { ctx.close(msg); @@ -123,9 +117,7 @@ impl WsSansad { // heartbeat timed out // stop actor - tokio::runtime::Runtime::new() - .unwrap() - .block_on(act.leave_kaksh()); + futures::executor::block_on(act.leave_kaksh()); ctx.stop(); // don't try to send a ping return; @@ -135,27 +127,6 @@ impl WsSansad { }); } - /// helper method that sends ping to client every second. - /// - /// also this method checks heartbeats from client - fn special_hb(&self, ctx: &mut ::Context) { - ctx.run_interval(SPECIAL_HEARTBEAT_INTERVAL, |act, ctx| { - // check client heartbeats - if Instant::now().duration_since(act.special_hb) > SPECIAL_CLIENT_TIMEOUT { - // heartbeat timed out - - // stop actor - tokio::runtime::Runtime::new() - .unwrap() - .block_on(act.leave_kaksh()); - ctx.stop(); - // don't try to send a ping - return; - } - ctx.ping(b""); - }); - } - /// parse the request text from client async fn parse_text_handle(&mut self, msg: String) { if let Ok(val) = serde_json::from_str::(&msg) { From 4e05d9a84da55f8430b938e4ace488cfe49f0f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piyush=20=E0=A4=AE=E0=A4=BF=E0=A4=B6=E0=A5=8D=E0=A4=B0?= Date: Sun, 18 Jun 2023 12:12:24 +0530 Subject: [PATCH 3/5] Renamed few stuffs --- src/broker_messages/mod.rs | 2 +- src/broker_messages/pind.rs | 8 +-- src/broker_messages/{util.rs => responses.rs} | 2 +- src/chat_pinnd/mod.rs | 2 +- src/chat_pinnd/user.rs | 50 ++++++++++++------- src/ws_sansad/mod.rs | 2 +- src/ws_sansad/users.rs | 20 ++++---- 7 files changed, 51 insertions(+), 35 deletions(-) rename src/broker_messages/{util.rs => responses.rs} (96%) diff --git a/src/broker_messages/mod.rs b/src/broker_messages/mod.rs index c83f19a..6fb1f9f 100644 --- a/src/broker_messages/mod.rs +++ b/src/broker_messages/mod.rs @@ -21,5 +21,5 @@ use dev::MessageResponse; // use dev::ResponseChannel; pub mod pind; +pub mod responses; pub mod sansad; -pub mod util; diff --git a/src/broker_messages/pind.rs b/src/broker_messages/pind.rs index 95b2410..152df40 100644 --- a/src/broker_messages/pind.rs +++ b/src/broker_messages/pind.rs @@ -16,7 +16,7 @@ */ //! Messages to be sent between Actors -use super::util::Resp; +use super::responses::ResultResponse; use super::*; //################################################## For ChatPinnd ################################################## @@ -24,7 +24,7 @@ use super::*; /// Request to Kaksh with its kunjika #[derive(Clone, Message)] -#[rtype(result = "Resp")] +#[rtype(result = "ResultResponse")] pub struct JoinKaksh { pub kaksh_kunjika: String, pub length: Option, @@ -35,7 +35,7 @@ pub struct JoinKaksh { /// Request to connect Random vayakti #[derive(Clone, Message)] -#[rtype(result = "Resp")] +#[rtype(result = "ResultResponse")] pub struct JoinRandom { pub addr: Addr, pub kunjika: String, @@ -44,7 +44,7 @@ pub struct JoinRandom { } /// Request to connect Random Next vayakti #[derive(Clone, Message)] -#[rtype(result = "Resp")] +#[rtype(result = "ResultResponse")] pub struct JoinRandomNext { pub kaksh_kunjika: String, pub kunjika: String, diff --git a/src/broker_messages/util.rs b/src/broker_messages/responses.rs similarity index 96% rename from src/broker_messages/util.rs rename to src/broker_messages/responses.rs index 461f212..88b3fcc 100644 --- a/src/broker_messages/util.rs +++ b/src/broker_messages/responses.rs @@ -17,7 +17,7 @@ // //################################################## Helper ################################################## #[derive(Debug)] -pub enum Resp { +pub enum ResultResponse { Ok, Err(String), None, diff --git a/src/chat_pinnd/mod.rs b/src/chat_pinnd/mod.rs index 50b093d..ba8c887 100644 --- a/src/chat_pinnd/mod.rs +++ b/src/chat_pinnd/mod.rs @@ -25,7 +25,7 @@ use std::{collections::HashMap, vec}; use actix::prelude::*; use actix_broker::BrokerSubscribe; -use crate::{broker_messages as ms, broker_messages::util::Resp, ws_sansad}; +use crate::{broker_messages as ms, broker_messages::responses::ResultResponse, ws_sansad}; #[allow(dead_code)] pub struct ChatPinnd { diff --git a/src/chat_pinnd/user.rs b/src/chat_pinnd/user.rs index b63e268..4d2ccb2 100644 --- a/src/chat_pinnd/user.rs +++ b/src/chat_pinnd/user.rs @@ -28,7 +28,7 @@ impl Handler for ChatPinnd { .iter() .position(|vk| vk.kunjika == msg.kunjika) { - return MessageResult(Resp::Err("Kunjika already exist".to_owned())); + return MessageResult(ResultResponse::Err("Kunjika already exist".to_owned())); } if let Some(_) = self.kaksh.iter().position(|(_, g)| { @@ -37,7 +37,7 @@ impl Handler for ChatPinnd { None => false, } }) { - return MessageResult(Resp::Err("Kunjika already exist".to_owned())); + return MessageResult(ResultResponse::Err("Kunjika already exist".to_owned())); } // check if kaksh exist and add user @@ -47,7 +47,9 @@ impl Handler for ChatPinnd { // check if kaksh have no space left if let Some(n) = kaksh.length { if kaksh.loog.len() >= n { - return MessageResult(Resp::Err("Kaksh have no space".to_owned())); + return MessageResult(ResultResponse::Err( + "Kaksh have no space".to_owned(), + )); } } @@ -80,7 +82,7 @@ impl Handler for ChatPinnd { } } - MessageResult(Resp::Ok) + MessageResult(ResultResponse::Ok) } } @@ -97,7 +99,7 @@ impl Handler for ChatPinnd { .iter() .position(|vk| vk.kunjika == msg.kunjika) { - return MessageResult(Resp::Err("Kunjika already exist".to_owned())); + return MessageResult(ResultResponse::Err("Kunjika already exist".to_owned())); } if let Some(_) = self.kaksh.iter().position(|(_, g)| { @@ -106,7 +108,7 @@ impl Handler for ChatPinnd { None => false, } }) { - return MessageResult(Resp::Err("Kunjika already exist".to_owned())); + return MessageResult(ResultResponse::Err("Kunjika already exist".to_owned())); } // Check if watch list is empty @@ -117,7 +119,7 @@ impl Handler for ChatPinnd { name: msg.name, tags: msg.tags, }); - return MessageResult(Resp::None); + return MessageResult(ResultResponse::None); } // connect person with tag @@ -136,7 +138,7 @@ impl Handler for ChatPinnd { name: msg.name, tags: msg.tags, }); - return MessageResult(Resp::None); + return MessageResult(ResultResponse::None); } } } else { @@ -185,7 +187,7 @@ impl Handler for ChatPinnd { kaksh_kunjika: group_kunjika, }); - MessageResult(Resp::Ok) + MessageResult(ResultResponse::Ok) } } @@ -195,12 +197,20 @@ impl Handler for ChatPinnd { fn handle(&mut self, msg: ms::pind::JoinRandomNext, _: &mut Self::Context) -> Self::Result { let kaksh = match self.kaksh.get_mut(&msg.kaksh_kunjika) { Some(v) => v, - None => return MessageResult(Resp::Err("Failed to join, check entries!".to_owned())), + None => { + return MessageResult(ResultResponse::Err( + "Failed to join, check entries!".to_owned(), + )) + } }; let loog_i = match kaksh.loog.iter().position(|a| a.kunjika == msg.kunjika) { Some(v) => v, - None => return MessageResult(Resp::Err("Failed to join, check entries!".to_owned())), + None => { + return MessageResult(ResultResponse::Err( + "Failed to join, check entries!".to_owned(), + )) + } }; let addr; @@ -211,12 +221,16 @@ impl Handler for ChatPinnd { let loog = match kaksh.loog.get(loog_i) { Some(v) => v, None => { - return MessageResult(Resp::Err("Failed to join, check entries!".to_owned())) + return MessageResult(ResultResponse::Err( + "Failed to join, check entries!".to_owned(), + )) } }; if let None = loog.tags { - return MessageResult(Resp::Err("You are not a randome vyakti!".to_owned())); + return MessageResult(ResultResponse::Err( + "You are not a randome vyakti!".to_owned(), + )); } addr = loog.addr.clone(); @@ -224,7 +238,9 @@ impl Handler for ChatPinnd { tags = match loog.tags.clone() { Some(v) => v, None => { - return MessageResult(Resp::Err("Failed to join, check entries!".to_owned())) + return MessageResult(ResultResponse::Err( + "Failed to join, check entries!".to_owned(), + )) } }; } @@ -246,7 +262,7 @@ impl Handler for ChatPinnd { name, tags, }); - return MessageResult(Resp::None); + return MessageResult(ResultResponse::None); } // connect person with tag or to zero let pos = if tags.len() > 0 { @@ -264,7 +280,7 @@ impl Handler for ChatPinnd { name, tags, }); - return MessageResult(Resp::None); + return MessageResult(ResultResponse::None); } } } else { @@ -318,7 +334,7 @@ impl Handler for ChatPinnd { kaksh_kunjika: group_kunjika, }); - MessageResult(Resp::Ok) + MessageResult(ResultResponse::Ok) } } diff --git a/src/ws_sansad/mod.rs b/src/ws_sansad/mod.rs index c50ff55..9a43368 100644 --- a/src/ws_sansad/mod.rs +++ b/src/ws_sansad/mod.rs @@ -29,7 +29,7 @@ use std::time::{Duration, Instant}; use crate::{ broker_messages as ms, - broker_messages::util::Resp, + broker_messages::responses::ResultResponse, chat_pinnd::ChatPinnd, validator::{validate, Validation as vl}, }; diff --git a/src/ws_sansad/users.rs b/src/ws_sansad/users.rs index a9b2386..7d0f476 100644 --- a/src/ws_sansad/users.rs +++ b/src/ws_sansad/users.rs @@ -98,7 +98,7 @@ impl WsSansad { }; // request - let result: Resp = ChatPinnd::from_registry() + let result: ResultResponse = ChatPinnd::from_registry() .send(ms::pind::JoinKaksh { kaksh_kunjika: kaksh_kunjika.to_owned(), length, @@ -110,8 +110,8 @@ impl WsSansad { .unwrap(); match result { - Resp::Err(err) => self.send_err_response(&err), - Resp::Ok => { + ResultResponse::Err(err) => self.send_err_response(&err), + ResultResponse::Ok => { self.isthiti = Isthiti::Kaksh(kaksh_kunjika); self.addr .clone() @@ -189,7 +189,7 @@ impl WsSansad { }; // request - let result: Resp = ChatPinnd::from_registry() + let result: ResultResponse = ChatPinnd::from_registry() .send(ms::pind::JoinRandom { addr: self.addr.clone().unwrap(), kunjika: kunjika.to_owned(), @@ -200,8 +200,8 @@ impl WsSansad { .unwrap(); match result { - Resp::Err(err) => self.send_err_response(&err), - Resp::Ok => { + ResultResponse::Err(err) => self.send_err_response(&err), + ResultResponse::Ok => { self.addr .clone() .unwrap() @@ -210,7 +210,7 @@ impl WsSansad { }); self.kunjika = kunjika; } - Resp::None => { + ResultResponse::None => { self.addr.clone().unwrap().do_send(ms::sansad::WsResponse { result: "watch".to_owned(), message: "Watchlist".to_owned(), @@ -243,7 +243,7 @@ impl WsSansad { }; // request - let result: Resp = ChatPinnd::from_registry() + let result: ResultResponse = ChatPinnd::from_registry() .send(ms::pind::JoinRandomNext { kunjika: self.kunjika.to_owned(), kaksh_kunjika: kaksh_kunjika.to_owned(), @@ -252,8 +252,8 @@ impl WsSansad { .unwrap(); match result { - Resp::Err(err) => self.send_err_response(&err), - Resp::None => { + ResultResponse::Err(err) => self.send_err_response(&err), + ResultResponse::None => { self.addr.clone().unwrap().do_send(ms::sansad::WsResponse { result: "watch".to_owned(), message: "Watchlist".to_owned(), From 5b624427793eb6bef1e3088566cd6aa66dd6a9fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piyush=20=E0=A4=AE=E0=A4=BF=E0=A4=B6=E0=A5=8D=E0=A4=B0?= Date: Sun, 18 Jun 2023 12:22:56 +0530 Subject: [PATCH 4/5] Changed depricated function in base64 --- src/broker_messages/mod.rs | 2 -- src/main.rs | 2 +- src/ws_sansad/users.rs | 10 ++++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/broker_messages/mod.rs b/src/broker_messages/mod.rs index 6fb1f9f..dd24051 100644 --- a/src/broker_messages/mod.rs +++ b/src/broker_messages/mod.rs @@ -17,8 +17,6 @@ use crate::ws_sansad::WsSansad; use actix::prelude::*; -use dev::MessageResponse; -// use dev::ResponseChannel; pub mod pind; pub mod responses; diff --git a/src/main.rs b/src/main.rs index 5ef402c..af181c8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -105,7 +105,7 @@ fn gen_rustls_server_config(key: String, cert: String) -> ServerConfig { let private_key = PrivateKey(private_key.to_owned()); - let mut config = ServerConfig::builder() + let config = ServerConfig::builder() .with_safe_default_cipher_suites() .with_safe_default_kx_groups() .with_safe_default_protocol_versions() diff --git a/src/ws_sansad/users.rs b/src/ws_sansad/users.rs index 7d0f476..74c5b7f 100644 --- a/src/ws_sansad/users.rs +++ b/src/ws_sansad/users.rs @@ -17,7 +17,9 @@ use super::*; use crate::config::CONFIG; +use base64::Engine; use sha2::{Digest, Sha224}; + impl WsSansad { /// Request to join to kaksh pub async fn join_kaksh(&mut self, val: Value) { @@ -56,7 +58,9 @@ impl WsSansad { } let mut hasher = Sha224::new(); hasher.update(format!("{}{}", kunjika, CONFIG.salt).as_bytes()); - let kunjika = base64::encode(hasher.finalize())[..8].to_owned(); + let kunjika = base64::engine::general_purpose::STANDARD_NO_PAD.encode(hasher.finalize()) + [..8] + .to_owned(); // Name let name = match val.get("name") { @@ -161,7 +165,9 @@ impl WsSansad { } let mut hasher = Sha224::new(); hasher.update(format!("{}{}", kunjika, &CONFIG.salt).as_bytes()); - let kunjika = base64::encode(hasher.finalize())[..8].to_owned(); + let kunjika = base64::engine::general_purpose::STANDARD_NO_PAD.encode(hasher.finalize()) + [..8] + .to_owned(); // Name let name = match val.get("name") { From c518e8cf91729561b773985ddbfda069756b1a07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piyush=20=E0=A4=AE=E0=A4=BF=E0=A4=B6=E0=A5=8D=E0=A4=B0?= Date: Sun, 25 Jun 2023 21:54:57 +0530 Subject: [PATCH 5/5] Removed useless lines --- src/ws_sansad/mod.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/ws_sansad/mod.rs b/src/ws_sansad/mod.rs index 9a43368..f50a23f 100644 --- a/src/ws_sansad/mod.rs +++ b/src/ws_sansad/mod.rs @@ -44,7 +44,6 @@ pub struct WsSansad { isthiti: Isthiti, addr: Option>, hb: Instant, - special_hb: Instant, } #[derive(Debug)] @@ -81,10 +80,6 @@ impl StreamHandler> for WsSansad { self.hb = Instant::now(); } Ok(ws::Message::Text(msg)) => { - self.special_hb = Instant::now(); - // tokio::runtime::Runtime::new() - // .unwrap() - // .block_on(self.parse_text_handle(msg.to_string())); futures::executor::block_on(self.parse_text_handle(msg.to_string())); } Ok(ws::Message::Close(msg)) => { @@ -103,7 +98,6 @@ impl WsSansad { isthiti: Isthiti::None, addr: None, hb: Instant::now(), - special_hb: Instant::now(), } }