itsi-server 0.2.14 → 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2fec88d9b1fec3458e5d890cbd2b517c6c58cff123a2d28b26a00571edc456f
4
- data.tar.gz: c460f900b09ba2602b8a0a9211d330e953fb8490497b24ae5390de9652780f42
3
+ metadata.gz: 839060ed768988b5230a345dc4820dd16f025d95a0e0392eb01e9e446aa912bb
4
+ data.tar.gz: ddc0c5c09b6d883094b6bfcf62d31a66493928aec61bc9cf4cb82f742f3f99e1
5
5
  SHA512:
6
- metadata.gz: 34402433ec5e6d9f755a2ac41e5fb7b17d6be27d9d6a30d23fefdf595c5d9619b05ad3a00751f72923db579685daf537e336db83d772f6307a6f5046de056cd0
7
- data.tar.gz: 46e05ae1dd1c4c0b9219fee35783a55294edf6d344afe938f041779ba8ab2ab98625418b3d631b6c1d1cde9ff9d346f6e215bbe15032756caabef25e279dc386
6
+ metadata.gz: da0187a1d822b7da1b30ac352fe1914a9f1f791f33674c19511e491576c87c665cba9b86d4f7699bf2c3acc9cf797a457d6b2e273a8831da24ad3f05b60c0e8e
7
+ data.tar.gz: 6e7a8a000821d26e438b2c750ad87011176e75f6341311aeb41dbdc6ef952c70733a3c9d7ddbc9fd500e70287718760e95140b43b2657c6ad23413470d9aa1bf
data/Cargo.lock CHANGED
@@ -17,6 +17,19 @@ version = "2.0.0"
17
17
  source = "registry+https://github.com/rust-lang/crates.io-index"
18
18
  checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
19
19
 
20
+ [[package]]
21
+ name = "ahash"
22
+ version = "0.8.11"
23
+ source = "registry+https://github.com/rust-lang/crates.io-index"
24
+ checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
25
+ dependencies = [
26
+ "cfg-if",
27
+ "getrandom 0.2.15",
28
+ "once_cell",
29
+ "version_check",
30
+ "zerocopy 0.7.35",
31
+ ]
32
+
20
33
  [[package]]
21
34
  name = "aho-corasick"
22
35
  version = "1.1.3"
@@ -1080,19 +1093,6 @@ dependencies = [
1080
1093
  "slab",
1081
1094
  ]
1082
1095
 
1083
- [[package]]
1084
- name = "generator"
1085
- version = "0.8.4"
1086
- source = "registry+https://github.com/rust-lang/crates.io-index"
1087
- checksum = "cc6bd114ceda131d3b1d665eba35788690ad37f5916457286b32ab6fd3c438dd"
1088
- dependencies = [
1089
- "cfg-if",
1090
- "libc",
1091
- "log",
1092
- "rustversion",
1093
- "windows 0.58.0",
1094
- ]
1095
-
1096
1096
  [[package]]
1097
1097
  name = "generic-array"
1098
1098
  version = "0.14.7"
@@ -1644,7 +1644,7 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
1644
1644
 
1645
1645
  [[package]]
1646
1646
  name = "itsi-server"
1647
- version = "0.2.14"
1647
+ version = "0.2.15"
1648
1648
  dependencies = [
1649
1649
  "argon2",
1650
1650
  "async-channel",
@@ -1675,13 +1675,14 @@ dependencies = [
1675
1675
  "magnus",
1676
1676
  "md5",
1677
1677
  "memchr",
1678
- "moka",
1679
1678
  "nix",
1680
1679
  "notify",
1681
1680
  "num_cpus",
1682
1681
  "parking_lot",
1683
1682
  "percent-encoding",
1683
+ "phf",
1684
1684
  "pin-project",
1685
+ "quick_cache",
1685
1686
  "rand 0.9.1",
1686
1687
  "rcgen",
1687
1688
  "redis",
@@ -1853,7 +1854,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1853
1854
  checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
1854
1855
  dependencies = [
1855
1856
  "cfg-if",
1856
- "windows-targets 0.48.5",
1857
+ "windows-targets 0.52.6",
1857
1858
  ]
1858
1859
 
1859
1860
  [[package]]
@@ -1901,19 +1902,6 @@ version = "0.4.27"
1901
1902
  source = "registry+https://github.com/rust-lang/crates.io-index"
1902
1903
  checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
1903
1904
 
1904
- [[package]]
1905
- name = "loom"
1906
- version = "0.7.2"
1907
- source = "registry+https://github.com/rust-lang/crates.io-index"
1908
- checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca"
1909
- dependencies = [
1910
- "cfg-if",
1911
- "generator",
1912
- "scoped-tls",
1913
- "tracing",
1914
- "tracing-subscriber",
1915
- ]
1916
-
1917
1905
  [[package]]
1918
1906
  name = "magnus"
1919
1907
  version = "0.7.1"
@@ -2017,25 +2005,6 @@ dependencies = [
2017
2005
  "windows-sys 0.52.0",
2018
2006
  ]
2019
2007
 
2020
- [[package]]
2021
- name = "moka"
2022
- version = "0.12.10"
2023
- source = "registry+https://github.com/rust-lang/crates.io-index"
2024
- checksum = "a9321642ca94a4282428e6ea4af8cc2ca4eac48ac7a6a4ea8f33f76d0ce70926"
2025
- dependencies = [
2026
- "crossbeam-channel",
2027
- "crossbeam-epoch",
2028
- "crossbeam-utils",
2029
- "loom",
2030
- "parking_lot",
2031
- "portable-atomic",
2032
- "rustc_version",
2033
- "smallvec",
2034
- "tagptr",
2035
- "thiserror 1.0.69",
2036
- "uuid",
2037
- ]
2038
-
2039
2008
  [[package]]
2040
2009
  name = "multer"
2041
2010
  version = "2.1.0"
@@ -2272,6 +2241,48 @@ version = "2.3.1"
2272
2241
  source = "registry+https://github.com/rust-lang/crates.io-index"
2273
2242
  checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
2274
2243
 
2244
+ [[package]]
2245
+ name = "phf"
2246
+ version = "0.11.3"
2247
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2248
+ checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078"
2249
+ dependencies = [
2250
+ "phf_macros",
2251
+ "phf_shared",
2252
+ ]
2253
+
2254
+ [[package]]
2255
+ name = "phf_generator"
2256
+ version = "0.11.3"
2257
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2258
+ checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d"
2259
+ dependencies = [
2260
+ "phf_shared",
2261
+ "rand 0.8.5",
2262
+ ]
2263
+
2264
+ [[package]]
2265
+ name = "phf_macros"
2266
+ version = "0.11.3"
2267
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2268
+ checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216"
2269
+ dependencies = [
2270
+ "phf_generator",
2271
+ "phf_shared",
2272
+ "proc-macro2",
2273
+ "quote",
2274
+ "syn 2.0.100",
2275
+ ]
2276
+
2277
+ [[package]]
2278
+ name = "phf_shared"
2279
+ version = "0.11.3"
2280
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2281
+ checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5"
2282
+ dependencies = [
2283
+ "siphasher",
2284
+ ]
2285
+
2275
2286
  [[package]]
2276
2287
  name = "pin-project"
2277
2288
  version = "1.1.10"
@@ -2310,12 +2321,6 @@ version = "0.3.32"
2310
2321
  source = "registry+https://github.com/rust-lang/crates.io-index"
2311
2322
  checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
2312
2323
 
2313
- [[package]]
2314
- name = "portable-atomic"
2315
- version = "1.11.0"
2316
- source = "registry+https://github.com/rust-lang/crates.io-index"
2317
- checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e"
2318
-
2319
2324
  [[package]]
2320
2325
  name = "powerfmt"
2321
2326
  version = "0.2.0"
@@ -2328,7 +2333,7 @@ version = "0.2.21"
2328
2333
  source = "registry+https://github.com/rust-lang/crates.io-index"
2329
2334
  checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
2330
2335
  dependencies = [
2331
- "zerocopy",
2336
+ "zerocopy 0.8.24",
2332
2337
  ]
2333
2338
 
2334
2339
  [[package]]
@@ -2374,6 +2379,18 @@ dependencies = [
2374
2379
  "unicode-ident",
2375
2380
  ]
2376
2381
 
2382
+ [[package]]
2383
+ name = "quick_cache"
2384
+ version = "0.6.13"
2385
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2386
+ checksum = "287e56aac5a2b4fb25a6fb050961d157635924c8696305a5c937a76f29841a0f"
2387
+ dependencies = [
2388
+ "ahash",
2389
+ "equivalent",
2390
+ "hashbrown",
2391
+ "parking_lot",
2392
+ ]
2393
+
2377
2394
  [[package]]
2378
2395
  name = "quinn"
2379
2396
  version = "0.11.7"
@@ -2746,15 +2763,6 @@ version = "2.1.1"
2746
2763
  source = "registry+https://github.com/rust-lang/crates.io-index"
2747
2764
  checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
2748
2765
 
2749
- [[package]]
2750
- name = "rustc_version"
2751
- version = "0.4.1"
2752
- source = "registry+https://github.com/rust-lang/crates.io-index"
2753
- checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
2754
- dependencies = [
2755
- "semver",
2756
- ]
2757
-
2758
2766
  [[package]]
2759
2767
  name = "rusticata-macros"
2760
2768
  version = "4.1.0"
@@ -2922,12 +2930,6 @@ dependencies = [
2922
2930
  "libc",
2923
2931
  ]
2924
2932
 
2925
- [[package]]
2926
- name = "semver"
2927
- version = "1.0.26"
2928
- source = "registry+https://github.com/rust-lang/crates.io-index"
2929
- checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0"
2930
-
2931
2933
  [[package]]
2932
2934
  name = "seq-macro"
2933
2935
  version = "0.3.6"
@@ -3093,6 +3095,12 @@ dependencies = [
3093
3095
  "windows-sys 0.48.0",
3094
3096
  ]
3095
3097
 
3098
+ [[package]]
3099
+ name = "siphasher"
3100
+ version = "1.0.1"
3101
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3102
+ checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
3103
+
3096
3104
  [[package]]
3097
3105
  name = "slab"
3098
3106
  version = "0.4.9"
@@ -3225,15 +3233,9 @@ dependencies = [
3225
3233
  "memchr",
3226
3234
  "ntapi",
3227
3235
  "rayon",
3228
- "windows 0.57.0",
3236
+ "windows",
3229
3237
  ]
3230
3238
 
3231
- [[package]]
3232
- name = "tagptr"
3233
- version = "0.2.0"
3234
- source = "registry+https://github.com/rust-lang/crates.io-index"
3235
- checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417"
3236
-
3237
3239
  [[package]]
3238
3240
  name = "tap"
3239
3241
  version = "1.0.1"
@@ -3663,15 +3665,6 @@ version = "0.2.2"
3663
3665
  source = "registry+https://github.com/rust-lang/crates.io-index"
3664
3666
  checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
3665
3667
 
3666
- [[package]]
3667
- name = "uuid"
3668
- version = "1.16.0"
3669
- source = "registry+https://github.com/rust-lang/crates.io-index"
3670
- checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9"
3671
- dependencies = [
3672
- "getrandom 0.3.2",
3673
- ]
3674
-
3675
3668
  [[package]]
3676
3669
  name = "valuable"
3677
3670
  version = "0.1.1"
@@ -3919,16 +3912,6 @@ dependencies = [
3919
3912
  "windows-targets 0.52.6",
3920
3913
  ]
3921
3914
 
3922
- [[package]]
3923
- name = "windows"
3924
- version = "0.58.0"
3925
- source = "registry+https://github.com/rust-lang/crates.io-index"
3926
- checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
3927
- dependencies = [
3928
- "windows-core 0.58.0",
3929
- "windows-targets 0.52.6",
3930
- ]
3931
-
3932
3915
  [[package]]
3933
3916
  name = "windows-core"
3934
3917
  version = "0.57.0"
@@ -3941,19 +3924,6 @@ dependencies = [
3941
3924
  "windows-targets 0.52.6",
3942
3925
  ]
3943
3926
 
3944
- [[package]]
3945
- name = "windows-core"
3946
- version = "0.58.0"
3947
- source = "registry+https://github.com/rust-lang/crates.io-index"
3948
- checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
3949
- dependencies = [
3950
- "windows-implement 0.58.0",
3951
- "windows-interface 0.58.0",
3952
- "windows-result 0.2.0",
3953
- "windows-strings 0.1.0",
3954
- "windows-targets 0.52.6",
3955
- ]
3956
-
3957
3927
  [[package]]
3958
3928
  name = "windows-core"
3959
3929
  version = "0.61.0"
@@ -3978,17 +3948,6 @@ dependencies = [
3978
3948
  "syn 2.0.100",
3979
3949
  ]
3980
3950
 
3981
- [[package]]
3982
- name = "windows-implement"
3983
- version = "0.58.0"
3984
- source = "registry+https://github.com/rust-lang/crates.io-index"
3985
- checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
3986
- dependencies = [
3987
- "proc-macro2",
3988
- "quote",
3989
- "syn 2.0.100",
3990
- ]
3991
-
3992
3951
  [[package]]
3993
3952
  name = "windows-implement"
3994
3953
  version = "0.60.0"
@@ -4011,17 +3970,6 @@ dependencies = [
4011
3970
  "syn 2.0.100",
4012
3971
  ]
4013
3972
 
4014
- [[package]]
4015
- name = "windows-interface"
4016
- version = "0.58.0"
4017
- source = "registry+https://github.com/rust-lang/crates.io-index"
4018
- checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
4019
- dependencies = [
4020
- "proc-macro2",
4021
- "quote",
4022
- "syn 2.0.100",
4023
- ]
4024
-
4025
3973
  [[package]]
4026
3974
  name = "windows-interface"
4027
3975
  version = "0.59.1"
@@ -4059,15 +4007,6 @@ dependencies = [
4059
4007
  "windows-targets 0.52.6",
4060
4008
  ]
4061
4009
 
4062
- [[package]]
4063
- name = "windows-result"
4064
- version = "0.2.0"
4065
- source = "registry+https://github.com/rust-lang/crates.io-index"
4066
- checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
4067
- dependencies = [
4068
- "windows-targets 0.52.6",
4069
- ]
4070
-
4071
4010
  [[package]]
4072
4011
  name = "windows-result"
4073
4012
  version = "0.3.2"
@@ -4077,16 +4016,6 @@ dependencies = [
4077
4016
  "windows-link",
4078
4017
  ]
4079
4018
 
4080
- [[package]]
4081
- name = "windows-strings"
4082
- version = "0.1.0"
4083
- source = "registry+https://github.com/rust-lang/crates.io-index"
4084
- checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
4085
- dependencies = [
4086
- "windows-result 0.2.0",
4087
- "windows-targets 0.52.6",
4088
- ]
4089
-
4090
4019
  [[package]]
4091
4020
  name = "windows-strings"
4092
4021
  version = "0.3.1"
@@ -4389,13 +4318,33 @@ dependencies = [
4389
4318
  "synstructure",
4390
4319
  ]
4391
4320
 
4321
+ [[package]]
4322
+ name = "zerocopy"
4323
+ version = "0.7.35"
4324
+ source = "registry+https://github.com/rust-lang/crates.io-index"
4325
+ checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
4326
+ dependencies = [
4327
+ "zerocopy-derive 0.7.35",
4328
+ ]
4329
+
4392
4330
  [[package]]
4393
4331
  name = "zerocopy"
4394
4332
  version = "0.8.24"
4395
4333
  source = "registry+https://github.com/rust-lang/crates.io-index"
4396
4334
  checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879"
4397
4335
  dependencies = [
4398
- "zerocopy-derive",
4336
+ "zerocopy-derive 0.8.24",
4337
+ ]
4338
+
4339
+ [[package]]
4340
+ name = "zerocopy-derive"
4341
+ version = "0.7.35"
4342
+ source = "registry+https://github.com/rust-lang/crates.io-index"
4343
+ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
4344
+ dependencies = [
4345
+ "proc-macro2",
4346
+ "quote",
4347
+ "syn 2.0.100",
4399
4348
  ]
4400
4349
 
4401
4350
  [[package]]
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "itsi-scheduler"
3
- version = "0.2.14"
3
+ version = "0.2.15"
4
4
  edition = "2021"
5
5
  authors = ["Wouter Coppieters <wc@pico.net.nz>"]
6
6
  license = "MIT"
@@ -111,7 +111,7 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
111
111
 
112
112
  [[package]]
113
113
  name = "atty"
114
- version = "0.2.14"
114
+ version = "0.2.15"
115
115
  source = "registry+https://github.com/rust-lang/crates.io-index"
116
116
  checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
117
117
  dependencies = [
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "itsi-server"
3
- version = "0.2.14"
3
+ version = "0.2.15"
4
4
  edition = "2021"
5
5
  authors = ["Wouter Coppieters <wc@pico.net.nz>"]
6
6
  license = "MIT"
@@ -43,7 +43,6 @@ itsi_tracing = { path = "../itsi_tracing" }
43
43
  itsi_acme = { path = "../itsi_acme" }
44
44
  jsonwebtoken = "9.3.1"
45
45
  magnus = { version = "0.7.1", features = ["bytes", "rb-sys"] }
46
- moka = { version = "0.12.10", features = ["sync"] }
47
46
  notify = { version = "8.0.0" }
48
47
  nix = { version = "0.29.0", features = [
49
48
  "socket",
@@ -55,6 +54,7 @@ nix = { version = "0.29.0", features = [
55
54
  num_cpus = "1.16.0"
56
55
  parking_lot = "0.12.3"
57
56
  pin-project = "1.1.9"
57
+ phf = { version = "0.11.3", features = ["macros"] }
58
58
  rand = "0.9.0"
59
59
  rcgen = { version = "0.13.2", features = ["x509-parser", "pem"] }
60
60
  regex = "1.11.1"
@@ -89,3 +89,4 @@ sha-crypt = "0.5.0"
89
89
  argon2 = "0.5.3"
90
90
  core_affinity = "0.8.3"
91
91
  memchr = "2.7.4"
92
+ quick_cache = "0.6.13"
@@ -16,10 +16,15 @@ use http::{
16
16
  };
17
17
  use itsi_error::ItsiError;
18
18
  use magnus::error::Result;
19
- use moka::sync::Cache;
19
+ use quick_cache::sync::Cache;
20
20
  use regex::Regex;
21
21
  use serde::Deserialize;
22
- use std::{collections::HashMap, path::PathBuf, sync::OnceLock, time::Duration};
22
+ use std::{
23
+ collections::HashMap,
24
+ path::PathBuf,
25
+ sync::{Arc, OnceLock},
26
+ time::Duration,
27
+ };
23
28
  use tracing::debug;
24
29
 
25
30
  #[derive(Debug, Deserialize)]
@@ -76,10 +81,7 @@ impl MiddlewareLayer for StaticAssets {
76
81
  recheck_interval: Duration::from_secs(self.file_check_interval),
77
82
  serve_hidden_files: self.serve_hidden_files,
78
83
  allowed_extensions: self.allowed_extensions.clone(),
79
- miss_cache: Cache::builder()
80
- .max_capacity(self.max_files_in_memory)
81
- .time_to_live(Duration::from_secs(self.file_check_interval))
82
- .build(),
84
+ miss_cache: Arc::new(Cache::new(self.max_files_in_memory as usize)),
83
85
  })?)
84
86
  .map_err(ItsiError::new)?;
85
87
  Ok(())