itsi 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: 239b868f5edfaff5a1c7dd9e47b9f6023f284ae7c06a43438ec127ab83b5f1c1
4
- data.tar.gz: 8f0e2154a4e05281eeabb9e8eaded247be04ea17efa66e72cccbad7df356dcfb
3
+ metadata.gz: 48a2f9ed6dbf64c922c0afd1a8f7ecd07fbed9587b6863cd3052eb1b957d00da
4
+ data.tar.gz: c69b07d771b76e228213f251e77170ce20b81c169327781865d4f03a865e934b
5
5
  SHA512:
6
- metadata.gz: db430b1ba0736844a54eb9ebe00a2f12b51342b27544bdd58ccce2440fb5eb1e6e961cf95dc3a5665def3384ba1f8cd2cfa457f93e62d01022be3419a1f3b00c
7
- data.tar.gz: e626d98db8d34bddca498e8086ff8b4dfe41091b1363f7c3f0899b061ecab0ff79b628f2393f82b54dca073c78f85801fb07af3d5c0880f334103fd3cf7a7b86
6
+ metadata.gz: 9f99f959ffa9090035849acd0433d9117ca73d2565d2eb0d656a2b6f2dbc2dbfcef32b27a2c2ab2c20f143faca27a6c96df000046659d36d54ab0cfd43fcb690
7
+ data.tar.gz: af9a7f471ee483dcb28b6a3c1520b7a050423427f2b1219308f64ee2a12dfe862de61eb46688ae0accf2fc634c65a01e393a3f3f5044476a124541b0d0a9b453
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-scheduler"
1647
- version = "0.2.14"
1647
+ version = "0.2.15"
1648
1648
  dependencies = [
1649
1649
  "bytes",
1650
1650
  "derive_more",
@@ -1662,7 +1662,7 @@ dependencies = [
1662
1662
 
1663
1663
  [[package]]
1664
1664
  name = "itsi-server"
1665
- version = "0.2.14"
1665
+ version = "0.2.15"
1666
1666
  dependencies = [
1667
1667
  "argon2",
1668
1668
  "async-channel",
@@ -1693,13 +1693,14 @@ dependencies = [
1693
1693
  "magnus",
1694
1694
  "md5",
1695
1695
  "memchr",
1696
- "moka",
1697
1696
  "nix",
1698
1697
  "notify",
1699
1698
  "num_cpus",
1700
1699
  "parking_lot",
1701
1700
  "percent-encoding",
1701
+ "phf",
1702
1702
  "pin-project",
1703
+ "quick_cache",
1703
1704
  "rand 0.9.1",
1704
1705
  "rcgen",
1705
1706
  "redis",
@@ -1880,7 +1881,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1880
1881
  checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
1881
1882
  dependencies = [
1882
1883
  "cfg-if",
1883
- "windows-targets 0.48.5",
1884
+ "windows-targets 0.52.6",
1884
1885
  ]
1885
1886
 
1886
1887
  [[package]]
@@ -1928,19 +1929,6 @@ version = "0.4.27"
1928
1929
  source = "registry+https://github.com/rust-lang/crates.io-index"
1929
1930
  checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
1930
1931
 
1931
- [[package]]
1932
- name = "loom"
1933
- version = "0.7.2"
1934
- source = "registry+https://github.com/rust-lang/crates.io-index"
1935
- checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca"
1936
- dependencies = [
1937
- "cfg-if",
1938
- "generator",
1939
- "scoped-tls",
1940
- "tracing",
1941
- "tracing-subscriber",
1942
- ]
1943
-
1944
1932
  [[package]]
1945
1933
  name = "magnus"
1946
1934
  version = "0.7.1"
@@ -2044,25 +2032,6 @@ dependencies = [
2044
2032
  "windows-sys 0.52.0",
2045
2033
  ]
2046
2034
 
2047
- [[package]]
2048
- name = "moka"
2049
- version = "0.12.10"
2050
- source = "registry+https://github.com/rust-lang/crates.io-index"
2051
- checksum = "a9321642ca94a4282428e6ea4af8cc2ca4eac48ac7a6a4ea8f33f76d0ce70926"
2052
- dependencies = [
2053
- "crossbeam-channel",
2054
- "crossbeam-epoch",
2055
- "crossbeam-utils",
2056
- "loom",
2057
- "parking_lot",
2058
- "portable-atomic",
2059
- "rustc_version",
2060
- "smallvec",
2061
- "tagptr",
2062
- "thiserror 1.0.69",
2063
- "uuid",
2064
- ]
2065
-
2066
2035
  [[package]]
2067
2036
  name = "multer"
2068
2037
  version = "2.1.0"
@@ -2299,6 +2268,48 @@ version = "2.3.1"
2299
2268
  source = "registry+https://github.com/rust-lang/crates.io-index"
2300
2269
  checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
2301
2270
 
2271
+ [[package]]
2272
+ name = "phf"
2273
+ version = "0.11.3"
2274
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2275
+ checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078"
2276
+ dependencies = [
2277
+ "phf_macros",
2278
+ "phf_shared",
2279
+ ]
2280
+
2281
+ [[package]]
2282
+ name = "phf_generator"
2283
+ version = "0.11.3"
2284
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2285
+ checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d"
2286
+ dependencies = [
2287
+ "phf_shared",
2288
+ "rand 0.8.5",
2289
+ ]
2290
+
2291
+ [[package]]
2292
+ name = "phf_macros"
2293
+ version = "0.11.3"
2294
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2295
+ checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216"
2296
+ dependencies = [
2297
+ "phf_generator",
2298
+ "phf_shared",
2299
+ "proc-macro2",
2300
+ "quote",
2301
+ "syn 2.0.100",
2302
+ ]
2303
+
2304
+ [[package]]
2305
+ name = "phf_shared"
2306
+ version = "0.11.3"
2307
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2308
+ checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5"
2309
+ dependencies = [
2310
+ "siphasher",
2311
+ ]
2312
+
2302
2313
  [[package]]
2303
2314
  name = "pin-project"
2304
2315
  version = "1.1.10"
@@ -2337,12 +2348,6 @@ version = "0.3.32"
2337
2348
  source = "registry+https://github.com/rust-lang/crates.io-index"
2338
2349
  checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
2339
2350
 
2340
- [[package]]
2341
- name = "portable-atomic"
2342
- version = "1.11.0"
2343
- source = "registry+https://github.com/rust-lang/crates.io-index"
2344
- checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e"
2345
-
2346
2351
  [[package]]
2347
2352
  name = "powerfmt"
2348
2353
  version = "0.2.0"
@@ -2355,7 +2360,7 @@ version = "0.2.21"
2355
2360
  source = "registry+https://github.com/rust-lang/crates.io-index"
2356
2361
  checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
2357
2362
  dependencies = [
2358
- "zerocopy",
2363
+ "zerocopy 0.8.24",
2359
2364
  ]
2360
2365
 
2361
2366
  [[package]]
@@ -2401,6 +2406,18 @@ dependencies = [
2401
2406
  "unicode-ident",
2402
2407
  ]
2403
2408
 
2409
+ [[package]]
2410
+ name = "quick_cache"
2411
+ version = "0.6.13"
2412
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2413
+ checksum = "287e56aac5a2b4fb25a6fb050961d157635924c8696305a5c937a76f29841a0f"
2414
+ dependencies = [
2415
+ "ahash",
2416
+ "equivalent",
2417
+ "hashbrown",
2418
+ "parking_lot",
2419
+ ]
2420
+
2404
2421
  [[package]]
2405
2422
  name = "quinn"
2406
2423
  version = "0.11.7"
@@ -2773,15 +2790,6 @@ version = "2.1.1"
2773
2790
  source = "registry+https://github.com/rust-lang/crates.io-index"
2774
2791
  checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
2775
2792
 
2776
- [[package]]
2777
- name = "rustc_version"
2778
- version = "0.4.1"
2779
- source = "registry+https://github.com/rust-lang/crates.io-index"
2780
- checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
2781
- dependencies = [
2782
- "semver",
2783
- ]
2784
-
2785
2793
  [[package]]
2786
2794
  name = "rusticata-macros"
2787
2795
  version = "4.1.0"
@@ -2949,12 +2957,6 @@ dependencies = [
2949
2957
  "libc",
2950
2958
  ]
2951
2959
 
2952
- [[package]]
2953
- name = "semver"
2954
- version = "1.0.26"
2955
- source = "registry+https://github.com/rust-lang/crates.io-index"
2956
- checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0"
2957
-
2958
2960
  [[package]]
2959
2961
  name = "seq-macro"
2960
2962
  version = "0.3.6"
@@ -3120,6 +3122,12 @@ dependencies = [
3120
3122
  "windows-sys 0.48.0",
3121
3123
  ]
3122
3124
 
3125
+ [[package]]
3126
+ name = "siphasher"
3127
+ version = "1.0.1"
3128
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3129
+ checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
3130
+
3123
3131
  [[package]]
3124
3132
  name = "slab"
3125
3133
  version = "0.4.9"
@@ -3252,15 +3260,9 @@ dependencies = [
3252
3260
  "memchr",
3253
3261
  "ntapi",
3254
3262
  "rayon",
3255
- "windows 0.57.0",
3263
+ "windows",
3256
3264
  ]
3257
3265
 
3258
- [[package]]
3259
- name = "tagptr"
3260
- version = "0.2.0"
3261
- source = "registry+https://github.com/rust-lang/crates.io-index"
3262
- checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417"
3263
-
3264
3266
  [[package]]
3265
3267
  name = "tap"
3266
3268
  version = "1.0.1"
@@ -3690,15 +3692,6 @@ version = "0.2.2"
3690
3692
  source = "registry+https://github.com/rust-lang/crates.io-index"
3691
3693
  checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
3692
3694
 
3693
- [[package]]
3694
- name = "uuid"
3695
- version = "1.16.0"
3696
- source = "registry+https://github.com/rust-lang/crates.io-index"
3697
- checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9"
3698
- dependencies = [
3699
- "getrandom 0.3.2",
3700
- ]
3701
-
3702
3695
  [[package]]
3703
3696
  name = "valuable"
3704
3697
  version = "0.1.1"
@@ -3946,16 +3939,6 @@ dependencies = [
3946
3939
  "windows-targets 0.52.6",
3947
3940
  ]
3948
3941
 
3949
- [[package]]
3950
- name = "windows"
3951
- version = "0.58.0"
3952
- source = "registry+https://github.com/rust-lang/crates.io-index"
3953
- checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
3954
- dependencies = [
3955
- "windows-core 0.58.0",
3956
- "windows-targets 0.52.6",
3957
- ]
3958
-
3959
3942
  [[package]]
3960
3943
  name = "windows-core"
3961
3944
  version = "0.57.0"
@@ -3968,19 +3951,6 @@ dependencies = [
3968
3951
  "windows-targets 0.52.6",
3969
3952
  ]
3970
3953
 
3971
- [[package]]
3972
- name = "windows-core"
3973
- version = "0.58.0"
3974
- source = "registry+https://github.com/rust-lang/crates.io-index"
3975
- checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
3976
- dependencies = [
3977
- "windows-implement 0.58.0",
3978
- "windows-interface 0.58.0",
3979
- "windows-result 0.2.0",
3980
- "windows-strings 0.1.0",
3981
- "windows-targets 0.52.6",
3982
- ]
3983
-
3984
3954
  [[package]]
3985
3955
  name = "windows-core"
3986
3956
  version = "0.61.0"
@@ -4005,17 +3975,6 @@ dependencies = [
4005
3975
  "syn 2.0.100",
4006
3976
  ]
4007
3977
 
4008
- [[package]]
4009
- name = "windows-implement"
4010
- version = "0.58.0"
4011
- source = "registry+https://github.com/rust-lang/crates.io-index"
4012
- checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
4013
- dependencies = [
4014
- "proc-macro2",
4015
- "quote",
4016
- "syn 2.0.100",
4017
- ]
4018
-
4019
3978
  [[package]]
4020
3979
  name = "windows-implement"
4021
3980
  version = "0.60.0"
@@ -4038,17 +3997,6 @@ dependencies = [
4038
3997
  "syn 2.0.100",
4039
3998
  ]
4040
3999
 
4041
- [[package]]
4042
- name = "windows-interface"
4043
- version = "0.58.0"
4044
- source = "registry+https://github.com/rust-lang/crates.io-index"
4045
- checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
4046
- dependencies = [
4047
- "proc-macro2",
4048
- "quote",
4049
- "syn 2.0.100",
4050
- ]
4051
-
4052
4000
  [[package]]
4053
4001
  name = "windows-interface"
4054
4002
  version = "0.59.1"
@@ -4086,15 +4034,6 @@ dependencies = [
4086
4034
  "windows-targets 0.52.6",
4087
4035
  ]
4088
4036
 
4089
- [[package]]
4090
- name = "windows-result"
4091
- version = "0.2.0"
4092
- source = "registry+https://github.com/rust-lang/crates.io-index"
4093
- checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
4094
- dependencies = [
4095
- "windows-targets 0.52.6",
4096
- ]
4097
-
4098
4037
  [[package]]
4099
4038
  name = "windows-result"
4100
4039
  version = "0.3.2"
@@ -4104,16 +4043,6 @@ dependencies = [
4104
4043
  "windows-link",
4105
4044
  ]
4106
4045
 
4107
- [[package]]
4108
- name = "windows-strings"
4109
- version = "0.1.0"
4110
- source = "registry+https://github.com/rust-lang/crates.io-index"
4111
- checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
4112
- dependencies = [
4113
- "windows-result 0.2.0",
4114
- "windows-targets 0.52.6",
4115
- ]
4116
-
4117
4046
  [[package]]
4118
4047
  name = "windows-strings"
4119
4048
  version = "0.3.1"
@@ -4416,13 +4345,33 @@ dependencies = [
4416
4345
  "synstructure",
4417
4346
  ]
4418
4347
 
4348
+ [[package]]
4349
+ name = "zerocopy"
4350
+ version = "0.7.35"
4351
+ source = "registry+https://github.com/rust-lang/crates.io-index"
4352
+ checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
4353
+ dependencies = [
4354
+ "zerocopy-derive 0.7.35",
4355
+ ]
4356
+
4419
4357
  [[package]]
4420
4358
  name = "zerocopy"
4421
4359
  version = "0.8.24"
4422
4360
  source = "registry+https://github.com/rust-lang/crates.io-index"
4423
4361
  checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879"
4424
4362
  dependencies = [
4425
- "zerocopy-derive",
4363
+ "zerocopy-derive 0.8.24",
4364
+ ]
4365
+
4366
+ [[package]]
4367
+ name = "zerocopy-derive"
4368
+ version = "0.7.35"
4369
+ source = "registry+https://github.com/rust-lang/crates.io-index"
4370
+ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
4371
+ dependencies = [
4372
+ "proc-macro2",
4373
+ "quote",
4374
+ "syn 2.0.100",
4426
4375
  ]
4427
4376
 
4428
4377
  [[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(())