aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock543
-rw-r--r--Cargo.toml2
-rw-r--r--src/auth.rs12
-rw-r--r--src/error.rs8
-rw-r--r--src/main.rs14
-rw-r--r--src/routes/device.rs26
-rw-r--r--src/routes/start.rs72
-rw-r--r--src/routes/status.rs2
-rw-r--r--src/services/ping.rs14
-rw-r--r--src/wol.rs14
10 files changed, 397 insertions, 310 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 8fcbfe8..bf75375 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -19,20 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
19 19
20[[package]] 20[[package]]
21name = "ahash" 21name = "ahash"
22version = "0.7.7" 22version = "0.8.8"
23source = "registry+https://github.com/rust-lang/crates.io-index" 23source = "registry+https://github.com/rust-lang/crates.io-index"
24checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" 24checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff"
25dependencies = [
26 "getrandom",
27 "once_cell",
28 "version_check",
29]
30
31[[package]]
32name = "ahash"
33version = "0.8.6"
34source = "registry+https://github.com/rust-lang/crates.io-index"
35checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a"
36dependencies = [ 25dependencies = [
37 "cfg-if", 26 "cfg-if",
38 "getrandom", 27 "getrandom",
@@ -58,13 +47,13 @@ checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5"
58 47
59[[package]] 48[[package]]
60name = "async-trait" 49name = "async-trait"
61version = "0.1.74" 50version = "0.1.77"
62source = "registry+https://github.com/rust-lang/crates.io-index" 51source = "registry+https://github.com/rust-lang/crates.io-index"
63checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" 52checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9"
64dependencies = [ 53dependencies = [
65 "proc-macro2", 54 "proc-macro2",
66 "quote", 55 "quote",
67 "syn 2.0.39", 56 "syn 2.0.48",
68] 57]
69 58
70[[package]] 59[[package]]
@@ -78,9 +67,9 @@ dependencies = [
78 67
79[[package]] 68[[package]]
80name = "atomic-write-file" 69name = "atomic-write-file"
81version = "0.1.1" 70version = "0.1.2"
82source = "registry+https://github.com/rust-lang/crates.io-index" 71source = "registry+https://github.com/rust-lang/crates.io-index"
83checksum = "9ae364a6c1301604bbc6dfbf8c385c47ff82301dd01eef506195a029196d8d04" 72checksum = "edcdbedc2236483ab103a53415653d6b4442ea6141baf1ffa85df29635e88436"
84dependencies = [ 73dependencies = [
85 "nix", 74 "nix",
86 "rand", 75 "rand",
@@ -94,16 +83,16 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
94 83
95[[package]] 84[[package]]
96name = "axum" 85name = "axum"
97version = "0.7.1" 86version = "0.7.4"
98source = "registry+https://github.com/rust-lang/crates.io-index" 87source = "registry+https://github.com/rust-lang/crates.io-index"
99checksum = "810a80b128d70e6ed2bdf3fe8ed72c0ae56f5f5948d01c2753282dd92a84fce8" 88checksum = "1236b4b292f6c4d6dc34604bb5120d85c3fe1d1aa596bd5cc52ca054d13e7b9e"
100dependencies = [ 89dependencies = [
101 "async-trait", 90 "async-trait",
102 "axum-core", 91 "axum-core",
103 "base64 0.21.5", 92 "base64",
104 "bytes", 93 "bytes",
105 "futures-util", 94 "futures-util",
106 "http 1.0.0", 95 "http",
107 "http-body", 96 "http-body",
108 "http-body-util", 97 "http-body-util",
109 "hyper", 98 "hyper",
@@ -126,18 +115,19 @@ dependencies = [
126 "tower", 115 "tower",
127 "tower-layer", 116 "tower-layer",
128 "tower-service", 117 "tower-service",
118 "tracing",
129] 119]
130 120
131[[package]] 121[[package]]
132name = "axum-core" 122name = "axum-core"
133version = "0.4.0" 123version = "0.4.3"
134source = "registry+https://github.com/rust-lang/crates.io-index" 124source = "registry+https://github.com/rust-lang/crates.io-index"
135checksum = "de0ddc355eab88f4955090a823715df47acf0b7660aab7a69ad5ce6301ee3b73" 125checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3"
136dependencies = [ 126dependencies = [
137 "async-trait", 127 "async-trait",
138 "bytes", 128 "bytes",
139 "futures-util", 129 "futures-util",
140 "http 1.0.0", 130 "http",
141 "http-body", 131 "http-body",
142 "http-body-util", 132 "http-body-util",
143 "mime", 133 "mime",
@@ -146,18 +136,19 @@ dependencies = [
146 "sync_wrapper", 136 "sync_wrapper",
147 "tower-layer", 137 "tower-layer",
148 "tower-service", 138 "tower-service",
139 "tracing",
149] 140]
150 141
151[[package]] 142[[package]]
152name = "axum-macros" 143name = "axum-macros"
153version = "0.4.0" 144version = "0.4.1"
154source = "registry+https://github.com/rust-lang/crates.io-index" 145source = "registry+https://github.com/rust-lang/crates.io-index"
155checksum = "5a2edad600410b905404c594e2523549f1bcd4bded1e252c8f74524ccce0b867" 146checksum = "00c055ee2d014ae5981ce1016374e8213682aa14d9bf40e48ab48b5f3ef20eaa"
156dependencies = [ 147dependencies = [
157 "heck", 148 "heck",
158 "proc-macro2", 149 "proc-macro2",
159 "quote", 150 "quote",
160 "syn 2.0.39", 151 "syn 2.0.48",
161] 152]
162 153
163[[package]] 154[[package]]
@@ -177,15 +168,9 @@ dependencies = [
177 168
178[[package]] 169[[package]]
179name = "base64" 170name = "base64"
180version = "0.13.1" 171version = "0.21.7"
181source = "registry+https://github.com/rust-lang/crates.io-index" 172source = "registry+https://github.com/rust-lang/crates.io-index"
182checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" 173checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
183
184[[package]]
185name = "base64"
186version = "0.21.5"
187source = "registry+https://github.com/rust-lang/crates.io-index"
188checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9"
189 174
190[[package]] 175[[package]]
191name = "base64ct" 176name = "base64ct"
@@ -201,9 +186,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
201 186
202[[package]] 187[[package]]
203name = "bitflags" 188name = "bitflags"
204version = "2.4.1" 189version = "2.4.2"
205source = "registry+https://github.com/rust-lang/crates.io-index" 190source = "registry+https://github.com/rust-lang/crates.io-index"
206checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" 191checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf"
207dependencies = [ 192dependencies = [
208 "serde", 193 "serde",
209] 194]
@@ -273,11 +258,12 @@ dependencies = [
273 258
274[[package]] 259[[package]]
275name = "config" 260name = "config"
276version = "0.13.4" 261version = "0.14.0"
277source = "registry+https://github.com/rust-lang/crates.io-index" 262source = "registry+https://github.com/rust-lang/crates.io-index"
278checksum = "23738e11972c7643e4ec947840fc463b6a571afcd3e735bdfce7d03c7a784aca" 263checksum = "7328b20597b53c2454f0b1919720c25c7339051c02b72b7e05409e00b14132be"
279dependencies = [ 264dependencies = [
280 "async-trait", 265 "async-trait",
266 "convert_case",
281 "json5", 267 "json5",
282 "lazy_static", 268 "lazy_static",
283 "nom", 269 "nom",
@@ -292,15 +278,44 @@ dependencies = [
292 278
293[[package]] 279[[package]]
294name = "const-oid" 280name = "const-oid"
295version = "0.9.5" 281version = "0.9.6"
282source = "registry+https://github.com/rust-lang/crates.io-index"
283checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
284
285[[package]]
286name = "const-random"
287version = "0.1.17"
296source = "registry+https://github.com/rust-lang/crates.io-index" 288source = "registry+https://github.com/rust-lang/crates.io-index"
297checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" 289checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a"
290dependencies = [
291 "const-random-macro",
292]
293
294[[package]]
295name = "const-random-macro"
296version = "0.1.16"
297source = "registry+https://github.com/rust-lang/crates.io-index"
298checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e"
299dependencies = [
300 "getrandom",
301 "once_cell",
302 "tiny-keccak",
303]
304
305[[package]]
306name = "convert_case"
307version = "0.6.0"
308source = "registry+https://github.com/rust-lang/crates.io-index"
309checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca"
310dependencies = [
311 "unicode-segmentation",
312]
298 313
299[[package]] 314[[package]]
300name = "cpufeatures" 315name = "cpufeatures"
301version = "0.2.11" 316version = "0.2.12"
302source = "registry+https://github.com/rust-lang/crates.io-index" 317source = "registry+https://github.com/rust-lang/crates.io-index"
303checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" 318checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504"
304dependencies = [ 319dependencies = [
305 "libc", 320 "libc",
306] 321]
@@ -322,22 +337,24 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
322 337
323[[package]] 338[[package]]
324name = "crossbeam-queue" 339name = "crossbeam-queue"
325version = "0.3.8" 340version = "0.3.11"
326source = "registry+https://github.com/rust-lang/crates.io-index" 341source = "registry+https://github.com/rust-lang/crates.io-index"
327checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" 342checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35"
328dependencies = [ 343dependencies = [
329 "cfg-if",
330 "crossbeam-utils", 344 "crossbeam-utils",
331] 345]
332 346
333[[package]] 347[[package]]
334name = "crossbeam-utils" 348name = "crossbeam-utils"
335version = "0.8.16" 349version = "0.8.19"
336source = "registry+https://github.com/rust-lang/crates.io-index" 350source = "registry+https://github.com/rust-lang/crates.io-index"
337checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" 351checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"
338dependencies = [ 352
339 "cfg-if", 353[[package]]
340] 354name = "crunchy"
355version = "0.2.2"
356source = "registry+https://github.com/rust-lang/crates.io-index"
357checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
341 358
342[[package]] 359[[package]]
343name = "crypto-common" 360name = "crypto-common"
@@ -381,9 +398,9 @@ dependencies = [
381 398
382[[package]] 399[[package]]
383name = "deranged" 400name = "deranged"
384version = "0.3.9" 401version = "0.3.11"
385source = "registry+https://github.com/rust-lang/crates.io-index" 402source = "registry+https://github.com/rust-lang/crates.io-index"
386checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" 403checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
387dependencies = [ 404dependencies = [
388 "powerfmt", 405 "powerfmt",
389] 406]
@@ -402,9 +419,12 @@ dependencies = [
402 419
403[[package]] 420[[package]]
404name = "dlv-list" 421name = "dlv-list"
405version = "0.3.0" 422version = "0.5.2"
406source = "registry+https://github.com/rust-lang/crates.io-index" 423source = "registry+https://github.com/rust-lang/crates.io-index"
407checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" 424checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f"
425dependencies = [
426 "const-random",
427]
408 428
409[[package]] 429[[package]]
410name = "dotenvy" 430name = "dotenvy"
@@ -414,9 +434,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"
414 434
415[[package]] 435[[package]]
416name = "either" 436name = "either"
417version = "1.9.0" 437version = "1.10.0"
418source = "registry+https://github.com/rust-lang/crates.io-index" 438source = "registry+https://github.com/rust-lang/crates.io-index"
419checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" 439checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a"
420dependencies = [ 440dependencies = [
421 "serde", 441 "serde",
422] 442]
@@ -456,9 +476,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
456 476
457[[package]] 477[[package]]
458name = "eyre" 478name = "eyre"
459version = "0.6.9" 479version = "0.6.12"
460source = "registry+https://github.com/rust-lang/crates.io-index" 480source = "registry+https://github.com/rust-lang/crates.io-index"
461checksum = "80f656be11ddf91bd709454d15d5bd896fbaf4cc3314e69349e4d1569f5b46cd" 481checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec"
462dependencies = [ 482dependencies = [
463 "indenter", 483 "indenter",
464 "once_cell", 484 "once_cell",
@@ -504,9 +524,9 @@ dependencies = [
504 524
505[[package]] 525[[package]]
506name = "futures-channel" 526name = "futures-channel"
507version = "0.3.29" 527version = "0.3.30"
508source = "registry+https://github.com/rust-lang/crates.io-index" 528source = "registry+https://github.com/rust-lang/crates.io-index"
509checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" 529checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78"
510dependencies = [ 530dependencies = [
511 "futures-core", 531 "futures-core",
512 "futures-sink", 532 "futures-sink",
@@ -514,15 +534,15 @@ dependencies = [
514 534
515[[package]] 535[[package]]
516name = "futures-core" 536name = "futures-core"
517version = "0.3.29" 537version = "0.3.30"
518source = "registry+https://github.com/rust-lang/crates.io-index" 538source = "registry+https://github.com/rust-lang/crates.io-index"
519checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" 539checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"
520 540
521[[package]] 541[[package]]
522name = "futures-executor" 542name = "futures-executor"
523version = "0.3.29" 543version = "0.3.30"
524source = "registry+https://github.com/rust-lang/crates.io-index" 544source = "registry+https://github.com/rust-lang/crates.io-index"
525checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" 545checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d"
526dependencies = [ 546dependencies = [
527 "futures-core", 547 "futures-core",
528 "futures-task", 548 "futures-task",
@@ -542,27 +562,27 @@ dependencies = [
542 562
543[[package]] 563[[package]]
544name = "futures-io" 564name = "futures-io"
545version = "0.3.29" 565version = "0.3.30"
546source = "registry+https://github.com/rust-lang/crates.io-index" 566source = "registry+https://github.com/rust-lang/crates.io-index"
547checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" 567checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1"
548 568
549[[package]] 569[[package]]
550name = "futures-sink" 570name = "futures-sink"
551version = "0.3.29" 571version = "0.3.30"
552source = "registry+https://github.com/rust-lang/crates.io-index" 572source = "registry+https://github.com/rust-lang/crates.io-index"
553checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" 573checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5"
554 574
555[[package]] 575[[package]]
556name = "futures-task" 576name = "futures-task"
557version = "0.3.29" 577version = "0.3.30"
558source = "registry+https://github.com/rust-lang/crates.io-index" 578source = "registry+https://github.com/rust-lang/crates.io-index"
559checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" 579checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004"
560 580
561[[package]] 581[[package]]
562name = "futures-util" 582name = "futures-util"
563version = "0.3.29" 583version = "0.3.30"
564source = "registry+https://github.com/rust-lang/crates.io-index" 584source = "registry+https://github.com/rust-lang/crates.io-index"
565checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" 585checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48"
566dependencies = [ 586dependencies = [
567 "futures-core", 587 "futures-core",
568 "futures-io", 588 "futures-io",
@@ -586,9 +606,9 @@ dependencies = [
586 606
587[[package]] 607[[package]]
588name = "getrandom" 608name = "getrandom"
589version = "0.2.11" 609version = "0.2.12"
590source = "registry+https://github.com/rust-lang/crates.io-index" 610source = "registry+https://github.com/rust-lang/crates.io-index"
591checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" 611checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5"
592dependencies = [ 612dependencies = [
593 "cfg-if", 613 "cfg-if",
594 "libc", 614 "libc",
@@ -609,16 +629,16 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
609 629
610[[package]] 630[[package]]
611name = "h2" 631name = "h2"
612version = "0.4.0" 632version = "0.4.2"
613source = "registry+https://github.com/rust-lang/crates.io-index" 633source = "registry+https://github.com/rust-lang/crates.io-index"
614checksum = "e1d308f63daf4181410c242d34c11f928dcb3aa105852019e043c9d1f4e4368a" 634checksum = "31d030e59af851932b72ceebadf4a2b5986dba4c3b99dd2493f8273a0f151943"
615dependencies = [ 635dependencies = [
616 "bytes", 636 "bytes",
617 "fnv", 637 "fnv",
618 "futures-core", 638 "futures-core",
619 "futures-sink", 639 "futures-sink",
620 "futures-util", 640 "futures-util",
621 "http 1.0.0", 641 "http",
622 "indexmap", 642 "indexmap",
623 "slab", 643 "slab",
624 "tokio", 644 "tokio",
@@ -628,12 +648,9 @@ dependencies = [
628 648
629[[package]] 649[[package]]
630name = "hashbrown" 650name = "hashbrown"
631version = "0.12.3" 651version = "0.13.2"
632source = "registry+https://github.com/rust-lang/crates.io-index" 652source = "registry+https://github.com/rust-lang/crates.io-index"
633checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 653checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
634dependencies = [
635 "ahash 0.7.7",
636]
637 654
638[[package]] 655[[package]]
639name = "hashbrown" 656name = "hashbrown"
@@ -641,7 +658,7 @@ version = "0.14.3"
641source = "registry+https://github.com/rust-lang/crates.io-index" 658source = "registry+https://github.com/rust-lang/crates.io-index"
642checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" 659checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
643dependencies = [ 660dependencies = [
644 "ahash 0.8.6", 661 "ahash",
645 "allocator-api2", 662 "allocator-api2",
646] 663]
647 664
@@ -665,9 +682,9 @@ dependencies = [
665 682
666[[package]] 683[[package]]
667name = "hermit-abi" 684name = "hermit-abi"
668version = "0.3.3" 685version = "0.3.5"
669source = "registry+https://github.com/rust-lang/crates.io-index" 686source = "registry+https://github.com/rust-lang/crates.io-index"
670checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" 687checksum = "d0c62115964e08cb8039170eb33c1d0e2388a256930279edca206fff675f82c3"
671 688
672[[package]] 689[[package]]
673name = "hex" 690name = "hex"
@@ -677,9 +694,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
677 694
678[[package]] 695[[package]]
679name = "hkdf" 696name = "hkdf"
680version = "0.12.3" 697version = "0.12.4"
681source = "registry+https://github.com/rust-lang/crates.io-index" 698source = "registry+https://github.com/rust-lang/crates.io-index"
682checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" 699checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7"
683dependencies = [ 700dependencies = [
684 "hmac", 701 "hmac",
685] 702]
@@ -695,22 +712,11 @@ dependencies = [
695 712
696[[package]] 713[[package]]
697name = "home" 714name = "home"
698version = "0.5.5" 715version = "0.5.9"
699source = "registry+https://github.com/rust-lang/crates.io-index"
700checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb"
701dependencies = [
702 "windows-sys 0.48.0",
703]
704
705[[package]]
706name = "http"
707version = "0.2.11"
708source = "registry+https://github.com/rust-lang/crates.io-index" 716source = "registry+https://github.com/rust-lang/crates.io-index"
709checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" 717checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5"
710dependencies = [ 718dependencies = [
711 "bytes", 719 "windows-sys 0.52.0",
712 "fnv",
713 "itoa",
714] 720]
715 721
716[[package]] 722[[package]]
@@ -731,7 +737,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
731checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" 737checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643"
732dependencies = [ 738dependencies = [
733 "bytes", 739 "bytes",
734 "http 1.0.0", 740 "http",
735] 741]
736 742
737[[package]] 743[[package]]
@@ -742,7 +748,7 @@ checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840"
742dependencies = [ 748dependencies = [
743 "bytes", 749 "bytes",
744 "futures-util", 750 "futures-util",
745 "http 1.0.0", 751 "http",
746 "http-body", 752 "http-body",
747 "pin-project-lite", 753 "pin-project-lite",
748] 754]
@@ -761,15 +767,15 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
761 767
762[[package]] 768[[package]]
763name = "hyper" 769name = "hyper"
764version = "1.0.1" 770version = "1.1.0"
765source = "registry+https://github.com/rust-lang/crates.io-index" 771source = "registry+https://github.com/rust-lang/crates.io-index"
766checksum = "403f9214f3e703236b221f1a9cd88ec8b4adfa5296de01ab96216361f4692f56" 772checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75"
767dependencies = [ 773dependencies = [
768 "bytes", 774 "bytes",
769 "futures-channel", 775 "futures-channel",
770 "futures-util", 776 "futures-util",
771 "h2", 777 "h2",
772 "http 1.0.0", 778 "http",
773 "http-body", 779 "http-body",
774 "httparse", 780 "httparse",
775 "httpdate", 781 "httpdate",
@@ -780,22 +786,18 @@ dependencies = [
780 786
781[[package]] 787[[package]]
782name = "hyper-util" 788name = "hyper-util"
783version = "0.1.1" 789version = "0.1.3"
784source = "registry+https://github.com/rust-lang/crates.io-index" 790source = "registry+https://github.com/rust-lang/crates.io-index"
785checksum = "9ca339002caeb0d159cc6e023dff48e199f081e42fa039895c7c6f38b37f2e9d" 791checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa"
786dependencies = [ 792dependencies = [
787 "bytes", 793 "bytes",
788 "futures-channel",
789 "futures-util", 794 "futures-util",
790 "http 1.0.0", 795 "http",
791 "http-body", 796 "http-body",
792 "hyper", 797 "hyper",
793 "pin-project-lite", 798 "pin-project-lite",
794 "socket2", 799 "socket2",
795 "tokio", 800 "tokio",
796 "tower",
797 "tower-service",
798 "tracing",
799] 801]
800 802
801[[package]] 803[[package]]
@@ -816,9 +818,9 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683"
816 818
817[[package]] 819[[package]]
818name = "indexmap" 820name = "indexmap"
819version = "2.1.0" 821version = "2.2.2"
820source = "registry+https://github.com/rust-lang/crates.io-index" 822source = "registry+https://github.com/rust-lang/crates.io-index"
821checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" 823checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520"
822dependencies = [ 824dependencies = [
823 "equivalent", 825 "equivalent",
824 "hashbrown 0.14.3", 826 "hashbrown 0.14.3",
@@ -826,18 +828,18 @@ dependencies = [
826 828
827[[package]] 829[[package]]
828name = "itertools" 830name = "itertools"
829version = "0.11.0" 831version = "0.12.1"
830source = "registry+https://github.com/rust-lang/crates.io-index" 832source = "registry+https://github.com/rust-lang/crates.io-index"
831checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" 833checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
832dependencies = [ 834dependencies = [
833 "either", 835 "either",
834] 836]
835 837
836[[package]] 838[[package]]
837name = "itoa" 839name = "itoa"
838version = "1.0.9" 840version = "1.0.10"
839source = "registry+https://github.com/rust-lang/crates.io-index" 841source = "registry+https://github.com/rust-lang/crates.io-index"
840checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" 842checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
841 843
842[[package]] 844[[package]]
843name = "json5" 845name = "json5"
@@ -861,9 +863,9 @@ dependencies = [
861 863
862[[package]] 864[[package]]
863name = "libc" 865name = "libc"
864version = "0.2.150" 866version = "0.2.153"
865source = "registry+https://github.com/rust-lang/crates.io-index" 867source = "registry+https://github.com/rust-lang/crates.io-index"
866checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" 868checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
867 869
868[[package]] 870[[package]]
869name = "libm" 871name = "libm"
@@ -890,9 +892,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
890 892
891[[package]] 893[[package]]
892name = "linux-raw-sys" 894name = "linux-raw-sys"
893version = "0.4.11" 895version = "0.4.13"
894source = "registry+https://github.com/rust-lang/crates.io-index" 896source = "registry+https://github.com/rust-lang/crates.io-index"
895checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" 897checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c"
896 898
897[[package]] 899[[package]]
898name = "lock_api" 900name = "lock_api"
@@ -937,9 +939,9 @@ dependencies = [
937 939
938[[package]] 940[[package]]
939name = "memchr" 941name = "memchr"
940version = "2.6.4" 942version = "2.7.1"
941source = "registry+https://github.com/rust-lang/crates.io-index" 943source = "registry+https://github.com/rust-lang/crates.io-index"
942checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" 944checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
943 945
944[[package]] 946[[package]]
945name = "mime" 947name = "mime"
@@ -955,18 +957,18 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
955 957
956[[package]] 958[[package]]
957name = "miniz_oxide" 959name = "miniz_oxide"
958version = "0.7.1" 960version = "0.7.2"
959source = "registry+https://github.com/rust-lang/crates.io-index" 961source = "registry+https://github.com/rust-lang/crates.io-index"
960checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" 962checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7"
961dependencies = [ 963dependencies = [
962 "adler", 964 "adler",
963] 965]
964 966
965[[package]] 967[[package]]
966name = "mio" 968name = "mio"
967version = "0.8.9" 969version = "0.8.10"
968source = "registry+https://github.com/rust-lang/crates.io-index" 970source = "registry+https://github.com/rust-lang/crates.io-index"
969checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" 971checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09"
970dependencies = [ 972dependencies = [
971 "libc", 973 "libc",
972 "wasi", 974 "wasi",
@@ -979,7 +981,7 @@ version = "0.27.1"
979source = "registry+https://github.com/rust-lang/crates.io-index" 981source = "registry+https://github.com/rust-lang/crates.io-index"
980checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" 982checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"
981dependencies = [ 983dependencies = [
982 "bitflags 2.4.1", 984 "bitflags 2.4.2",
983 "cfg-if", 985 "cfg-if",
984 "libc", 986 "libc",
985] 987]
@@ -1028,20 +1030,25 @@ dependencies = [
1028] 1030]
1029 1031
1030[[package]] 1032[[package]]
1033name = "num-conv"
1034version = "0.1.0"
1035source = "registry+https://github.com/rust-lang/crates.io-index"
1036checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
1037
1038[[package]]
1031name = "num-integer" 1039name = "num-integer"
1032version = "0.1.45" 1040version = "0.1.46"
1033source = "registry+https://github.com/rust-lang/crates.io-index" 1041source = "registry+https://github.com/rust-lang/crates.io-index"
1034checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" 1042checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
1035dependencies = [ 1043dependencies = [
1036 "autocfg",
1037 "num-traits", 1044 "num-traits",
1038] 1045]
1039 1046
1040[[package]] 1047[[package]]
1041name = "num-iter" 1048name = "num-iter"
1042version = "0.1.43" 1049version = "0.1.44"
1043source = "registry+https://github.com/rust-lang/crates.io-index" 1050source = "registry+https://github.com/rust-lang/crates.io-index"
1044checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" 1051checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9"
1045dependencies = [ 1052dependencies = [
1046 "autocfg", 1053 "autocfg",
1047 "num-integer", 1054 "num-integer",
@@ -1050,9 +1057,9 @@ dependencies = [
1050 1057
1051[[package]] 1058[[package]]
1052name = "num-traits" 1059name = "num-traits"
1053version = "0.2.17" 1060version = "0.2.18"
1054source = "registry+https://github.com/rust-lang/crates.io-index" 1061source = "registry+https://github.com/rust-lang/crates.io-index"
1055checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" 1062checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a"
1056dependencies = [ 1063dependencies = [
1057 "autocfg", 1064 "autocfg",
1058 "libm", 1065 "libm",
@@ -1079,27 +1086,27 @@ dependencies = [
1079 1086
1080[[package]] 1087[[package]]
1081name = "object" 1088name = "object"
1082version = "0.32.1" 1089version = "0.32.2"
1083source = "registry+https://github.com/rust-lang/crates.io-index" 1090source = "registry+https://github.com/rust-lang/crates.io-index"
1084checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" 1091checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"
1085dependencies = [ 1092dependencies = [
1086 "memchr", 1093 "memchr",
1087] 1094]
1088 1095
1089[[package]] 1096[[package]]
1090name = "once_cell" 1097name = "once_cell"
1091version = "1.18.0" 1098version = "1.19.0"
1092source = "registry+https://github.com/rust-lang/crates.io-index" 1099source = "registry+https://github.com/rust-lang/crates.io-index"
1093checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" 1100checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
1094 1101
1095[[package]] 1102[[package]]
1096name = "ordered-multimap" 1103name = "ordered-multimap"
1097version = "0.4.3" 1104version = "0.6.0"
1098source = "registry+https://github.com/rust-lang/crates.io-index" 1105source = "registry+https://github.com/rust-lang/crates.io-index"
1099checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" 1106checksum = "4ed8acf08e98e744e5384c8bc63ceb0364e68a6854187221c18df61c4797690e"
1100dependencies = [ 1107dependencies = [
1101 "dlv-list", 1108 "dlv-list",
1102 "hashbrown 0.12.3", 1109 "hashbrown 0.13.2",
1103] 1110]
1104 1111
1105[[package]] 1112[[package]]
@@ -1166,9 +1173,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
1166 1173
1167[[package]] 1174[[package]]
1168name = "pest" 1175name = "pest"
1169version = "2.7.5" 1176version = "2.7.7"
1170source = "registry+https://github.com/rust-lang/crates.io-index" 1177source = "registry+https://github.com/rust-lang/crates.io-index"
1171checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" 1178checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546"
1172dependencies = [ 1179dependencies = [
1173 "memchr", 1180 "memchr",
1174 "thiserror", 1181 "thiserror",
@@ -1177,9 +1184,9 @@ dependencies = [
1177 1184
1178[[package]] 1185[[package]]
1179name = "pest_derive" 1186name = "pest_derive"
1180version = "2.7.5" 1187version = "2.7.7"
1181source = "registry+https://github.com/rust-lang/crates.io-index" 1188source = "registry+https://github.com/rust-lang/crates.io-index"
1182checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2" 1189checksum = "22e1288dbd7786462961e69bfd4df7848c1e37e8b74303dbdab82c3a9cdd2809"
1183dependencies = [ 1190dependencies = [
1184 "pest", 1191 "pest",
1185 "pest_generator", 1192 "pest_generator",
@@ -1187,22 +1194,22 @@ dependencies = [
1187 1194
1188[[package]] 1195[[package]]
1189name = "pest_generator" 1196name = "pest_generator"
1190version = "2.7.5" 1197version = "2.7.7"
1191source = "registry+https://github.com/rust-lang/crates.io-index" 1198source = "registry+https://github.com/rust-lang/crates.io-index"
1192checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" 1199checksum = "1381c29a877c6d34b8c176e734f35d7f7f5b3adaefe940cb4d1bb7af94678e2e"
1193dependencies = [ 1200dependencies = [
1194 "pest", 1201 "pest",
1195 "pest_meta", 1202 "pest_meta",
1196 "proc-macro2", 1203 "proc-macro2",
1197 "quote", 1204 "quote",
1198 "syn 2.0.39", 1205 "syn 2.0.48",
1199] 1206]
1200 1207
1201[[package]] 1208[[package]]
1202name = "pest_meta" 1209name = "pest_meta"
1203version = "2.7.5" 1210version = "2.7.7"
1204source = "registry+https://github.com/rust-lang/crates.io-index" 1211source = "registry+https://github.com/rust-lang/crates.io-index"
1205checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" 1212checksum = "d0934d6907f148c22a3acbda520c7eed243ad7487a30f51f6ce52b58b7077a8a"
1206dependencies = [ 1213dependencies = [
1207 "once_cell", 1214 "once_cell",
1208 "pest", 1215 "pest",
@@ -1211,22 +1218,22 @@ dependencies = [
1211 1218
1212[[package]] 1219[[package]]
1213name = "pin-project" 1220name = "pin-project"
1214version = "1.1.3" 1221version = "1.1.4"
1215source = "registry+https://github.com/rust-lang/crates.io-index" 1222source = "registry+https://github.com/rust-lang/crates.io-index"
1216checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" 1223checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0"
1217dependencies = [ 1224dependencies = [
1218 "pin-project-internal", 1225 "pin-project-internal",
1219] 1226]
1220 1227
1221[[package]] 1228[[package]]
1222name = "pin-project-internal" 1229name = "pin-project-internal"
1223version = "1.1.3" 1230version = "1.1.4"
1224source = "registry+https://github.com/rust-lang/crates.io-index" 1231source = "registry+https://github.com/rust-lang/crates.io-index"
1225checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" 1232checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690"
1226dependencies = [ 1233dependencies = [
1227 "proc-macro2", 1234 "proc-macro2",
1228 "quote", 1235 "quote",
1229 "syn 2.0.39", 1236 "syn 2.0.48",
1230] 1237]
1231 1238
1232[[package]] 1239[[package]]
@@ -1264,9 +1271,9 @@ dependencies = [
1264 1271
1265[[package]] 1272[[package]]
1266name = "pkg-config" 1273name = "pkg-config"
1267version = "0.3.27" 1274version = "0.3.29"
1268source = "registry+https://github.com/rust-lang/crates.io-index" 1275source = "registry+https://github.com/rust-lang/crates.io-index"
1269checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" 1276checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb"
1270 1277
1271[[package]] 1278[[package]]
1272name = "pnet_base" 1279name = "pnet_base"
@@ -1324,18 +1331,18 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
1324 1331
1325[[package]] 1332[[package]]
1326name = "proc-macro2" 1333name = "proc-macro2"
1327version = "1.0.70" 1334version = "1.0.78"
1328source = "registry+https://github.com/rust-lang/crates.io-index" 1335source = "registry+https://github.com/rust-lang/crates.io-index"
1329checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" 1336checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"
1330dependencies = [ 1337dependencies = [
1331 "unicode-ident", 1338 "unicode-ident",
1332] 1339]
1333 1340
1334[[package]] 1341[[package]]
1335name = "quote" 1342name = "quote"
1336version = "1.0.33" 1343version = "1.0.35"
1337source = "registry+https://github.com/rust-lang/crates.io-index" 1344source = "registry+https://github.com/rust-lang/crates.io-index"
1338checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" 1345checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
1339dependencies = [ 1346dependencies = [
1340 "proc-macro2", 1347 "proc-macro2",
1341] 1348]
@@ -1381,13 +1388,13 @@ dependencies = [
1381 1388
1382[[package]] 1389[[package]]
1383name = "regex" 1390name = "regex"
1384version = "1.10.2" 1391version = "1.10.3"
1385source = "registry+https://github.com/rust-lang/crates.io-index" 1392source = "registry+https://github.com/rust-lang/crates.io-index"
1386checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" 1393checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
1387dependencies = [ 1394dependencies = [
1388 "aho-corasick", 1395 "aho-corasick",
1389 "memchr", 1396 "memchr",
1390 "regex-automata 0.4.3", 1397 "regex-automata 0.4.5",
1391 "regex-syntax 0.8.2", 1398 "regex-syntax 0.8.2",
1392] 1399]
1393 1400
@@ -1402,9 +1409,9 @@ dependencies = [
1402 1409
1403[[package]] 1410[[package]]
1404name = "regex-automata" 1411name = "regex-automata"
1405version = "0.4.3" 1412version = "0.4.5"
1406source = "registry+https://github.com/rust-lang/crates.io-index" 1413source = "registry+https://github.com/rust-lang/crates.io-index"
1407checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" 1414checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd"
1408dependencies = [ 1415dependencies = [
1409 "aho-corasick", 1416 "aho-corasick",
1410 "memchr", 1417 "memchr",
@@ -1425,20 +1432,21 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
1425 1432
1426[[package]] 1433[[package]]
1427name = "ron" 1434name = "ron"
1428version = "0.7.1" 1435version = "0.8.1"
1429source = "registry+https://github.com/rust-lang/crates.io-index" 1436source = "registry+https://github.com/rust-lang/crates.io-index"
1430checksum = "88073939a61e5b7680558e6be56b419e208420c2adb92be54921fa6b72283f1a" 1437checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94"
1431dependencies = [ 1438dependencies = [
1432 "base64 0.13.1", 1439 "base64",
1433 "bitflags 1.3.2", 1440 "bitflags 2.4.2",
1434 "serde", 1441 "serde",
1442 "serde_derive",
1435] 1443]
1436 1444
1437[[package]] 1445[[package]]
1438name = "rsa" 1446name = "rsa"
1439version = "0.9.5" 1447version = "0.9.6"
1440source = "registry+https://github.com/rust-lang/crates.io-index" 1448source = "registry+https://github.com/rust-lang/crates.io-index"
1441checksum = "af6c4b23d99685a1408194da11270ef8e9809aff951cc70ec9b17350b087e474" 1449checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc"
1442dependencies = [ 1450dependencies = [
1443 "const-oid", 1451 "const-oid",
1444 "digest", 1452 "digest",
@@ -1456,9 +1464,9 @@ dependencies = [
1456 1464
1457[[package]] 1465[[package]]
1458name = "rust-ini" 1466name = "rust-ini"
1459version = "0.18.0" 1467version = "0.19.0"
1460source = "registry+https://github.com/rust-lang/crates.io-index" 1468source = "registry+https://github.com/rust-lang/crates.io-index"
1461checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" 1469checksum = "7e2a3bcec1f113553ef1c88aae6c020a369d03d55b58de9869a0908930385091"
1462dependencies = [ 1470dependencies = [
1463 "cfg-if", 1471 "cfg-if",
1464 "ordered-multimap", 1472 "ordered-multimap",
@@ -1472,15 +1480,15 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
1472 1480
1473[[package]] 1481[[package]]
1474name = "rustix" 1482name = "rustix"
1475version = "0.38.25" 1483version = "0.38.31"
1476source = "registry+https://github.com/rust-lang/crates.io-index" 1484source = "registry+https://github.com/rust-lang/crates.io-index"
1477checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" 1485checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949"
1478dependencies = [ 1486dependencies = [
1479 "bitflags 2.4.1", 1487 "bitflags 2.4.2",
1480 "errno", 1488 "errno",
1481 "libc", 1489 "libc",
1482 "linux-raw-sys", 1490 "linux-raw-sys",
1483 "windows-sys 0.48.0", 1491 "windows-sys 0.52.0",
1484] 1492]
1485 1493
1486[[package]] 1494[[package]]
@@ -1491,9 +1499,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
1491 1499
1492[[package]] 1500[[package]]
1493name = "ryu" 1501name = "ryu"
1494version = "1.0.15" 1502version = "1.0.16"
1495source = "registry+https://github.com/rust-lang/crates.io-index" 1503source = "registry+https://github.com/rust-lang/crates.io-index"
1496checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" 1504checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c"
1497 1505
1498[[package]] 1506[[package]]
1499name = "scopeguard" 1507name = "scopeguard"
@@ -1503,29 +1511,29 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
1503 1511
1504[[package]] 1512[[package]]
1505name = "serde" 1513name = "serde"
1506version = "1.0.193" 1514version = "1.0.196"
1507source = "registry+https://github.com/rust-lang/crates.io-index" 1515source = "registry+https://github.com/rust-lang/crates.io-index"
1508checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" 1516checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32"
1509dependencies = [ 1517dependencies = [
1510 "serde_derive", 1518 "serde_derive",
1511] 1519]
1512 1520
1513[[package]] 1521[[package]]
1514name = "serde_derive" 1522name = "serde_derive"
1515version = "1.0.193" 1523version = "1.0.196"
1516source = "registry+https://github.com/rust-lang/crates.io-index" 1524source = "registry+https://github.com/rust-lang/crates.io-index"
1517checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" 1525checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67"
1518dependencies = [ 1526dependencies = [
1519 "proc-macro2", 1527 "proc-macro2",
1520 "quote", 1528 "quote",
1521 "syn 2.0.39", 1529 "syn 2.0.48",
1522] 1530]
1523 1531
1524[[package]] 1532[[package]]
1525name = "serde_json" 1533name = "serde_json"
1526version = "1.0.108" 1534version = "1.0.113"
1527source = "registry+https://github.com/rust-lang/crates.io-index" 1535source = "registry+https://github.com/rust-lang/crates.io-index"
1528checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" 1536checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79"
1529dependencies = [ 1537dependencies = [
1530 "itoa", 1538 "itoa",
1531 "ryu", 1539 "ryu",
@@ -1534,15 +1542,24 @@ dependencies = [
1534 1542
1535[[package]] 1543[[package]]
1536name = "serde_path_to_error" 1544name = "serde_path_to_error"
1537version = "0.1.14" 1545version = "0.1.15"
1538source = "registry+https://github.com/rust-lang/crates.io-index" 1546source = "registry+https://github.com/rust-lang/crates.io-index"
1539checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" 1547checksum = "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c"
1540dependencies = [ 1548dependencies = [
1541 "itoa", 1549 "itoa",
1542 "serde", 1550 "serde",
1543] 1551]
1544 1552
1545[[package]] 1553[[package]]
1554name = "serde_spanned"
1555version = "0.6.5"
1556source = "registry+https://github.com/rust-lang/crates.io-index"
1557checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1"
1558dependencies = [
1559 "serde",
1560]
1561
1562[[package]]
1546name = "serde_urlencoded" 1563name = "serde_urlencoded"
1547version = "0.7.1" 1564version = "0.7.1"
1548source = "registry+https://github.com/rust-lang/crates.io-index" 1565source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1606,9 +1623,9 @@ dependencies = [
1606 1623
1607[[package]] 1624[[package]]
1608name = "smallvec" 1625name = "smallvec"
1609version = "1.11.2" 1626version = "1.13.1"
1610source = "registry+https://github.com/rust-lang/crates.io-index" 1627source = "registry+https://github.com/rust-lang/crates.io-index"
1611checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" 1628checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7"
1612 1629
1613[[package]] 1630[[package]]
1614name = "socket2" 1631name = "socket2"
@@ -1647,9 +1664,9 @@ dependencies = [
1647 1664
1648[[package]] 1665[[package]]
1649name = "sqlformat" 1666name = "sqlformat"
1650version = "0.2.2" 1667version = "0.2.3"
1651source = "registry+https://github.com/rust-lang/crates.io-index" 1668source = "registry+https://github.com/rust-lang/crates.io-index"
1652checksum = "6b7b278788e7be4d0d29c0f39497a0eef3fba6bbc8e70d8bf7fde46edeaa9e85" 1669checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c"
1653dependencies = [ 1670dependencies = [
1654 "itertools", 1671 "itertools",
1655 "nom", 1672 "nom",
@@ -1675,7 +1692,7 @@ version = "0.7.3"
1675source = "registry+https://github.com/rust-lang/crates.io-index" 1692source = "registry+https://github.com/rust-lang/crates.io-index"
1676checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" 1693checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd"
1677dependencies = [ 1694dependencies = [
1678 "ahash 0.8.6", 1695 "ahash",
1679 "atoi", 1696 "atoi",
1680 "byteorder", 1697 "byteorder",
1681 "bytes", 1698 "bytes",
@@ -1756,8 +1773,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1756checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4" 1773checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4"
1757dependencies = [ 1774dependencies = [
1758 "atoi", 1775 "atoi",
1759 "base64 0.21.5", 1776 "base64",
1760 "bitflags 2.4.1", 1777 "bitflags 2.4.2",
1761 "byteorder", 1778 "byteorder",
1762 "bytes", 1779 "bytes",
1763 "crc", 1780 "crc",
@@ -1798,8 +1815,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1798checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24" 1815checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24"
1799dependencies = [ 1816dependencies = [
1800 "atoi", 1817 "atoi",
1801 "base64 0.21.5", 1818 "base64",
1802 "bitflags 2.4.1", 1819 "bitflags 2.4.2",
1803 "byteorder", 1820 "byteorder",
1804 "crc", 1821 "crc",
1805 "dotenvy", 1822 "dotenvy",
@@ -1899,9 +1916,9 @@ dependencies = [
1899 1916
1900[[package]] 1917[[package]]
1901name = "syn" 1918name = "syn"
1902version = "2.0.39" 1919version = "2.0.48"
1903source = "registry+https://github.com/rust-lang/crates.io-index" 1920source = "registry+https://github.com/rust-lang/crates.io-index"
1904checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" 1921checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f"
1905dependencies = [ 1922dependencies = [
1906 "proc-macro2", 1923 "proc-macro2",
1907 "quote", 1924 "quote",
@@ -1916,35 +1933,34 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
1916 1933
1917[[package]] 1934[[package]]
1918name = "tempfile" 1935name = "tempfile"
1919version = "3.8.1" 1936version = "3.10.0"
1920source = "registry+https://github.com/rust-lang/crates.io-index" 1937source = "registry+https://github.com/rust-lang/crates.io-index"
1921checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" 1938checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67"
1922dependencies = [ 1939dependencies = [
1923 "cfg-if", 1940 "cfg-if",
1924 "fastrand", 1941 "fastrand",
1925 "redox_syscall",
1926 "rustix", 1942 "rustix",
1927 "windows-sys 0.48.0", 1943 "windows-sys 0.52.0",
1928] 1944]
1929 1945
1930[[package]] 1946[[package]]
1931name = "thiserror" 1947name = "thiserror"
1932version = "1.0.50" 1948version = "1.0.57"
1933source = "registry+https://github.com/rust-lang/crates.io-index" 1949source = "registry+https://github.com/rust-lang/crates.io-index"
1934checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" 1950checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b"
1935dependencies = [ 1951dependencies = [
1936 "thiserror-impl", 1952 "thiserror-impl",
1937] 1953]
1938 1954
1939[[package]] 1955[[package]]
1940name = "thiserror-impl" 1956name = "thiserror-impl"
1941version = "1.0.50" 1957version = "1.0.57"
1942source = "registry+https://github.com/rust-lang/crates.io-index" 1958source = "registry+https://github.com/rust-lang/crates.io-index"
1943checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" 1959checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81"
1944dependencies = [ 1960dependencies = [
1945 "proc-macro2", 1961 "proc-macro2",
1946 "quote", 1962 "quote",
1947 "syn 2.0.39", 1963 "syn 2.0.48",
1948] 1964]
1949 1965
1950[[package]] 1966[[package]]
@@ -1959,13 +1975,14 @@ dependencies = [
1959 1975
1960[[package]] 1976[[package]]
1961name = "time" 1977name = "time"
1962version = "0.3.30" 1978version = "0.3.34"
1963source = "registry+https://github.com/rust-lang/crates.io-index" 1979source = "registry+https://github.com/rust-lang/crates.io-index"
1964checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" 1980checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749"
1965dependencies = [ 1981dependencies = [
1966 "deranged", 1982 "deranged",
1967 "itoa", 1983 "itoa",
1968 "libc", 1984 "libc",
1985 "num-conv",
1969 "num_threads", 1986 "num_threads",
1970 "powerfmt", 1987 "powerfmt",
1971 "serde", 1988 "serde",
@@ -1981,14 +1998,24 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
1981 1998
1982[[package]] 1999[[package]]
1983name = "time-macros" 2000name = "time-macros"
1984version = "0.2.15" 2001version = "0.2.17"
1985source = "registry+https://github.com/rust-lang/crates.io-index" 2002source = "registry+https://github.com/rust-lang/crates.io-index"
1986checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" 2003checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774"
1987dependencies = [ 2004dependencies = [
2005 "num-conv",
1988 "time-core", 2006 "time-core",
1989] 2007]
1990 2008
1991[[package]] 2009[[package]]
2010name = "tiny-keccak"
2011version = "2.0.2"
2012source = "registry+https://github.com/rust-lang/crates.io-index"
2013checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"
2014dependencies = [
2015 "crunchy",
2016]
2017
2018[[package]]
1992name = "tinyvec" 2019name = "tinyvec"
1993version = "1.6.0" 2020version = "1.6.0"
1994source = "registry+https://github.com/rust-lang/crates.io-index" 2021source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2005,9 +2032,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
2005 2032
2006[[package]] 2033[[package]]
2007name = "tokio" 2034name = "tokio"
2008version = "1.34.0" 2035version = "1.36.0"
2009source = "registry+https://github.com/rust-lang/crates.io-index" 2036source = "registry+https://github.com/rust-lang/crates.io-index"
2010checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" 2037checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931"
2011dependencies = [ 2038dependencies = [
2012 "backtrace", 2039 "backtrace",
2013 "bytes", 2040 "bytes",
@@ -2028,7 +2055,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
2028dependencies = [ 2055dependencies = [
2029 "proc-macro2", 2056 "proc-macro2",
2030 "quote", 2057 "quote",
2031 "syn 2.0.39", 2058 "syn 2.0.48",
2032] 2059]
2033 2060
2034[[package]] 2061[[package]]
@@ -2044,9 +2071,9 @@ dependencies = [
2044 2071
2045[[package]] 2072[[package]]
2046name = "tokio-tungstenite" 2073name = "tokio-tungstenite"
2047version = "0.20.1" 2074version = "0.21.0"
2048source = "registry+https://github.com/rust-lang/crates.io-index" 2075source = "registry+https://github.com/rust-lang/crates.io-index"
2049checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" 2076checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38"
2050dependencies = [ 2077dependencies = [
2051 "futures-util", 2078 "futures-util",
2052 "log", 2079 "log",
@@ -2070,11 +2097,36 @@ dependencies = [
2070 2097
2071[[package]] 2098[[package]]
2072name = "toml" 2099name = "toml"
2073version = "0.5.11" 2100version = "0.8.10"
2101source = "registry+https://github.com/rust-lang/crates.io-index"
2102checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290"
2103dependencies = [
2104 "serde",
2105 "serde_spanned",
2106 "toml_datetime",
2107 "toml_edit",
2108]
2109
2110[[package]]
2111name = "toml_datetime"
2112version = "0.6.5"
2113source = "registry+https://github.com/rust-lang/crates.io-index"
2114checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
2115dependencies = [
2116 "serde",
2117]
2118
2119[[package]]
2120name = "toml_edit"
2121version = "0.22.4"
2074source = "registry+https://github.com/rust-lang/crates.io-index" 2122source = "registry+https://github.com/rust-lang/crates.io-index"
2075checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" 2123checksum = "0c9ffdf896f8daaabf9b66ba8e77ea1ed5ed0f72821b398aba62352e95062951"
2076dependencies = [ 2124dependencies = [
2125 "indexmap",
2077 "serde", 2126 "serde",
2127 "serde_spanned",
2128 "toml_datetime",
2129 "winnow",
2078] 2130]
2079 2131
2080[[package]] 2132[[package]]
@@ -2125,7 +2177,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
2125dependencies = [ 2177dependencies = [
2126 "proc-macro2", 2178 "proc-macro2",
2127 "quote", 2179 "quote",
2128 "syn 2.0.39", 2180 "syn 2.0.48",
2129] 2181]
2130 2182
2131[[package]] 2183[[package]]
@@ -2180,14 +2232,14 @@ dependencies = [
2180 2232
2181[[package]] 2233[[package]]
2182name = "tungstenite" 2234name = "tungstenite"
2183version = "0.20.1" 2235version = "0.21.0"
2184source = "registry+https://github.com/rust-lang/crates.io-index" 2236source = "registry+https://github.com/rust-lang/crates.io-index"
2185checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" 2237checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1"
2186dependencies = [ 2238dependencies = [
2187 "byteorder", 2239 "byteorder",
2188 "bytes", 2240 "bytes",
2189 "data-encoding", 2241 "data-encoding",
2190 "http 0.2.11", 2242 "http",
2191 "httparse", 2243 "httparse",
2192 "log", 2244 "log",
2193 "rand", 2245 "rand",
@@ -2211,9 +2263,9 @@ checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9"
2211 2263
2212[[package]] 2264[[package]]
2213name = "unicode-bidi" 2265name = "unicode-bidi"
2214version = "0.3.13" 2266version = "0.3.15"
2215source = "registry+https://github.com/rust-lang/crates.io-index" 2267source = "registry+https://github.com/rust-lang/crates.io-index"
2216checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" 2268checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75"
2217 2269
2218[[package]] 2270[[package]]
2219name = "unicode-ident" 2271name = "unicode-ident"
@@ -2232,9 +2284,9 @@ dependencies = [
2232 2284
2233[[package]] 2285[[package]]
2234name = "unicode-segmentation" 2286name = "unicode-segmentation"
2235version = "1.10.1" 2287version = "1.11.0"
2236source = "registry+https://github.com/rust-lang/crates.io-index" 2288source = "registry+https://github.com/rust-lang/crates.io-index"
2237checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" 2289checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202"
2238 2290
2239[[package]] 2291[[package]]
2240name = "unicode_categories" 2292name = "unicode_categories"
@@ -2267,9 +2319,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
2267 2319
2268[[package]] 2320[[package]]
2269name = "uuid" 2321name = "uuid"
2270version = "1.6.1" 2322version = "1.7.0"
2271source = "registry+https://github.com/rust-lang/crates.io-index" 2323source = "registry+https://github.com/rust-lang/crates.io-index"
2272checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" 2324checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a"
2273dependencies = [ 2325dependencies = [
2274 "getrandom", 2326 "getrandom",
2275 "rand", 2327 "rand",
@@ -2301,7 +2353,7 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
2301 2353
2302[[package]] 2354[[package]]
2303name = "webol" 2355name = "webol"
2304version = "0.3.0" 2356version = "0.3.1"
2305dependencies = [ 2357dependencies = [
2306 "axum", 2358 "axum",
2307 "axum-macros", 2359 "axum-macros",
@@ -2481,6 +2533,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2481checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" 2533checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
2482 2534
2483[[package]] 2535[[package]]
2536name = "winnow"
2537version = "0.5.39"
2538source = "registry+https://github.com/rust-lang/crates.io-index"
2539checksum = "5389a154b01683d28c77f8f68f49dea75f0a4da32557a58f68ee51ebba472d29"
2540dependencies = [
2541 "memchr",
2542]
2543
2544[[package]]
2484name = "yaml-rust" 2545name = "yaml-rust"
2485version = "0.4.5" 2546version = "0.4.5"
2486source = "registry+https://github.com/rust-lang/crates.io-index" 2547source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2491,22 +2552,22 @@ dependencies = [
2491 2552
2492[[package]] 2553[[package]]
2493name = "zerocopy" 2554name = "zerocopy"
2494version = "0.7.26" 2555version = "0.7.32"
2495source = "registry+https://github.com/rust-lang/crates.io-index" 2556source = "registry+https://github.com/rust-lang/crates.io-index"
2496checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" 2557checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be"
2497dependencies = [ 2558dependencies = [
2498 "zerocopy-derive", 2559 "zerocopy-derive",
2499] 2560]
2500 2561
2501[[package]] 2562[[package]]
2502name = "zerocopy-derive" 2563name = "zerocopy-derive"
2503version = "0.7.26" 2564version = "0.7.32"
2504source = "registry+https://github.com/rust-lang/crates.io-index" 2565source = "registry+https://github.com/rust-lang/crates.io-index"
2505checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" 2566checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
2506dependencies = [ 2567dependencies = [
2507 "proc-macro2", 2568 "proc-macro2",
2508 "quote", 2569 "quote",
2509 "syn 2.0.39", 2570 "syn 2.0.48",
2510] 2571]
2511 2572
2512[[package]] 2573[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index f58f3ad..14a955c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@ tracing-subscriber = { version = "0.3", features = ["env-filter", "local-time",
13time = { version = "0.3", features = ["macros"] } 13time = { version = "0.3", features = ["macros"] }
14serde = { version = "1.0", features = ["derive"] } 14serde = { version = "1.0", features = ["derive"] }
15serde_json = "1.0" 15serde_json = "1.0"
16config = "0.13" 16config = "0.14"
17once_cell = "1.18" 17once_cell = "1.18"
18sqlx = { version = "0.7", features = ["postgres", "runtime-tokio"]} 18sqlx = { version = "0.7", features = ["postgres", "runtime-tokio"]}
19surge-ping = "0.8" 19surge-ping = "0.8"
diff --git a/src/auth.rs b/src/auth.rs
index 90d920f..0321ade 100644
--- a/src/auth.rs
+++ b/src/auth.rs
@@ -1,17 +1,17 @@
1use axum::http::{StatusCode, HeaderValue}; 1use axum::http::{StatusCode, HeaderValue};
2use axum::http::header::ToStrError; 2use axum::http::header::ToStrError;
3use tracing::{debug, error, trace}; 3use tracing::{debug, error, trace};
4use crate::auth::AuthError::{MissingSecret, WrongSecret}; 4use crate::auth::Error::{MissingSecret, WrongSecret};
5use crate::config::SETTINGS; 5use crate::config::SETTINGS;
6 6
7pub fn auth(secret: Option<&HeaderValue>) -> Result<bool, AuthError> { 7pub fn auth(secret: Option<&HeaderValue>) -> Result<bool, Error> {
8 debug!("auth request with secret {:?}", secret); 8 debug!("auth request with secret {:?}", secret);
9 if let Some(value) = secret { 9 if let Some(value) = secret {
10 trace!("value exists"); 10 trace!("value exists");
11 let key = SETTINGS 11 let key = SETTINGS
12 .get_string("apikey") 12 .get_string("apikey")
13 .map_err(AuthError::Config)?; 13 .map_err(Error::Config)?;
14 if value.to_str().map_err(AuthError::HeaderToStr)? == key.as_str() { 14 if value.to_str().map_err(Error::HeaderToStr)? == key.as_str() {
15 debug!("successful auth"); 15 debug!("successful auth");
16 Ok(true) 16 Ok(true)
17 } else { 17 } else {
@@ -25,14 +25,14 @@ pub fn auth(secret: Option<&HeaderValue>) -> Result<bool, AuthError> {
25} 25}
26 26
27#[derive(Debug)] 27#[derive(Debug)]
28pub enum AuthError { 28pub enum Error {
29 WrongSecret, 29 WrongSecret,
30 MissingSecret, 30 MissingSecret,
31 Config(config::ConfigError), 31 Config(config::ConfigError),
32 HeaderToStr(ToStrError) 32 HeaderToStr(ToStrError)
33} 33}
34 34
35impl AuthError { 35impl Error {
36 pub fn get(self) -> (StatusCode, &'static str) { 36 pub fn get(self) -> (StatusCode, &'static str) {
37 match self { 37 match self {
38 Self::WrongSecret => (StatusCode::UNAUTHORIZED, "Wrong credentials"), 38 Self::WrongSecret => (StatusCode::UNAUTHORIZED, "Wrong credentials"),
diff --git a/src/error.rs b/src/error.rs
index 5b82534..56d6c52 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -4,10 +4,10 @@ use axum::Json;
4use axum::response::{IntoResponse, Response}; 4use axum::response::{IntoResponse, Response};
5use serde_json::json; 5use serde_json::json;
6use tracing::error; 6use tracing::error;
7use crate::auth::AuthError; 7use crate::auth::Error as AuthError;
8 8
9#[derive(Debug)] 9#[derive(Debug)]
10pub enum WebolError { 10pub enum Error {
11 Generic, 11 Generic,
12 Auth(AuthError), 12 Auth(AuthError),
13 DB(sqlx::Error), 13 DB(sqlx::Error),
@@ -16,7 +16,7 @@ pub enum WebolError {
16 Broadcast(io::Error), 16 Broadcast(io::Error),
17} 17}
18 18
19impl IntoResponse for WebolError { 19impl IntoResponse for Error {
20 fn into_response(self) -> Response { 20 fn into_response(self) -> Response {
21 let (status, error_message) = match self { 21 let (status, error_message) = match self {
22 Self::Auth(err) => { 22 Self::Auth(err) => {
@@ -45,4 +45,4 @@ impl IntoResponse for WebolError {
45 })); 45 }));
46 (status, body).into_response() 46 (status, body).into_response()
47 } 47 }
48} \ No newline at end of file 48}
diff --git a/src/main.rs b/src/main.rs
index aab9df3..9d30548 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -11,10 +11,10 @@ use tracing::{info, level_filters::LevelFilter};
11use tracing_subscriber::{EnvFilter, fmt::{self, time::LocalTime}, prelude::*}; 11use tracing_subscriber::{EnvFilter, fmt::{self, time::LocalTime}, prelude::*};
12use crate::config::SETTINGS; 12use crate::config::SETTINGS;
13use crate::db::init_db_pool; 13use crate::db::init_db_pool;
14use crate::routes::device::{get_device, post_device, put_device}; 14use crate::routes::device;
15use crate::routes::start::start; 15use crate::routes::start::start;
16use crate::routes::status::status; 16use crate::routes::status::status;
17use crate::services::ping::{BroadcastCommands, PingMap}; 17use crate::services::ping::{BroadcastCommands, StatusMap};
18 18
19mod auth; 19mod auth;
20mod config; 20mod config;
@@ -54,15 +54,15 @@ async fn main() -> color_eyre::eyre::Result<()> {
54 54
55 let (tx, _) = channel(32); 55 let (tx, _) = channel(32);
56 56
57 let ping_map: PingMap = DashMap::new(); 57 let ping_map: StatusMap = DashMap::new();
58 58
59 let shared_state = Arc::new(AppState { db, ping_send: tx, ping_map }); 59 let shared_state = Arc::new(AppState { db, ping_send: tx, ping_map });
60 60
61 let app = Router::new() 61 let app = Router::new()
62 .route("/start", post(start)) 62 .route("/start", post(start))
63 .route("/device", get(get_device)) 63 .route("/device", get(device::get))
64 .route("/device", put(put_device)) 64 .route("/device", put(device::put))
65 .route("/device", post(post_device)) 65 .route("/device", post(device::post))
66 .route("/status", get(status)) 66 .route("/status", get(status))
67 .with_state(shared_state); 67 .with_state(shared_state);
68 68
@@ -78,5 +78,5 @@ async fn main() -> color_eyre::eyre::Result<()> {
78pub struct AppState { 78pub struct AppState {
79 db: PgPool, 79 db: PgPool,
80 ping_send: Sender<BroadcastCommands>, 80 ping_send: Sender<BroadcastCommands>,
81 ping_map: PingMap, 81 ping_map: StatusMap,
82} 82}
diff --git a/src/routes/device.rs b/src/routes/device.rs
index a3308d4..b80cb85 100644
--- a/src/routes/device.rs
+++ b/src/routes/device.rs
@@ -7,12 +7,12 @@ use serde_json::{json, Value};
7use tracing::{debug, info}; 7use tracing::{debug, info};
8use crate::auth::auth; 8use crate::auth::auth;
9use crate::db::Device; 9use crate::db::Device;
10use crate::error::WebolError; 10use crate::error::Error;
11 11
12pub async fn get_device(State(state): State<Arc<crate::AppState>>, headers: HeaderMap, Json(payload): Json<GetDevicePayload>) -> Result<Json<Value>, WebolError> { 12pub async fn get(State(state): State<Arc<crate::AppState>>, headers: HeaderMap, Json(payload): Json<GetDevicePayload>) -> Result<Json<Value>, Error> {
13 info!("add device {}", payload.id); 13 info!("add device {}", payload.id);
14 let secret = headers.get("authorization"); 14 let secret = headers.get("authorization");
15 if auth(secret).map_err(WebolError::Auth)? { 15 if auth(secret).map_err(Error::Auth)? {
16 let device = sqlx::query_as!( 16 let device = sqlx::query_as!(
17 Device, 17 Device,
18 r#" 18 r#"
@@ -21,13 +21,13 @@ pub async fn get_device(State(state): State<Arc<crate::AppState>>, headers: Head
21 WHERE id = $1; 21 WHERE id = $1;
22 "#, 22 "#,
23 payload.id 23 payload.id
24 ).fetch_one(&state.db).await.map_err(WebolError::DB)?; 24 ).fetch_one(&state.db).await.map_err(Error::DB)?;
25 25
26 debug!("got device {:?}", device); 26 debug!("got device {:?}", device);
27 27
28 Ok(Json(json!(device))) 28 Ok(Json(json!(device)))
29 } else { 29 } else {
30 Err(WebolError::Generic) 30 Err(Error::Generic)
31 } 31 }
32} 32}
33 33
@@ -36,10 +36,10 @@ pub struct GetDevicePayload {
36 id: String, 36 id: String,
37} 37}
38 38
39pub async fn put_device(State(state): State<Arc<crate::AppState>>, headers: HeaderMap, Json(payload): Json<PutDevicePayload>) -> Result<Json<Value>, WebolError> { 39pub async fn put(State(state): State<Arc<crate::AppState>>, headers: HeaderMap, Json(payload): Json<PutDevicePayload>) -> Result<Json<Value>, Error> {
40 info!("add device {} ({}, {}, {})", payload.id, payload.mac, payload.broadcast_addr, payload.ip); 40 info!("add device {} ({}, {}, {})", payload.id, payload.mac, payload.broadcast_addr, payload.ip);
41 let secret = headers.get("authorization"); 41 let secret = headers.get("authorization");
42 if auth(secret).map_err(WebolError::Auth)? { 42 if auth(secret).map_err(Error::Auth)? {
43 sqlx::query!( 43 sqlx::query!(
44 r#" 44 r#"
45 INSERT INTO devices (id, mac, broadcast_addr, ip) 45 INSERT INTO devices (id, mac, broadcast_addr, ip)
@@ -49,11 +49,11 @@ pub async fn put_device(State(state): State<Arc<crate::AppState>>, headers: Head
49 payload.mac, 49 payload.mac,
50 payload.broadcast_addr, 50 payload.broadcast_addr,
51 payload.ip 51 payload.ip
52 ).execute(&state.db).await.map_err(WebolError::DB)?; 52 ).execute(&state.db).await.map_err(Error::DB)?;
53 53
54 Ok(Json(json!(PutDeviceResponse { success: true }))) 54 Ok(Json(json!(PutDeviceResponse { success: true })))
55 } else { 55 } else {
56 Err(WebolError::Generic) 56 Err(Error::Generic)
57 } 57 }
58} 58}
59 59
@@ -70,10 +70,10 @@ pub struct PutDeviceResponse {
70 success: bool 70 success: bool
71} 71}
72 72
73pub async fn post_device(State(state): State<Arc<crate::AppState>>, headers: HeaderMap, Json(payload): Json<PostDevicePayload>) -> Result<Json<Value>, WebolError> { 73pub async fn post(State(state): State<Arc<crate::AppState>>, headers: HeaderMap, Json(payload): Json<PostDevicePayload>) -> Result<Json<Value>, Error> {
74 info!("edit device {} ({}, {}, {})", payload.id, payload.mac, payload.broadcast_addr, payload.ip); 74 info!("edit device {} ({}, {}, {})", payload.id, payload.mac, payload.broadcast_addr, payload.ip);
75 let secret = headers.get("authorization"); 75 let secret = headers.get("authorization");
76 if auth(secret).map_err(WebolError::Auth)? { 76 if auth(secret).map_err(Error::Auth)? {
77 let device = sqlx::query_as!( 77 let device = sqlx::query_as!(
78 Device, 78 Device,
79 r#" 79 r#"
@@ -85,11 +85,11 @@ pub async fn post_device(State(state): State<Arc<crate::AppState>>, headers: Hea
85 payload.broadcast_addr, 85 payload.broadcast_addr,
86 payload.ip, 86 payload.ip,
87 payload.id 87 payload.id
88 ).fetch_one(&state.db).await.map_err(WebolError::DB)?; 88 ).fetch_one(&state.db).await.map_err(Error::DB)?;
89 89
90 Ok(Json(json!(device))) 90 Ok(Json(json!(device)))
91 } else { 91 } else {
92 Err(WebolError::Generic) 92 Err(Error::Generic)
93 } 93 }
94} 94}
95 95
diff --git a/src/routes/start.rs b/src/routes/start.rs
index a206cbd..4264588 100644
--- a/src/routes/start.rs
+++ b/src/routes/start.rs
@@ -1,23 +1,27 @@
1use axum::Json; 1use crate::auth::auth;
2use crate::config::SETTINGS;
3use crate::db::Device;
4use crate::error::Error;
5use crate::services::ping::Value as PingValue;
6use crate::wol::{create_buffer, send_packet};
7use axum::extract::State;
2use axum::http::HeaderMap; 8use axum::http::HeaderMap;
9use axum::Json;
3use serde::{Deserialize, Serialize}; 10use serde::{Deserialize, Serialize};
4use std::sync::Arc;
5use axum::extract::State;
6use serde_json::{json, Value}; 11use serde_json::{json, Value};
12use std::sync::Arc;
7use tracing::{debug, info}; 13use tracing::{debug, info};
8use uuid::Uuid; 14use uuid::Uuid;
9use crate::auth::auth;
10use crate::config::SETTINGS;
11use crate::wol::{create_buffer, send_packet};
12use crate::db::Device;
13use crate::error::WebolError;
14use crate::services::ping::PingValue;
15 15
16#[axum_macros::debug_handler] 16#[axum_macros::debug_handler]
17pub async fn start(State(state): State<Arc<crate::AppState>>, headers: HeaderMap, Json(payload): Json<StartPayload>) -> Result<Json<Value>, WebolError> { 17pub async fn start(
18 State(state): State<Arc<crate::AppState>>,
19 headers: HeaderMap,
20 Json(payload): Json<Payload>,
21) -> Result<Json<Value>, Error> {
18 info!("POST request"); 22 info!("POST request");
19 let secret = headers.get("authorization"); 23 let secret = headers.get("authorization");
20 let authorized = auth(secret).map_err(WebolError::Auth)?; 24 let authorized = auth(secret).map_err(Error::Auth)?;
21 if authorized { 25 if authorized {
22 let device = sqlx::query_as!( 26 let device = sqlx::query_as!(
23 Device, 27 Device,
@@ -27,7 +31,10 @@ pub async fn start(State(state): State<Arc<crate::AppState>>, headers: HeaderMap
27 WHERE id = $1; 31 WHERE id = $1;
28 "#, 32 "#,
29 payload.id 33 payload.id
30 ).fetch_one(&state.db).await.map_err(WebolError::DB)?; 34 )
35 .fetch_one(&state.db)
36 .await
37 .map_err(Error::DB)?;
31 38
32 info!("starting {}", device.id); 39 info!("starting {}", device.id);
33 40
@@ -36,9 +43,9 @@ pub async fn start(State(state): State<Arc<crate::AppState>>, headers: HeaderMap
36 .unwrap_or("0.0.0.0:1111".to_string()); 43 .unwrap_or("0.0.0.0:1111".to_string());
37 44
38 let _ = send_packet( 45 let _ = send_packet(
39 &bind_addr.parse().map_err(WebolError::IpParse)?, 46 &bind_addr.parse().map_err(Error::IpParse)?,
40 &device.broadcast_addr.parse().map_err(WebolError::IpParse)?, 47 &device.broadcast_addr.parse().map_err(Error::IpParse)?,
41 create_buffer(&device.mac)? 48 &create_buffer(&device.mac)?,
42 )?; 49 )?;
43 let dev_id = device.id.clone(); 50 let dev_id = device.id.clone();
44 let uuid = if payload.ping.is_some_and(|ping| ping) { 51 let uuid = if payload.ping.is_some_and(|ping| ping) {
@@ -49,7 +56,7 @@ pub async fn start(State(state): State<Arc<crate::AppState>>, headers: HeaderMap
49 uuid = Some(key); 56 uuid = Some(key);
50 break; 57 break;
51 } 58 }
52 }; 59 }
53 let uuid_gen = match uuid { 60 let uuid_gen = match uuid {
54 Some(u) => u, 61 Some(u) => u,
55 None => Uuid::new_v4().to_string(), 62 None => Uuid::new_v4().to_string(),
@@ -58,26 +65,45 @@ pub async fn start(State(state): State<Arc<crate::AppState>>, headers: HeaderMap
58 65
59 tokio::spawn(async move { 66 tokio::spawn(async move {
60 debug!("init ping service"); 67 debug!("init ping service");
61 state.ping_map.insert(uuid_gen.clone(), PingValue { ip: device.ip.clone(), online: false }); 68 state.ping_map.insert(
69 uuid_gen.clone(),
70 PingValue {
71 ip: device.ip.clone(),
72 online: false,
73 },
74 );
62 75
63 crate::services::ping::spawn(state.ping_send.clone(), device, uuid_gen.clone(), &state.ping_map, &state.db).await; 76 crate::services::ping::spawn(
77 state.ping_send.clone(),
78 device,
79 uuid_gen.clone(),
80 &state.ping_map,
81 &state.db,
82 )
83 .await;
64 }); 84 });
65 Some(uuid_genc) 85 Some(uuid_genc)
66 } else { None }; 86 } else {
67 Ok(Json(json!(StartResponse { id: dev_id, boot: true, uuid }))) 87 None
88 };
89 Ok(Json(json!(Response {
90 id: dev_id,
91 boot: true,
92 uuid
93 })))
68 } else { 94 } else {
69 Err(WebolError::Generic) 95 Err(Error::Generic)
70 } 96 }
71} 97}
72 98
73#[derive(Deserialize)] 99#[derive(Deserialize)]
74pub struct StartPayload { 100pub struct Payload {
75 id: String, 101 id: String,
76 ping: Option<bool>, 102 ping: Option<bool>,
77} 103}
78 104
79#[derive(Serialize)] 105#[derive(Serialize)]
80struct StartResponse { 106struct Response {
81 id: String, 107 id: String,
82 boot: bool, 108 boot: bool,
83 uuid: Option<String>, 109 uuid: Option<String>,
diff --git a/src/routes/status.rs b/src/routes/status.rs
index 45f3e51..31ef996 100644
--- a/src/routes/status.rs
+++ b/src/routes/status.rs
@@ -7,4 +7,4 @@ use crate::services::ping::status_websocket;
7#[axum_macros::debug_handler] 7#[axum_macros::debug_handler]
8pub async fn status(State(state): State<Arc<AppState>>, ws: WebSocketUpgrade) -> Response { 8pub async fn status(State(state): State<Arc<AppState>>, ws: WebSocketUpgrade) -> Response {
9 ws.on_upgrade(move |socket| status_websocket(socket, state)) 9 ws.on_upgrade(move |socket| status_websocket(socket, state))
10} \ No newline at end of file 10}
diff --git a/src/services/ping.rs b/src/services/ping.rs
index 0f773f4..7d71218 100644
--- a/src/services/ping.rs
+++ b/src/services/ping.rs
@@ -2,26 +2,26 @@ use std::str::FromStr;
2use std::net::IpAddr; 2use std::net::IpAddr;
3use std::sync::Arc; 3use std::sync::Arc;
4 4
5use axum::extract::{ws::WebSocket}; 5use axum::extract::ws::WebSocket;
6use axum::extract::ws::Message; 6use axum::extract::ws::Message;
7use dashmap::DashMap; 7use dashmap::DashMap;
8use sqlx::PgPool; 8use sqlx::PgPool;
9use time::{Duration, Instant}; 9use time::{Duration, Instant};
10use tokio::sync::broadcast::{Sender}; 10use tokio::sync::broadcast::Sender;
11use tracing::{debug, error, trace}; 11use tracing::{debug, error, trace};
12use crate::AppState; 12use crate::AppState;
13use crate::config::SETTINGS; 13use crate::config::SETTINGS;
14use crate::db::Device; 14use crate::db::Device;
15 15
16pub type PingMap = DashMap<String, PingValue>; 16pub type StatusMap = DashMap<String, Value>;
17 17
18#[derive(Debug, Clone)] 18#[derive(Debug, Clone)]
19pub struct PingValue { 19pub struct Value {
20 pub ip: String, 20 pub ip: String,
21 pub online: bool 21 pub online: bool
22} 22}
23 23
24pub async fn spawn(tx: Sender<BroadcastCommands>, device: Device, uuid: String, ping_map: &PingMap, db: &PgPool) { 24pub async fn spawn(tx: Sender<BroadcastCommands>, device: Device, uuid: String, ping_map: &StatusMap, db: &PgPool) {
25 let timer = Instant::now(); 25 let timer = Instant::now();
26 let payload = [0; 8]; 26 let payload = [0; 8];
27 27
@@ -63,7 +63,7 @@ pub async fn spawn(tx: Sender<BroadcastCommands>, device: Device, uuid: String,
63 timer.elapsed().whole_seconds(), 63 timer.elapsed().whole_seconds(),
64 device.id 64 device.id
65 ).execute(db).await.unwrap(); 65 ).execute(db).await.unwrap();
66 ping_map.insert(uuid.clone(), PingValue { ip: device.ip.clone(), online: true }); 66 ping_map.insert(uuid.clone(), Value { ip: device.ip.clone(), online: true });
67 tokio::time::sleep(tokio::time::Duration::from_secs(60)).await; 67 tokio::time::sleep(tokio::time::Duration::from_secs(60)).await;
68 } 68 }
69 trace!("remove {} from ping_map", uuid); 69 trace!("remove {} from ping_map", uuid);
@@ -107,7 +107,7 @@ async fn get_eta(db: &PgPool) -> i64 {
107 None => { vec![0] }, 107 None => { vec![0] },
108 Some(t) => t, 108 Some(t) => t,
109 }; 109 };
110 times.iter().sum::<i64>() / times.len() as i64 110 times.iter().sum::<i64>() / i64::try_from(times.len()).unwrap()
111 111
112} 112}
113 113
diff --git a/src/wol.rs b/src/wol.rs
index 8755b21..83c0ee6 100644
--- a/src/wol.rs
+++ b/src/wol.rs
@@ -1,17 +1,17 @@
1use std::net::{SocketAddr, UdpSocket}; 1use std::net::{SocketAddr, UdpSocket};
2 2
3use crate::error::WebolError; 3use crate::error::Error;
4 4
5/// Creates the magic packet from a mac address 5/// Creates the magic packet from a mac address
6/// 6///
7/// # Panics 7/// # Panics
8/// 8///
9/// Panics if `mac_addr` is an invalid mac 9/// Panics if `mac_addr` is an invalid mac
10pub fn create_buffer(mac_addr: &str) -> Result<Vec<u8>, WebolError> { 10pub fn create_buffer(mac_addr: &str) -> Result<Vec<u8>, Error> {
11 let mut mac = Vec::new(); 11 let mut mac = Vec::new();
12 let sp = mac_addr.split(':'); 12 let sp = mac_addr.split(':');
13 for f in sp { 13 for f in sp {
14 mac.push(u8::from_str_radix(f, 16).map_err(WebolError::BufferParse)?); 14 mac.push(u8::from_str_radix(f, 16).map_err(Error::BufferParse)?);
15 }; 15 };
16 let mut buf = vec![255; 6]; 16 let mut buf = vec![255; 6];
17 for _ in 0..16 { 17 for _ in 0..16 {
@@ -23,8 +23,8 @@ pub fn create_buffer(mac_addr: &str) -> Result<Vec<u8>, WebolError> {
23} 23}
24 24
25/// Sends a buffer on UDP broadcast 25/// Sends a buffer on UDP broadcast
26pub fn send_packet(bind_addr: &SocketAddr, broadcast_addr: &SocketAddr, buffer: Vec<u8>) -> Result<usize, WebolError> { 26pub fn send_packet(bind_addr: &SocketAddr, broadcast_addr: &SocketAddr, buffer: &[u8]) -> Result<usize, Error> {
27 let socket = UdpSocket::bind(bind_addr).map_err(WebolError::Broadcast)?; 27 let socket = UdpSocket::bind(bind_addr).map_err(Error::Broadcast)?;
28 socket.set_broadcast(true).map_err(WebolError::Broadcast)?; 28 socket.set_broadcast(true).map_err(Error::Broadcast)?;
29 socket.send_to(&buffer, broadcast_addr).map_err(WebolError::Broadcast) 29 socket.send_to(buffer, broadcast_addr).map_err(Error::Broadcast)
30} 30}