summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@sg2.noml.ch>2025-12-29 22:18:04 +0800
committerroot <root@sg2.noml.ch>2025-12-29 22:18:04 +0800
commit1951b063d7ec6d6e8db8a0b5074c73f887749208 (patch)
tree6ece8dfce605fbff6eca6be4bbeb5d7904417bbb
initial commitmain
-rw-r--r--.cargo/config.toml8
-rw-r--r--.gitignore1
-rw-r--r--Cargo.lock2824
-rw-r--r--Cargo.toml14
-rw-r--r--README.md37
-rwxr-xr-xbuild.sh4
-rw-r--r--packet-detector-ebpf/Cargo.toml12
-rw-r--r--packet-detector-ebpf/src/main.rs170
-rw-r--r--packet-detector/Cargo.toml39
-rw-r--r--packet-detector/src/bin/tls_client.rs51
-rw-r--r--packet-detector/src/bin/tls_server.rs295
-rw-r--r--packet-detector/src/lib.rs6
-rw-r--r--packet-detector/src/main.rs150
-rw-r--r--packet-detector/src/tls_util.rs73
-rw-r--r--packet-detector/src/validator.rs64
-rwxr-xr-xrun_test.sh97
-rw-r--r--xtask/Cargo.toml7
-rw-r--r--xtask/src/main.rs38
18 files changed, 3890 insertions, 0 deletions
diff --git a/.cargo/config.toml b/.cargo/config.toml
new file mode 100644
index 0000000..992b038
--- /dev/null
+++ b/.cargo/config.toml
@@ -0,0 +1,8 @@
1[build]
2target-dir = "target"
3
4[unstable]
5build-std = ["core"]
6
7[alias]
8xtask = "run --package xtask --"
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ea8c4bf
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
/target
diff --git a/Cargo.lock b/Cargo.lock
new file mode 100644
index 0000000..be5fb54
--- /dev/null
+++ b/Cargo.lock
@@ -0,0 +1,2824 @@
1# This file is automatically @generated by Cargo.
2# It is not intended for manual editing.
3version = 4
4
5[[package]]
6name = "ahash"
7version = "0.8.12"
8source = "registry+https://github.com/rust-lang/crates.io-index"
9checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
10dependencies = [
11 "cfg-if",
12 "getrandom 0.3.4",
13 "once_cell",
14 "version_check",
15 "zerocopy",
16]
17
18[[package]]
19name = "aho-corasick"
20version = "1.1.4"
21source = "registry+https://github.com/rust-lang/crates.io-index"
22checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
23dependencies = [
24 "memchr",
25]
26
27[[package]]
28name = "allocator-api2"
29version = "0.2.21"
30source = "registry+https://github.com/rust-lang/crates.io-index"
31checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
32
33[[package]]
34name = "android_system_properties"
35version = "0.1.5"
36source = "registry+https://github.com/rust-lang/crates.io-index"
37checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
38dependencies = [
39 "libc",
40]
41
42[[package]]
43name = "anstream"
44version = "0.6.21"
45source = "registry+https://github.com/rust-lang/crates.io-index"
46checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a"
47dependencies = [
48 "anstyle",
49 "anstyle-parse",
50 "anstyle-query",
51 "anstyle-wincon",
52 "colorchoice",
53 "is_terminal_polyfill",
54 "utf8parse",
55]
56
57[[package]]
58name = "anstyle"
59version = "1.0.13"
60source = "registry+https://github.com/rust-lang/crates.io-index"
61checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
62
63[[package]]
64name = "anstyle-parse"
65version = "0.2.7"
66source = "registry+https://github.com/rust-lang/crates.io-index"
67checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
68dependencies = [
69 "utf8parse",
70]
71
72[[package]]
73name = "anstyle-query"
74version = "1.1.5"
75source = "registry+https://github.com/rust-lang/crates.io-index"
76checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
77dependencies = [
78 "windows-sys 0.61.2",
79]
80
81[[package]]
82name = "anstyle-wincon"
83version = "3.0.11"
84source = "registry+https://github.com/rust-lang/crates.io-index"
85checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
86dependencies = [
87 "anstyle",
88 "once_cell_polyfill",
89 "windows-sys 0.61.2",
90]
91
92[[package]]
93name = "anyhow"
94version = "1.0.100"
95source = "registry+https://github.com/rust-lang/crates.io-index"
96checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
97
98[[package]]
99name = "asn1-rs"
100version = "0.7.1"
101source = "registry+https://github.com/rust-lang/crates.io-index"
102checksum = "56624a96882bb8c26d61312ae18cb45868e5a9992ea73c58e45c3101e56a1e60"
103dependencies = [
104 "asn1-rs-derive",
105 "asn1-rs-impl",
106 "displaydoc",
107 "nom",
108 "num-traits",
109 "rusticata-macros",
110 "thiserror 2.0.17",
111 "time",
112]
113
114[[package]]
115name = "asn1-rs-derive"
116version = "0.6.0"
117source = "registry+https://github.com/rust-lang/crates.io-index"
118checksum = "3109e49b1e4909e9db6515a30c633684d68cdeaa252f215214cb4fa1a5bfee2c"
119dependencies = [
120 "proc-macro2",
121 "quote",
122 "syn 2.0.106",
123 "synstructure",
124]
125
126[[package]]
127name = "asn1-rs-impl"
128version = "0.2.0"
129source = "registry+https://github.com/rust-lang/crates.io-index"
130checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7"
131dependencies = [
132 "proc-macro2",
133 "quote",
134 "syn 2.0.106",
135]
136
137[[package]]
138name = "assert_matches"
139version = "1.5.0"
140source = "registry+https://github.com/rust-lang/crates.io-index"
141checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9"
142
143[[package]]
144name = "async-broadcast"
145version = "0.7.2"
146source = "registry+https://github.com/rust-lang/crates.io-index"
147checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532"
148dependencies = [
149 "event-listener",
150 "event-listener-strategy",
151 "futures-core",
152 "pin-project-lite",
153]
154
155[[package]]
156name = "async-stream"
157version = "0.3.6"
158source = "registry+https://github.com/rust-lang/crates.io-index"
159checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476"
160dependencies = [
161 "async-stream-impl",
162 "futures-core",
163 "pin-project-lite",
164]
165
166[[package]]
167name = "async-stream-impl"
168version = "0.3.6"
169source = "registry+https://github.com/rust-lang/crates.io-index"
170checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d"
171dependencies = [
172 "proc-macro2",
173 "quote",
174 "syn 2.0.106",
175]
176
177[[package]]
178name = "atomic-waker"
179version = "1.1.2"
180source = "registry+https://github.com/rust-lang/crates.io-index"
181checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
182
183[[package]]
184name = "autocfg"
185version = "1.5.0"
186source = "registry+https://github.com/rust-lang/crates.io-index"
187checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
188
189[[package]]
190name = "aws-lc-rs"
191version = "1.15.1"
192source = "registry+https://github.com/rust-lang/crates.io-index"
193checksum = "6b5ce75405893cd713f9ab8e297d8e438f624dde7d706108285f7e17a25a180f"
194dependencies = [
195 "aws-lc-sys",
196 "zeroize",
197]
198
199[[package]]
200name = "aws-lc-sys"
201version = "0.34.0"
202source = "registry+https://github.com/rust-lang/crates.io-index"
203checksum = "179c3777a8b5e70e90ea426114ffc565b2c1a9f82f6c4a0c5a34aa6ef5e781b6"
204dependencies = [
205 "cc",
206 "cmake",
207 "dunce",
208 "fs_extra",
209]
210
211[[package]]
212name = "aya"
213version = "0.12.0"
214source = "registry+https://github.com/rust-lang/crates.io-index"
215checksum = "90eea657cc8028447cbda5068f4e10c4fadba0131624f4f7dd1a9c46ffc8d81f"
216dependencies = [
217 "assert_matches",
218 "aya-obj",
219 "bitflags",
220 "bytes",
221 "lazy_static",
222 "libc",
223 "log",
224 "object",
225 "thiserror 1.0.69",
226]
227
228[[package]]
229name = "aya-ebpf"
230version = "0.1.1"
231source = "registry+https://github.com/rust-lang/crates.io-index"
232checksum = "d8dbaf5409a1a0982e5c9bdc0f499a55fe5ead39fe9c846012053faf0d404f73"
233dependencies = [
234 "aya-ebpf-bindings",
235 "aya-ebpf-cty",
236 "aya-ebpf-macros",
237 "rustversion",
238]
239
240[[package]]
241name = "aya-ebpf-bindings"
242version = "0.1.1"
243source = "registry+https://github.com/rust-lang/crates.io-index"
244checksum = "783dc1a82a3d71d83286165381dcc1b1d41643f4b110733d135547527c000a9a"
245dependencies = [
246 "aya-ebpf-cty",
247]
248
249[[package]]
250name = "aya-ebpf-cty"
251version = "0.2.2"
252source = "registry+https://github.com/rust-lang/crates.io-index"
253checksum = "2cce099aaf3abb89f9a1f8594ffe07fa53738ebc2882fac624d10d9ba31a1b10"
254
255[[package]]
256name = "aya-ebpf-macros"
257version = "0.1.1"
258source = "registry+https://github.com/rust-lang/crates.io-index"
259checksum = "72f47f7b4a75eb5f1d7ba0fb5628d247b1cf20388658899177875dabdda66865"
260dependencies = [
261 "proc-macro-error",
262 "proc-macro2",
263 "quote",
264 "syn 2.0.106",
265]
266
267[[package]]
268name = "aya-obj"
269version = "0.1.0"
270source = "registry+https://github.com/rust-lang/crates.io-index"
271checksum = "2c02024a307161cf3d1f052161958fd13b1a33e3e038083e58082c0700fdab85"
272dependencies = [
273 "bytes",
274 "core-error",
275 "hashbrown 0.14.5",
276 "log",
277 "object",
278 "thiserror 1.0.69",
279]
280
281[[package]]
282name = "backon"
283version = "1.6.0"
284source = "registry+https://github.com/rust-lang/crates.io-index"
285checksum = "cffb0e931875b666fc4fcb20fee52e9bbd1ef836fd9e9e04ec21555f9f85f7ef"
286dependencies = [
287 "fastrand",
288 "gloo-timers",
289 "tokio",
290]
291
292[[package]]
293name = "base64"
294version = "0.22.1"
295source = "registry+https://github.com/rust-lang/crates.io-index"
296checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
297
298[[package]]
299name = "bitflags"
300version = "2.9.4"
301source = "registry+https://github.com/rust-lang/crates.io-index"
302checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394"
303
304[[package]]
305name = "block-buffer"
306version = "0.10.4"
307source = "registry+https://github.com/rust-lang/crates.io-index"
308checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
309dependencies = [
310 "generic-array",
311]
312
313[[package]]
314name = "bumpalo"
315version = "3.19.0"
316source = "registry+https://github.com/rust-lang/crates.io-index"
317checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
318
319[[package]]
320name = "bytes"
321version = "1.10.1"
322source = "registry+https://github.com/rust-lang/crates.io-index"
323checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
324
325[[package]]
326name = "cc"
327version = "1.2.49"
328source = "registry+https://github.com/rust-lang/crates.io-index"
329checksum = "90583009037521a116abf44494efecd645ba48b6622457080f080b85544e2215"
330dependencies = [
331 "find-msvc-tools",
332 "jobserver",
333 "libc",
334 "shlex",
335]
336
337[[package]]
338name = "cfg-if"
339version = "1.0.4"
340source = "registry+https://github.com/rust-lang/crates.io-index"
341checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
342
343[[package]]
344name = "chrono"
345version = "0.4.42"
346source = "registry+https://github.com/rust-lang/crates.io-index"
347checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2"
348dependencies = [
349 "iana-time-zone",
350 "js-sys",
351 "num-traits",
352 "serde",
353 "wasm-bindgen",
354 "windows-link",
355]
356
357[[package]]
358name = "cmake"
359version = "0.1.54"
360source = "registry+https://github.com/rust-lang/crates.io-index"
361checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0"
362dependencies = [
363 "cc",
364]
365
366[[package]]
367name = "colorchoice"
368version = "1.0.4"
369source = "registry+https://github.com/rust-lang/crates.io-index"
370checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
371
372[[package]]
373name = "concurrent-queue"
374version = "2.5.0"
375source = "registry+https://github.com/rust-lang/crates.io-index"
376checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973"
377dependencies = [
378 "crossbeam-utils",
379]
380
381[[package]]
382name = "core-error"
383version = "0.0.0"
384source = "registry+https://github.com/rust-lang/crates.io-index"
385checksum = "efcdb2972eb64230b4c50646d8498ff73f5128d196a90c7236eec4cbe8619b8f"
386dependencies = [
387 "version_check",
388]
389
390[[package]]
391name = "core-foundation"
392version = "0.10.1"
393source = "registry+https://github.com/rust-lang/crates.io-index"
394checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6"
395dependencies = [
396 "core-foundation-sys",
397 "libc",
398]
399
400[[package]]
401name = "core-foundation-sys"
402version = "0.8.7"
403source = "registry+https://github.com/rust-lang/crates.io-index"
404checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
405
406[[package]]
407name = "cpufeatures"
408version = "0.2.17"
409source = "registry+https://github.com/rust-lang/crates.io-index"
410checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
411dependencies = [
412 "libc",
413]
414
415[[package]]
416name = "crossbeam-utils"
417version = "0.8.21"
418source = "registry+https://github.com/rust-lang/crates.io-index"
419checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
420
421[[package]]
422name = "crypto-common"
423version = "0.1.7"
424source = "registry+https://github.com/rust-lang/crates.io-index"
425checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
426dependencies = [
427 "generic-array",
428 "typenum",
429]
430
431[[package]]
432name = "darling"
433version = "0.21.3"
434source = "registry+https://github.com/rust-lang/crates.io-index"
435checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0"
436dependencies = [
437 "darling_core",
438 "darling_macro",
439]
440
441[[package]]
442name = "darling_core"
443version = "0.21.3"
444source = "registry+https://github.com/rust-lang/crates.io-index"
445checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4"
446dependencies = [
447 "fnv",
448 "ident_case",
449 "proc-macro2",
450 "quote",
451 "strsim",
452 "syn 2.0.106",
453]
454
455[[package]]
456name = "darling_macro"
457version = "0.21.3"
458source = "registry+https://github.com/rust-lang/crates.io-index"
459checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81"
460dependencies = [
461 "darling_core",
462 "quote",
463 "syn 2.0.106",
464]
465
466[[package]]
467name = "data-encoding"
468version = "2.9.0"
469source = "registry+https://github.com/rust-lang/crates.io-index"
470checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476"
471
472[[package]]
473name = "der-parser"
474version = "10.0.0"
475source = "registry+https://github.com/rust-lang/crates.io-index"
476checksum = "07da5016415d5a3c4dd39b11ed26f915f52fc4e0dc197d87908bc916e51bc1a6"
477dependencies = [
478 "asn1-rs",
479 "displaydoc",
480 "nom",
481 "num-bigint",
482 "num-traits",
483 "rusticata-macros",
484]
485
486[[package]]
487name = "deranged"
488version = "0.5.5"
489source = "registry+https://github.com/rust-lang/crates.io-index"
490checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587"
491dependencies = [
492 "powerfmt",
493]
494
495[[package]]
496name = "derive_more"
497version = "2.1.0"
498source = "registry+https://github.com/rust-lang/crates.io-index"
499checksum = "10b768e943bed7bf2cab53df09f4bc34bfd217cdb57d971e769874c9a6710618"
500dependencies = [
501 "derive_more-impl",
502]
503
504[[package]]
505name = "derive_more-impl"
506version = "2.1.0"
507source = "registry+https://github.com/rust-lang/crates.io-index"
508checksum = "6d286bfdaf75e988b4a78e013ecd79c581e06399ab53fbacd2d916c2f904f30b"
509dependencies = [
510 "proc-macro2",
511 "quote",
512 "rustc_version",
513 "syn 2.0.106",
514]
515
516[[package]]
517name = "digest"
518version = "0.10.7"
519source = "registry+https://github.com/rust-lang/crates.io-index"
520checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
521dependencies = [
522 "block-buffer",
523 "crypto-common",
524]
525
526[[package]]
527name = "displaydoc"
528version = "0.2.5"
529source = "registry+https://github.com/rust-lang/crates.io-index"
530checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
531dependencies = [
532 "proc-macro2",
533 "quote",
534 "syn 2.0.106",
535]
536
537[[package]]
538name = "dunce"
539version = "1.0.5"
540source = "registry+https://github.com/rust-lang/crates.io-index"
541checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
542
543[[package]]
544name = "dyn-clone"
545version = "1.0.20"
546source = "registry+https://github.com/rust-lang/crates.io-index"
547checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
548
549[[package]]
550name = "educe"
551version = "0.6.0"
552source = "registry+https://github.com/rust-lang/crates.io-index"
553checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417"
554dependencies = [
555 "enum-ordinalize",
556 "proc-macro2",
557 "quote",
558 "syn 2.0.106",
559]
560
561[[package]]
562name = "either"
563version = "1.15.0"
564source = "registry+https://github.com/rust-lang/crates.io-index"
565checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
566
567[[package]]
568name = "enum-ordinalize"
569version = "4.3.2"
570source = "registry+https://github.com/rust-lang/crates.io-index"
571checksum = "4a1091a7bb1f8f2c4b28f1fe2cef4980ca2d410a3d727d67ecc3178c9b0800f0"
572dependencies = [
573 "enum-ordinalize-derive",
574]
575
576[[package]]
577name = "enum-ordinalize-derive"
578version = "4.3.2"
579source = "registry+https://github.com/rust-lang/crates.io-index"
580checksum = "8ca9601fb2d62598ee17836250842873a413586e5d7ed88b356e38ddbb0ec631"
581dependencies = [
582 "proc-macro2",
583 "quote",
584 "syn 2.0.106",
585]
586
587[[package]]
588name = "env_filter"
589version = "0.1.4"
590source = "registry+https://github.com/rust-lang/crates.io-index"
591checksum = "1bf3c259d255ca70051b30e2e95b5446cdb8949ac4cd22c0d7fd634d89f568e2"
592dependencies = [
593 "log",
594 "regex",
595]
596
597[[package]]
598name = "env_logger"
599version = "0.11.8"
600source = "registry+https://github.com/rust-lang/crates.io-index"
601checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f"
602dependencies = [
603 "anstream",
604 "anstyle",
605 "env_filter",
606 "jiff",
607 "log",
608]
609
610[[package]]
611name = "equivalent"
612version = "1.0.2"
613source = "registry+https://github.com/rust-lang/crates.io-index"
614checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
615
616[[package]]
617name = "event-listener"
618version = "5.4.1"
619source = "registry+https://github.com/rust-lang/crates.io-index"
620checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab"
621dependencies = [
622 "concurrent-queue",
623 "parking",
624 "pin-project-lite",
625]
626
627[[package]]
628name = "event-listener-strategy"
629version = "0.5.4"
630source = "registry+https://github.com/rust-lang/crates.io-index"
631checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93"
632dependencies = [
633 "event-listener",
634 "pin-project-lite",
635]
636
637[[package]]
638name = "fastrand"
639version = "2.3.0"
640source = "registry+https://github.com/rust-lang/crates.io-index"
641checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
642
643[[package]]
644name = "find-msvc-tools"
645version = "0.1.5"
646source = "registry+https://github.com/rust-lang/crates.io-index"
647checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844"
648
649[[package]]
650name = "fnv"
651version = "1.0.7"
652source = "registry+https://github.com/rust-lang/crates.io-index"
653checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
654
655[[package]]
656name = "foldhash"
657version = "0.1.5"
658source = "registry+https://github.com/rust-lang/crates.io-index"
659checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
660
661[[package]]
662name = "form_urlencoded"
663version = "1.2.2"
664source = "registry+https://github.com/rust-lang/crates.io-index"
665checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
666dependencies = [
667 "percent-encoding",
668]
669
670[[package]]
671name = "fs_extra"
672version = "1.3.0"
673source = "registry+https://github.com/rust-lang/crates.io-index"
674checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
675
676[[package]]
677name = "futures"
678version = "0.3.31"
679source = "registry+https://github.com/rust-lang/crates.io-index"
680checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
681dependencies = [
682 "futures-channel",
683 "futures-core",
684 "futures-executor",
685 "futures-io",
686 "futures-sink",
687 "futures-task",
688 "futures-util",
689]
690
691[[package]]
692name = "futures-channel"
693version = "0.3.31"
694source = "registry+https://github.com/rust-lang/crates.io-index"
695checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
696dependencies = [
697 "futures-core",
698 "futures-sink",
699]
700
701[[package]]
702name = "futures-core"
703version = "0.3.31"
704source = "registry+https://github.com/rust-lang/crates.io-index"
705checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
706
707[[package]]
708name = "futures-executor"
709version = "0.3.31"
710source = "registry+https://github.com/rust-lang/crates.io-index"
711checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
712dependencies = [
713 "futures-core",
714 "futures-task",
715 "futures-util",
716]
717
718[[package]]
719name = "futures-io"
720version = "0.3.31"
721source = "registry+https://github.com/rust-lang/crates.io-index"
722checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
723
724[[package]]
725name = "futures-macro"
726version = "0.3.31"
727source = "registry+https://github.com/rust-lang/crates.io-index"
728checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
729dependencies = [
730 "proc-macro2",
731 "quote",
732 "syn 2.0.106",
733]
734
735[[package]]
736name = "futures-sink"
737version = "0.3.31"
738source = "registry+https://github.com/rust-lang/crates.io-index"
739checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
740
741[[package]]
742name = "futures-task"
743version = "0.3.31"
744source = "registry+https://github.com/rust-lang/crates.io-index"
745checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
746
747[[package]]
748name = "futures-util"
749version = "0.3.31"
750source = "registry+https://github.com/rust-lang/crates.io-index"
751checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
752dependencies = [
753 "futures-channel",
754 "futures-core",
755 "futures-io",
756 "futures-macro",
757 "futures-sink",
758 "futures-task",
759 "memchr",
760 "pin-project-lite",
761 "pin-utils",
762 "slab",
763]
764
765[[package]]
766name = "generic-array"
767version = "0.14.7"
768source = "registry+https://github.com/rust-lang/crates.io-index"
769checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
770dependencies = [
771 "typenum",
772 "version_check",
773]
774
775[[package]]
776name = "getrandom"
777version = "0.2.16"
778source = "registry+https://github.com/rust-lang/crates.io-index"
779checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592"
780dependencies = [
781 "cfg-if",
782 "libc",
783 "wasi",
784]
785
786[[package]]
787name = "getrandom"
788version = "0.3.4"
789source = "registry+https://github.com/rust-lang/crates.io-index"
790checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
791dependencies = [
792 "cfg-if",
793 "libc",
794 "r-efi",
795 "wasip2",
796]
797
798[[package]]
799name = "gloo-timers"
800version = "0.3.0"
801source = "registry+https://github.com/rust-lang/crates.io-index"
802checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994"
803dependencies = [
804 "futures-channel",
805 "futures-core",
806 "js-sys",
807 "wasm-bindgen",
808]
809
810[[package]]
811name = "hashbrown"
812version = "0.14.5"
813source = "registry+https://github.com/rust-lang/crates.io-index"
814checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
815dependencies = [
816 "ahash",
817 "allocator-api2",
818]
819
820[[package]]
821name = "hashbrown"
822version = "0.15.5"
823source = "registry+https://github.com/rust-lang/crates.io-index"
824checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
825dependencies = [
826 "allocator-api2",
827 "equivalent",
828 "foldhash",
829]
830
831[[package]]
832name = "hashbrown"
833version = "0.16.1"
834source = "registry+https://github.com/rust-lang/crates.io-index"
835checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
836
837[[package]]
838name = "hex"
839version = "0.4.3"
840source = "registry+https://github.com/rust-lang/crates.io-index"
841checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
842
843[[package]]
844name = "home"
845version = "0.5.12"
846source = "registry+https://github.com/rust-lang/crates.io-index"
847checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d"
848dependencies = [
849 "windows-sys 0.61.2",
850]
851
852[[package]]
853name = "hostname"
854version = "0.4.2"
855source = "registry+https://github.com/rust-lang/crates.io-index"
856checksum = "617aaa3557aef3810a6369d0a99fac8a080891b68bd9f9812a1eeda0c0730cbd"
857dependencies = [
858 "cfg-if",
859 "libc",
860 "windows-link",
861]
862
863[[package]]
864name = "http"
865version = "1.4.0"
866source = "registry+https://github.com/rust-lang/crates.io-index"
867checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a"
868dependencies = [
869 "bytes",
870 "itoa",
871]
872
873[[package]]
874name = "http-body"
875version = "1.0.1"
876source = "registry+https://github.com/rust-lang/crates.io-index"
877checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
878dependencies = [
879 "bytes",
880 "http",
881]
882
883[[package]]
884name = "http-body-util"
885version = "0.1.3"
886source = "registry+https://github.com/rust-lang/crates.io-index"
887checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a"
888dependencies = [
889 "bytes",
890 "futures-core",
891 "http",
892 "http-body",
893 "pin-project-lite",
894]
895
896[[package]]
897name = "httparse"
898version = "1.10.1"
899source = "registry+https://github.com/rust-lang/crates.io-index"
900checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
901
902[[package]]
903name = "hyper"
904version = "1.8.1"
905source = "registry+https://github.com/rust-lang/crates.io-index"
906checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11"
907dependencies = [
908 "atomic-waker",
909 "bytes",
910 "futures-channel",
911 "futures-core",
912 "http",
913 "http-body",
914 "httparse",
915 "itoa",
916 "pin-project-lite",
917 "pin-utils",
918 "smallvec",
919 "tokio",
920 "want",
921]
922
923[[package]]
924name = "hyper-rustls"
925version = "0.27.7"
926source = "registry+https://github.com/rust-lang/crates.io-index"
927checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58"
928dependencies = [
929 "http",
930 "hyper",
931 "hyper-util",
932 "log",
933 "rustls",
934 "rustls-native-certs",
935 "rustls-pki-types",
936 "tokio",
937 "tokio-rustls",
938 "tower-service",
939]
940
941[[package]]
942name = "hyper-timeout"
943version = "0.5.2"
944source = "registry+https://github.com/rust-lang/crates.io-index"
945checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0"
946dependencies = [
947 "hyper",
948 "hyper-util",
949 "pin-project-lite",
950 "tokio",
951 "tower-service",
952]
953
954[[package]]
955name = "hyper-util"
956version = "0.1.19"
957source = "registry+https://github.com/rust-lang/crates.io-index"
958checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f"
959dependencies = [
960 "bytes",
961 "futures-channel",
962 "futures-core",
963 "futures-util",
964 "http",
965 "http-body",
966 "hyper",
967 "libc",
968 "pin-project-lite",
969 "socket2",
970 "tokio",
971 "tower-service",
972 "tracing",
973]
974
975[[package]]
976name = "iana-time-zone"
977version = "0.1.64"
978source = "registry+https://github.com/rust-lang/crates.io-index"
979checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb"
980dependencies = [
981 "android_system_properties",
982 "core-foundation-sys",
983 "iana-time-zone-haiku",
984 "js-sys",
985 "log",
986 "wasm-bindgen",
987 "windows-core",
988]
989
990[[package]]
991name = "iana-time-zone-haiku"
992version = "0.1.2"
993source = "registry+https://github.com/rust-lang/crates.io-index"
994checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
995dependencies = [
996 "cc",
997]
998
999[[package]]
1000name = "ident_case"
1001version = "1.0.1"
1002source = "registry+https://github.com/rust-lang/crates.io-index"
1003checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
1004
1005[[package]]
1006name = "indexmap"
1007version = "2.12.1"
1008source = "registry+https://github.com/rust-lang/crates.io-index"
1009checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2"
1010dependencies = [
1011 "equivalent",
1012 "hashbrown 0.16.1",
1013]
1014
1015[[package]]
1016name = "is_terminal_polyfill"
1017version = "1.70.2"
1018source = "registry+https://github.com/rust-lang/crates.io-index"
1019checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
1020
1021[[package]]
1022name = "itoa"
1023version = "1.0.15"
1024source = "registry+https://github.com/rust-lang/crates.io-index"
1025checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
1026
1027[[package]]
1028name = "jiff"
1029version = "0.2.16"
1030source = "registry+https://github.com/rust-lang/crates.io-index"
1031checksum = "49cce2b81f2098e7e3efc35bc2e0a6b7abec9d34128283d7a26fa8f32a6dbb35"
1032dependencies = [
1033 "jiff-static",
1034 "log",
1035 "portable-atomic",
1036 "portable-atomic-util",
1037 "serde_core",
1038]
1039
1040[[package]]
1041name = "jiff-static"
1042version = "0.2.16"
1043source = "registry+https://github.com/rust-lang/crates.io-index"
1044checksum = "980af8b43c3ad5d8d349ace167ec8170839f753a42d233ba19e08afe1850fa69"
1045dependencies = [
1046 "proc-macro2",
1047 "quote",
1048 "syn 2.0.106",
1049]
1050
1051[[package]]
1052name = "jobserver"
1053version = "0.1.34"
1054source = "registry+https://github.com/rust-lang/crates.io-index"
1055checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33"
1056dependencies = [
1057 "getrandom 0.3.4",
1058 "libc",
1059]
1060
1061[[package]]
1062name = "js-sys"
1063version = "0.3.83"
1064source = "registry+https://github.com/rust-lang/crates.io-index"
1065checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8"
1066dependencies = [
1067 "once_cell",
1068 "wasm-bindgen",
1069]
1070
1071[[package]]
1072name = "json-patch"
1073version = "4.1.0"
1074source = "registry+https://github.com/rust-lang/crates.io-index"
1075checksum = "f300e415e2134745ef75f04562dd0145405c2f7fd92065db029ac4b16b57fe90"
1076dependencies = [
1077 "jsonptr",
1078 "serde",
1079 "serde_json",
1080 "thiserror 1.0.69",
1081]
1082
1083[[package]]
1084name = "jsonpath-rust"
1085version = "0.7.5"
1086source = "registry+https://github.com/rust-lang/crates.io-index"
1087checksum = "0c00ae348f9f8fd2d09f82a98ca381c60df9e0820d8d79fce43e649b4dc3128b"
1088dependencies = [
1089 "pest",
1090 "pest_derive",
1091 "regex",
1092 "serde_json",
1093 "thiserror 2.0.17",
1094]
1095
1096[[package]]
1097name = "jsonptr"
1098version = "0.7.1"
1099source = "registry+https://github.com/rust-lang/crates.io-index"
1100checksum = "a5a3cc660ba5d72bce0b3bb295bf20847ccbb40fd423f3f05b61273672e561fe"
1101dependencies = [
1102 "serde",
1103 "serde_json",
1104]
1105
1106[[package]]
1107name = "k8s-openapi"
1108version = "0.26.1"
1109source = "registry+https://github.com/rust-lang/crates.io-index"
1110checksum = "06d9e5e61dd037cdc51da0d7e2b2be10f497478ea7e120d85dad632adb99882b"
1111dependencies = [
1112 "base64",
1113 "chrono",
1114 "serde",
1115 "serde_json",
1116]
1117
1118[[package]]
1119name = "kube"
1120version = "2.0.1"
1121source = "registry+https://github.com/rust-lang/crates.io-index"
1122checksum = "48e7bb0b6a46502cc20e4575b6ff401af45cfea150b34ba272a3410b78aa014e"
1123dependencies = [
1124 "k8s-openapi",
1125 "kube-client",
1126 "kube-core",
1127 "kube-derive",
1128 "kube-runtime",
1129]
1130
1131[[package]]
1132name = "kube-client"
1133version = "2.0.1"
1134source = "registry+https://github.com/rust-lang/crates.io-index"
1135checksum = "4987d57a184d2b5294fdad3d7fc7f278899469d21a4da39a8f6ca16426567a36"
1136dependencies = [
1137 "base64",
1138 "bytes",
1139 "chrono",
1140 "either",
1141 "futures",
1142 "home",
1143 "http",
1144 "http-body",
1145 "http-body-util",
1146 "hyper",
1147 "hyper-rustls",
1148 "hyper-timeout",
1149 "hyper-util",
1150 "jsonpath-rust",
1151 "k8s-openapi",
1152 "kube-core",
1153 "pem",
1154 "rustls",
1155 "secrecy",
1156 "serde",
1157 "serde_json",
1158 "serde_yaml",
1159 "thiserror 2.0.17",
1160 "tokio",
1161 "tokio-util",
1162 "tower",
1163 "tower-http",
1164 "tracing",
1165]
1166
1167[[package]]
1168name = "kube-core"
1169version = "2.0.1"
1170source = "registry+https://github.com/rust-lang/crates.io-index"
1171checksum = "914bbb770e7bb721a06e3538c0edd2babed46447d128f7c21caa68747060ee73"
1172dependencies = [
1173 "chrono",
1174 "derive_more",
1175 "form_urlencoded",
1176 "http",
1177 "json-patch",
1178 "k8s-openapi",
1179 "schemars",
1180 "serde",
1181 "serde-value",
1182 "serde_json",
1183 "thiserror 2.0.17",
1184]
1185
1186[[package]]
1187name = "kube-derive"
1188version = "2.0.1"
1189source = "registry+https://github.com/rust-lang/crates.io-index"
1190checksum = "03dee8252be137772a6ab3508b81cd797dee62ee771112a2453bc85cbbe150d2"
1191dependencies = [
1192 "darling",
1193 "proc-macro2",
1194 "quote",
1195 "serde",
1196 "serde_json",
1197 "syn 2.0.106",
1198]
1199
1200[[package]]
1201name = "kube-runtime"
1202version = "2.0.1"
1203source = "registry+https://github.com/rust-lang/crates.io-index"
1204checksum = "6aea4de4b562c5cc89ab10300bb63474ae1fa57ff5a19275f2e26401a323e3fd"
1205dependencies = [
1206 "ahash",
1207 "async-broadcast",
1208 "async-stream",
1209 "backon",
1210 "educe",
1211 "futures",
1212 "hashbrown 0.15.5",
1213 "hostname",
1214 "json-patch",
1215 "k8s-openapi",
1216 "kube-client",
1217 "parking_lot",
1218 "pin-project",
1219 "serde",
1220 "serde_json",
1221 "thiserror 2.0.17",
1222 "tokio",
1223 "tokio-util",
1224 "tracing",
1225]
1226
1227[[package]]
1228name = "lazy_static"
1229version = "1.5.0"
1230source = "registry+https://github.com/rust-lang/crates.io-index"
1231checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
1232
1233[[package]]
1234name = "libc"
1235version = "0.2.178"
1236source = "registry+https://github.com/rust-lang/crates.io-index"
1237checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091"
1238
1239[[package]]
1240name = "lock_api"
1241version = "0.4.14"
1242source = "registry+https://github.com/rust-lang/crates.io-index"
1243checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
1244dependencies = [
1245 "scopeguard",
1246]
1247
1248[[package]]
1249name = "log"
1250version = "0.4.28"
1251source = "registry+https://github.com/rust-lang/crates.io-index"
1252checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
1253
1254[[package]]
1255name = "memchr"
1256version = "2.7.6"
1257source = "registry+https://github.com/rust-lang/crates.io-index"
1258checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
1259
1260[[package]]
1261name = "memoffset"
1262version = "0.9.1"
1263source = "registry+https://github.com/rust-lang/crates.io-index"
1264checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
1265dependencies = [
1266 "autocfg",
1267]
1268
1269[[package]]
1270name = "mime"
1271version = "0.3.17"
1272source = "registry+https://github.com/rust-lang/crates.io-index"
1273checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
1274
1275[[package]]
1276name = "minimal-lexical"
1277version = "0.2.1"
1278source = "registry+https://github.com/rust-lang/crates.io-index"
1279checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
1280
1281[[package]]
1282name = "mio"
1283version = "1.1.1"
1284source = "registry+https://github.com/rust-lang/crates.io-index"
1285checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc"
1286dependencies = [
1287 "libc",
1288 "wasi",
1289 "windows-sys 0.61.2",
1290]
1291
1292[[package]]
1293name = "network-types"
1294version = "0.1.0"
1295source = "registry+https://github.com/rust-lang/crates.io-index"
1296checksum = "f06f1863cb5565864300c6bfb012312969908878d2ca5881eaf0bbdb8b519c23"
1297dependencies = [
1298 "memoffset",
1299]
1300
1301[[package]]
1302name = "nom"
1303version = "7.1.3"
1304source = "registry+https://github.com/rust-lang/crates.io-index"
1305checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
1306dependencies = [
1307 "memchr",
1308 "minimal-lexical",
1309]
1310
1311[[package]]
1312name = "nom-derive"
1313version = "0.10.1"
1314source = "registry+https://github.com/rust-lang/crates.io-index"
1315checksum = "1ff943d68b88d0b87a6e0d58615e8fa07f9fd5a1319fa0a72efc1f62275c79a7"
1316dependencies = [
1317 "nom",
1318 "nom-derive-impl",
1319 "rustversion",
1320]
1321
1322[[package]]
1323name = "nom-derive-impl"
1324version = "0.10.1"
1325source = "registry+https://github.com/rust-lang/crates.io-index"
1326checksum = "cd0b9a93a84b0d3ec3e70e02d332dc33ac6dfac9cde63e17fcb77172dededa62"
1327dependencies = [
1328 "proc-macro2",
1329 "quote",
1330 "syn 1.0.109",
1331]
1332
1333[[package]]
1334name = "num-bigint"
1335version = "0.4.6"
1336source = "registry+https://github.com/rust-lang/crates.io-index"
1337checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
1338dependencies = [
1339 "num-integer",
1340 "num-traits",
1341]
1342
1343[[package]]
1344name = "num-conv"
1345version = "0.1.0"
1346source = "registry+https://github.com/rust-lang/crates.io-index"
1347checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
1348
1349[[package]]
1350name = "num-integer"
1351version = "0.1.46"
1352source = "registry+https://github.com/rust-lang/crates.io-index"
1353checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
1354dependencies = [
1355 "num-traits",
1356]
1357
1358[[package]]
1359name = "num-traits"
1360version = "0.2.19"
1361source = "registry+https://github.com/rust-lang/crates.io-index"
1362checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
1363dependencies = [
1364 "autocfg",
1365]
1366
1367[[package]]
1368name = "num_enum"
1369version = "0.7.5"
1370source = "registry+https://github.com/rust-lang/crates.io-index"
1371checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c"
1372dependencies = [
1373 "num_enum_derive",
1374 "rustversion",
1375]
1376
1377[[package]]
1378name = "num_enum_derive"
1379version = "0.7.5"
1380source = "registry+https://github.com/rust-lang/crates.io-index"
1381checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7"
1382dependencies = [
1383 "proc-macro-crate",
1384 "proc-macro2",
1385 "quote",
1386 "syn 2.0.106",
1387]
1388
1389[[package]]
1390name = "object"
1391version = "0.32.2"
1392source = "registry+https://github.com/rust-lang/crates.io-index"
1393checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"
1394dependencies = [
1395 "memchr",
1396]
1397
1398[[package]]
1399name = "oid-registry"
1400version = "0.8.1"
1401source = "registry+https://github.com/rust-lang/crates.io-index"
1402checksum = "12f40cff3dde1b6087cc5d5f5d4d65712f34016a03ed60e9c08dcc392736b5b7"
1403dependencies = [
1404 "asn1-rs",
1405]
1406
1407[[package]]
1408name = "once_cell"
1409version = "1.21.3"
1410source = "registry+https://github.com/rust-lang/crates.io-index"
1411checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
1412
1413[[package]]
1414name = "once_cell_polyfill"
1415version = "1.70.2"
1416source = "registry+https://github.com/rust-lang/crates.io-index"
1417checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
1418
1419[[package]]
1420name = "openssl-probe"
1421version = "0.1.6"
1422source = "registry+https://github.com/rust-lang/crates.io-index"
1423checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"
1424
1425[[package]]
1426name = "ordered-float"
1427version = "2.10.1"
1428source = "registry+https://github.com/rust-lang/crates.io-index"
1429checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c"
1430dependencies = [
1431 "num-traits",
1432]
1433
1434[[package]]
1435name = "packet-detector"
1436version = "0.1.0"
1437dependencies = [
1438 "anyhow",
1439 "aya",
1440 "chrono",
1441 "env_logger",
1442 "futures",
1443 "hex",
1444 "k8s-openapi",
1445 "kube",
1446 "log",
1447 "rcgen",
1448 "rustls",
1449 "rustls-pemfile",
1450 "rustls-webpki 0.102.8",
1451 "serde",
1452 "serde_json",
1453 "sha2",
1454 "tls-parser",
1455 "tokio",
1456 "tokio-rustls",
1457 "webpki-roots",
1458 "x509-parser",
1459]
1460
1461[[package]]
1462name = "packet-detector-ebpf"
1463version = "0.1.0"
1464dependencies = [
1465 "aya-ebpf",
1466 "network-types",
1467]
1468
1469[[package]]
1470name = "parking"
1471version = "2.2.1"
1472source = "registry+https://github.com/rust-lang/crates.io-index"
1473checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba"
1474
1475[[package]]
1476name = "parking_lot"
1477version = "0.12.5"
1478source = "registry+https://github.com/rust-lang/crates.io-index"
1479checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
1480dependencies = [
1481 "lock_api",
1482 "parking_lot_core",
1483]
1484
1485[[package]]
1486name = "parking_lot_core"
1487version = "0.9.12"
1488source = "registry+https://github.com/rust-lang/crates.io-index"
1489checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
1490dependencies = [
1491 "cfg-if",
1492 "libc",
1493 "redox_syscall",
1494 "smallvec",
1495 "windows-link",
1496]
1497
1498[[package]]
1499name = "pem"
1500version = "3.0.6"
1501source = "registry+https://github.com/rust-lang/crates.io-index"
1502checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be"
1503dependencies = [
1504 "base64",
1505 "serde_core",
1506]
1507
1508[[package]]
1509name = "percent-encoding"
1510version = "2.3.2"
1511source = "registry+https://github.com/rust-lang/crates.io-index"
1512checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
1513
1514[[package]]
1515name = "pest"
1516version = "2.8.4"
1517source = "registry+https://github.com/rust-lang/crates.io-index"
1518checksum = "cbcfd20a6d4eeba40179f05735784ad32bdaef05ce8e8af05f180d45bb3e7e22"
1519dependencies = [
1520 "memchr",
1521 "ucd-trie",
1522]
1523
1524[[package]]
1525name = "pest_derive"
1526version = "2.8.4"
1527source = "registry+https://github.com/rust-lang/crates.io-index"
1528checksum = "51f72981ade67b1ca6adc26ec221be9f463f2b5839c7508998daa17c23d94d7f"
1529dependencies = [
1530 "pest",
1531 "pest_generator",
1532]
1533
1534[[package]]
1535name = "pest_generator"
1536version = "2.8.4"
1537source = "registry+https://github.com/rust-lang/crates.io-index"
1538checksum = "dee9efd8cdb50d719a80088b76f81aec7c41ed6d522ee750178f83883d271625"
1539dependencies = [
1540 "pest",
1541 "pest_meta",
1542 "proc-macro2",
1543 "quote",
1544 "syn 2.0.106",
1545]
1546
1547[[package]]
1548name = "pest_meta"
1549version = "2.8.4"
1550source = "registry+https://github.com/rust-lang/crates.io-index"
1551checksum = "bf1d70880e76bdc13ba52eafa6239ce793d85c8e43896507e43dd8984ff05b82"
1552dependencies = [
1553 "pest",
1554 "sha2",
1555]
1556
1557[[package]]
1558name = "phf"
1559version = "0.11.3"
1560source = "registry+https://github.com/rust-lang/crates.io-index"
1561checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078"
1562dependencies = [
1563 "phf_shared",
1564]
1565
1566[[package]]
1567name = "phf_codegen"
1568version = "0.11.3"
1569source = "registry+https://github.com/rust-lang/crates.io-index"
1570checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a"
1571dependencies = [
1572 "phf_generator",
1573 "phf_shared",
1574]
1575
1576[[package]]
1577name = "phf_generator"
1578version = "0.11.3"
1579source = "registry+https://github.com/rust-lang/crates.io-index"
1580checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d"
1581dependencies = [
1582 "phf_shared",
1583 "rand",
1584]
1585
1586[[package]]
1587name = "phf_shared"
1588version = "0.11.3"
1589source = "registry+https://github.com/rust-lang/crates.io-index"
1590checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5"
1591dependencies = [
1592 "siphasher",
1593]
1594
1595[[package]]
1596name = "pin-project"
1597version = "1.1.10"
1598source = "registry+https://github.com/rust-lang/crates.io-index"
1599checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a"
1600dependencies = [
1601 "pin-project-internal",
1602]
1603
1604[[package]]
1605name = "pin-project-internal"
1606version = "1.1.10"
1607source = "registry+https://github.com/rust-lang/crates.io-index"
1608checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861"
1609dependencies = [
1610 "proc-macro2",
1611 "quote",
1612 "syn 2.0.106",
1613]
1614
1615[[package]]
1616name = "pin-project-lite"
1617version = "0.2.16"
1618source = "registry+https://github.com/rust-lang/crates.io-index"
1619checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
1620
1621[[package]]
1622name = "pin-utils"
1623version = "0.1.0"
1624source = "registry+https://github.com/rust-lang/crates.io-index"
1625checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
1626
1627[[package]]
1628name = "portable-atomic"
1629version = "1.11.1"
1630source = "registry+https://github.com/rust-lang/crates.io-index"
1631checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
1632
1633[[package]]
1634name = "portable-atomic-util"
1635version = "0.2.4"
1636source = "registry+https://github.com/rust-lang/crates.io-index"
1637checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507"
1638dependencies = [
1639 "portable-atomic",
1640]
1641
1642[[package]]
1643name = "powerfmt"
1644version = "0.2.0"
1645source = "registry+https://github.com/rust-lang/crates.io-index"
1646checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
1647
1648[[package]]
1649name = "proc-macro-crate"
1650version = "3.4.0"
1651source = "registry+https://github.com/rust-lang/crates.io-index"
1652checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983"
1653dependencies = [
1654 "toml_edit",
1655]
1656
1657[[package]]
1658name = "proc-macro-error"
1659version = "1.0.4"
1660source = "registry+https://github.com/rust-lang/crates.io-index"
1661checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
1662dependencies = [
1663 "proc-macro-error-attr",
1664 "proc-macro2",
1665 "quote",
1666 "version_check",
1667]
1668
1669[[package]]
1670name = "proc-macro-error-attr"
1671version = "1.0.4"
1672source = "registry+https://github.com/rust-lang/crates.io-index"
1673checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
1674dependencies = [
1675 "proc-macro2",
1676 "quote",
1677 "version_check",
1678]
1679
1680[[package]]
1681name = "proc-macro2"
1682version = "1.0.101"
1683source = "registry+https://github.com/rust-lang/crates.io-index"
1684checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de"
1685dependencies = [
1686 "unicode-ident",
1687]
1688
1689[[package]]
1690name = "quote"
1691version = "1.0.41"
1692source = "registry+https://github.com/rust-lang/crates.io-index"
1693checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1"
1694dependencies = [
1695 "proc-macro2",
1696]
1697
1698[[package]]
1699name = "r-efi"
1700version = "5.3.0"
1701source = "registry+https://github.com/rust-lang/crates.io-index"
1702checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
1703
1704[[package]]
1705name = "rand"
1706version = "0.8.5"
1707source = "registry+https://github.com/rust-lang/crates.io-index"
1708checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
1709dependencies = [
1710 "rand_core",
1711]
1712
1713[[package]]
1714name = "rand_core"
1715version = "0.6.4"
1716source = "registry+https://github.com/rust-lang/crates.io-index"
1717checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
1718
1719[[package]]
1720name = "rcgen"
1721version = "0.14.5"
1722source = "registry+https://github.com/rust-lang/crates.io-index"
1723checksum = "5fae430c6b28f1ad601274e78b7dffa0546de0b73b4cd32f46723c0c2a16f7a5"
1724dependencies = [
1725 "pem",
1726 "ring",
1727 "rustls-pki-types",
1728 "time",
1729 "x509-parser",
1730 "yasna",
1731]
1732
1733[[package]]
1734name = "redox_syscall"
1735version = "0.5.18"
1736source = "registry+https://github.com/rust-lang/crates.io-index"
1737checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
1738dependencies = [
1739 "bitflags",
1740]
1741
1742[[package]]
1743name = "ref-cast"
1744version = "1.0.25"
1745source = "registry+https://github.com/rust-lang/crates.io-index"
1746checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d"
1747dependencies = [
1748 "ref-cast-impl",
1749]
1750
1751[[package]]
1752name = "ref-cast-impl"
1753version = "1.0.25"
1754source = "registry+https://github.com/rust-lang/crates.io-index"
1755checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da"
1756dependencies = [
1757 "proc-macro2",
1758 "quote",
1759 "syn 2.0.106",
1760]
1761
1762[[package]]
1763name = "regex"
1764version = "1.12.2"
1765source = "registry+https://github.com/rust-lang/crates.io-index"
1766checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4"
1767dependencies = [
1768 "aho-corasick",
1769 "memchr",
1770 "regex-automata",
1771 "regex-syntax",
1772]
1773
1774[[package]]
1775name = "regex-automata"
1776version = "0.4.13"
1777source = "registry+https://github.com/rust-lang/crates.io-index"
1778checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c"
1779dependencies = [
1780 "aho-corasick",
1781 "memchr",
1782 "regex-syntax",
1783]
1784
1785[[package]]
1786name = "regex-syntax"
1787version = "0.8.8"
1788source = "registry+https://github.com/rust-lang/crates.io-index"
1789checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58"
1790
1791[[package]]
1792name = "ring"
1793version = "0.17.14"
1794source = "registry+https://github.com/rust-lang/crates.io-index"
1795checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
1796dependencies = [
1797 "cc",
1798 "cfg-if",
1799 "getrandom 0.2.16",
1800 "libc",
1801 "untrusted",
1802 "windows-sys 0.52.0",
1803]
1804
1805[[package]]
1806name = "rustc_version"
1807version = "0.4.1"
1808source = "registry+https://github.com/rust-lang/crates.io-index"
1809checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
1810dependencies = [
1811 "semver",
1812]
1813
1814[[package]]
1815name = "rusticata-macros"
1816version = "4.1.0"
1817source = "registry+https://github.com/rust-lang/crates.io-index"
1818checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632"
1819dependencies = [
1820 "nom",
1821]
1822
1823[[package]]
1824name = "rustls"
1825version = "0.23.35"
1826source = "registry+https://github.com/rust-lang/crates.io-index"
1827checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f"
1828dependencies = [
1829 "aws-lc-rs",
1830 "log",
1831 "once_cell",
1832 "ring",
1833 "rustls-pki-types",
1834 "rustls-webpki 0.103.8",
1835 "subtle",
1836 "zeroize",
1837]
1838
1839[[package]]
1840name = "rustls-native-certs"
1841version = "0.8.2"
1842source = "registry+https://github.com/rust-lang/crates.io-index"
1843checksum = "9980d917ebb0c0536119ba501e90834767bffc3d60641457fd84a1f3fd337923"
1844dependencies = [
1845 "openssl-probe",
1846 "rustls-pki-types",
1847 "schannel",
1848 "security-framework",
1849]
1850
1851[[package]]
1852name = "rustls-pemfile"
1853version = "2.2.0"
1854source = "registry+https://github.com/rust-lang/crates.io-index"
1855checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50"
1856dependencies = [
1857 "rustls-pki-types",
1858]
1859
1860[[package]]
1861name = "rustls-pki-types"
1862version = "1.13.1"
1863source = "registry+https://github.com/rust-lang/crates.io-index"
1864checksum = "708c0f9d5f54ba0272468c1d306a52c495b31fa155e91bc25371e6df7996908c"
1865dependencies = [
1866 "zeroize",
1867]
1868
1869[[package]]
1870name = "rustls-webpki"
1871version = "0.102.8"
1872source = "registry+https://github.com/rust-lang/crates.io-index"
1873checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9"
1874dependencies = [
1875 "ring",
1876 "rustls-pki-types",
1877 "untrusted",
1878]
1879
1880[[package]]
1881name = "rustls-webpki"
1882version = "0.103.8"
1883source = "registry+https://github.com/rust-lang/crates.io-index"
1884checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52"
1885dependencies = [
1886 "aws-lc-rs",
1887 "ring",
1888 "rustls-pki-types",
1889 "untrusted",
1890]
1891
1892[[package]]
1893name = "rustversion"
1894version = "1.0.22"
1895source = "registry+https://github.com/rust-lang/crates.io-index"
1896checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
1897
1898[[package]]
1899name = "ryu"
1900version = "1.0.20"
1901source = "registry+https://github.com/rust-lang/crates.io-index"
1902checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
1903
1904[[package]]
1905name = "schannel"
1906version = "0.1.28"
1907source = "registry+https://github.com/rust-lang/crates.io-index"
1908checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1"
1909dependencies = [
1910 "windows-sys 0.61.2",
1911]
1912
1913[[package]]
1914name = "schemars"
1915version = "1.1.0"
1916source = "registry+https://github.com/rust-lang/crates.io-index"
1917checksum = "9558e172d4e8533736ba97870c4b2cd63f84b382a3d6eb063da41b91cce17289"
1918dependencies = [
1919 "dyn-clone",
1920 "ref-cast",
1921 "schemars_derive",
1922 "serde",
1923 "serde_json",
1924]
1925
1926[[package]]
1927name = "schemars_derive"
1928version = "1.1.0"
1929source = "registry+https://github.com/rust-lang/crates.io-index"
1930checksum = "301858a4023d78debd2353c7426dc486001bddc91ae31a76fb1f55132f7e2633"
1931dependencies = [
1932 "proc-macro2",
1933 "quote",
1934 "serde_derive_internals",
1935 "syn 2.0.106",
1936]
1937
1938[[package]]
1939name = "scopeguard"
1940version = "1.2.0"
1941source = "registry+https://github.com/rust-lang/crates.io-index"
1942checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
1943
1944[[package]]
1945name = "secrecy"
1946version = "0.10.3"
1947source = "registry+https://github.com/rust-lang/crates.io-index"
1948checksum = "e891af845473308773346dc847b2c23ee78fe442e0472ac50e22a18a93d3ae5a"
1949dependencies = [
1950 "zeroize",
1951]
1952
1953[[package]]
1954name = "security-framework"
1955version = "3.5.1"
1956source = "registry+https://github.com/rust-lang/crates.io-index"
1957checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef"
1958dependencies = [
1959 "bitflags",
1960 "core-foundation",
1961 "core-foundation-sys",
1962 "libc",
1963 "security-framework-sys",
1964]
1965
1966[[package]]
1967name = "security-framework-sys"
1968version = "2.15.0"
1969source = "registry+https://github.com/rust-lang/crates.io-index"
1970checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0"
1971dependencies = [
1972 "core-foundation-sys",
1973 "libc",
1974]
1975
1976[[package]]
1977name = "semver"
1978version = "1.0.27"
1979source = "registry+https://github.com/rust-lang/crates.io-index"
1980checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
1981
1982[[package]]
1983name = "serde"
1984version = "1.0.228"
1985source = "registry+https://github.com/rust-lang/crates.io-index"
1986checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
1987dependencies = [
1988 "serde_core",
1989 "serde_derive",
1990]
1991
1992[[package]]
1993name = "serde-value"
1994version = "0.7.0"
1995source = "registry+https://github.com/rust-lang/crates.io-index"
1996checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c"
1997dependencies = [
1998 "ordered-float",
1999 "serde",
2000]
2001
2002[[package]]
2003name = "serde_core"
2004version = "1.0.228"
2005source = "registry+https://github.com/rust-lang/crates.io-index"
2006checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
2007dependencies = [
2008 "serde_derive",
2009]
2010
2011[[package]]
2012name = "serde_derive"
2013version = "1.0.228"
2014source = "registry+https://github.com/rust-lang/crates.io-index"
2015checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
2016dependencies = [
2017 "proc-macro2",
2018 "quote",
2019 "syn 2.0.106",
2020]
2021
2022[[package]]
2023name = "serde_derive_internals"
2024version = "0.29.1"
2025source = "registry+https://github.com/rust-lang/crates.io-index"
2026checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
2027dependencies = [
2028 "proc-macro2",
2029 "quote",
2030 "syn 2.0.106",
2031]
2032
2033[[package]]
2034name = "serde_json"
2035version = "1.0.145"
2036source = "registry+https://github.com/rust-lang/crates.io-index"
2037checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
2038dependencies = [
2039 "itoa",
2040 "memchr",
2041 "ryu",
2042 "serde",
2043 "serde_core",
2044]
2045
2046[[package]]
2047name = "serde_yaml"
2048version = "0.9.34+deprecated"
2049source = "registry+https://github.com/rust-lang/crates.io-index"
2050checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
2051dependencies = [
2052 "indexmap",
2053 "itoa",
2054 "ryu",
2055 "serde",
2056 "unsafe-libyaml",
2057]
2058
2059[[package]]
2060name = "sha2"
2061version = "0.10.9"
2062source = "registry+https://github.com/rust-lang/crates.io-index"
2063checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
2064dependencies = [
2065 "cfg-if",
2066 "cpufeatures",
2067 "digest",
2068]
2069
2070[[package]]
2071name = "shlex"
2072version = "1.3.0"
2073source = "registry+https://github.com/rust-lang/crates.io-index"
2074checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
2075
2076[[package]]
2077name = "signal-hook-registry"
2078version = "1.4.7"
2079source = "registry+https://github.com/rust-lang/crates.io-index"
2080checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad"
2081dependencies = [
2082 "libc",
2083]
2084
2085[[package]]
2086name = "siphasher"
2087version = "1.0.1"
2088source = "registry+https://github.com/rust-lang/crates.io-index"
2089checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
2090
2091[[package]]
2092name = "slab"
2093version = "0.4.11"
2094source = "registry+https://github.com/rust-lang/crates.io-index"
2095checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589"
2096
2097[[package]]
2098name = "smallvec"
2099version = "1.15.1"
2100source = "registry+https://github.com/rust-lang/crates.io-index"
2101checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
2102
2103[[package]]
2104name = "socket2"
2105version = "0.6.1"
2106source = "registry+https://github.com/rust-lang/crates.io-index"
2107checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881"
2108dependencies = [
2109 "libc",
2110 "windows-sys 0.60.2",
2111]
2112
2113[[package]]
2114name = "strsim"
2115version = "0.11.1"
2116source = "registry+https://github.com/rust-lang/crates.io-index"
2117checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
2118
2119[[package]]
2120name = "subtle"
2121version = "2.6.1"
2122source = "registry+https://github.com/rust-lang/crates.io-index"
2123checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
2124
2125[[package]]
2126name = "syn"
2127version = "1.0.109"
2128source = "registry+https://github.com/rust-lang/crates.io-index"
2129checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
2130dependencies = [
2131 "proc-macro2",
2132 "quote",
2133 "unicode-ident",
2134]
2135
2136[[package]]
2137name = "syn"
2138version = "2.0.106"
2139source = "registry+https://github.com/rust-lang/crates.io-index"
2140checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
2141dependencies = [
2142 "proc-macro2",
2143 "quote",
2144 "unicode-ident",
2145]
2146
2147[[package]]
2148name = "sync_wrapper"
2149version = "1.0.2"
2150source = "registry+https://github.com/rust-lang/crates.io-index"
2151checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
2152
2153[[package]]
2154name = "synstructure"
2155version = "0.13.2"
2156source = "registry+https://github.com/rust-lang/crates.io-index"
2157checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"
2158dependencies = [
2159 "proc-macro2",
2160 "quote",
2161 "syn 2.0.106",
2162]
2163
2164[[package]]
2165name = "thiserror"
2166version = "1.0.69"
2167source = "registry+https://github.com/rust-lang/crates.io-index"
2168checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
2169dependencies = [
2170 "thiserror-impl 1.0.69",
2171]
2172
2173[[package]]
2174name = "thiserror"
2175version = "2.0.17"
2176source = "registry+https://github.com/rust-lang/crates.io-index"
2177checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8"
2178dependencies = [
2179 "thiserror-impl 2.0.17",
2180]
2181
2182[[package]]
2183name = "thiserror-impl"
2184version = "1.0.69"
2185source = "registry+https://github.com/rust-lang/crates.io-index"
2186checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
2187dependencies = [
2188 "proc-macro2",
2189 "quote",
2190 "syn 2.0.106",
2191]
2192
2193[[package]]
2194name = "thiserror-impl"
2195version = "2.0.17"
2196source = "registry+https://github.com/rust-lang/crates.io-index"
2197checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913"
2198dependencies = [
2199 "proc-macro2",
2200 "quote",
2201 "syn 2.0.106",
2202]
2203
2204[[package]]
2205name = "time"
2206version = "0.3.44"
2207source = "registry+https://github.com/rust-lang/crates.io-index"
2208checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d"
2209dependencies = [
2210 "deranged",
2211 "itoa",
2212 "num-conv",
2213 "powerfmt",
2214 "serde",
2215 "time-core",
2216 "time-macros",
2217]
2218
2219[[package]]
2220name = "time-core"
2221version = "0.1.6"
2222source = "registry+https://github.com/rust-lang/crates.io-index"
2223checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b"
2224
2225[[package]]
2226name = "time-macros"
2227version = "0.2.24"
2228source = "registry+https://github.com/rust-lang/crates.io-index"
2229checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3"
2230dependencies = [
2231 "num-conv",
2232 "time-core",
2233]
2234
2235[[package]]
2236name = "tls-parser"
2237version = "0.12.2"
2238source = "registry+https://github.com/rust-lang/crates.io-index"
2239checksum = "22c36249c6082584b1f224e70f6bdadf5102197be6cfa92b353efe605d9ac741"
2240dependencies = [
2241 "nom",
2242 "nom-derive",
2243 "num_enum",
2244 "phf",
2245 "phf_codegen",
2246 "rusticata-macros",
2247]
2248
2249[[package]]
2250name = "tokio"
2251version = "1.48.0"
2252source = "registry+https://github.com/rust-lang/crates.io-index"
2253checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408"
2254dependencies = [
2255 "bytes",
2256 "libc",
2257 "mio",
2258 "parking_lot",
2259 "pin-project-lite",
2260 "signal-hook-registry",
2261 "socket2",
2262 "tokio-macros",
2263 "windows-sys 0.61.2",
2264]
2265
2266[[package]]
2267name = "tokio-macros"
2268version = "2.6.0"
2269source = "registry+https://github.com/rust-lang/crates.io-index"
2270checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5"
2271dependencies = [
2272 "proc-macro2",
2273 "quote",
2274 "syn 2.0.106",
2275]
2276
2277[[package]]
2278name = "tokio-rustls"
2279version = "0.26.4"
2280source = "registry+https://github.com/rust-lang/crates.io-index"
2281checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61"
2282dependencies = [
2283 "rustls",
2284 "tokio",
2285]
2286
2287[[package]]
2288name = "tokio-util"
2289version = "0.7.17"
2290source = "registry+https://github.com/rust-lang/crates.io-index"
2291checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594"
2292dependencies = [
2293 "bytes",
2294 "futures-core",
2295 "futures-sink",
2296 "pin-project-lite",
2297 "slab",
2298 "tokio",
2299]
2300
2301[[package]]
2302name = "toml_datetime"
2303version = "0.7.3"
2304source = "registry+https://github.com/rust-lang/crates.io-index"
2305checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533"
2306dependencies = [
2307 "serde_core",
2308]
2309
2310[[package]]
2311name = "toml_edit"
2312version = "0.23.9"
2313source = "registry+https://github.com/rust-lang/crates.io-index"
2314checksum = "5d7cbc3b4b49633d57a0509303158ca50de80ae32c265093b24c414705807832"
2315dependencies = [
2316 "indexmap",
2317 "toml_datetime",
2318 "toml_parser",
2319 "winnow",
2320]
2321
2322[[package]]
2323name = "toml_parser"
2324version = "1.0.4"
2325source = "registry+https://github.com/rust-lang/crates.io-index"
2326checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e"
2327dependencies = [
2328 "winnow",
2329]
2330
2331[[package]]
2332name = "tower"
2333version = "0.5.2"
2334source = "registry+https://github.com/rust-lang/crates.io-index"
2335checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9"
2336dependencies = [
2337 "futures-core",
2338 "futures-util",
2339 "pin-project-lite",
2340 "sync_wrapper",
2341 "tokio",
2342 "tokio-util",
2343 "tower-layer",
2344 "tower-service",
2345 "tracing",
2346]
2347
2348[[package]]
2349name = "tower-http"
2350version = "0.6.8"
2351source = "registry+https://github.com/rust-lang/crates.io-index"
2352checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8"
2353dependencies = [
2354 "base64",
2355 "bitflags",
2356 "bytes",
2357 "http",
2358 "http-body",
2359 "mime",
2360 "pin-project-lite",
2361 "tower-layer",
2362 "tower-service",
2363 "tracing",
2364]
2365
2366[[package]]
2367name = "tower-layer"
2368version = "0.3.3"
2369source = "registry+https://github.com/rust-lang/crates.io-index"
2370checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"
2371
2372[[package]]
2373name = "tower-service"
2374version = "0.3.3"
2375source = "registry+https://github.com/rust-lang/crates.io-index"
2376checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
2377
2378[[package]]
2379name = "tracing"
2380version = "0.1.43"
2381source = "registry+https://github.com/rust-lang/crates.io-index"
2382checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647"
2383dependencies = [
2384 "log",
2385 "pin-project-lite",
2386 "tracing-attributes",
2387 "tracing-core",
2388]
2389
2390[[package]]
2391name = "tracing-attributes"
2392version = "0.1.31"
2393source = "registry+https://github.com/rust-lang/crates.io-index"
2394checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
2395dependencies = [
2396 "proc-macro2",
2397 "quote",
2398 "syn 2.0.106",
2399]
2400
2401[[package]]
2402name = "tracing-core"
2403version = "0.1.35"
2404source = "registry+https://github.com/rust-lang/crates.io-index"
2405checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c"
2406dependencies = [
2407 "once_cell",
2408]
2409
2410[[package]]
2411name = "try-lock"
2412version = "0.2.5"
2413source = "registry+https://github.com/rust-lang/crates.io-index"
2414checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
2415
2416[[package]]
2417name = "typenum"
2418version = "1.19.0"
2419source = "registry+https://github.com/rust-lang/crates.io-index"
2420checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"
2421
2422[[package]]
2423name = "ucd-trie"
2424version = "0.1.7"
2425source = "registry+https://github.com/rust-lang/crates.io-index"
2426checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971"
2427
2428[[package]]
2429name = "unicode-ident"
2430version = "1.0.19"
2431source = "registry+https://github.com/rust-lang/crates.io-index"
2432checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d"
2433
2434[[package]]
2435name = "unsafe-libyaml"
2436version = "0.2.11"
2437source = "registry+https://github.com/rust-lang/crates.io-index"
2438checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
2439
2440[[package]]
2441name = "untrusted"
2442version = "0.9.0"
2443source = "registry+https://github.com/rust-lang/crates.io-index"
2444checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
2445
2446[[package]]
2447name = "utf8parse"
2448version = "0.2.2"
2449source = "registry+https://github.com/rust-lang/crates.io-index"
2450checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
2451
2452[[package]]
2453name = "version_check"
2454version = "0.9.5"
2455source = "registry+https://github.com/rust-lang/crates.io-index"
2456checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
2457
2458[[package]]
2459name = "want"
2460version = "0.3.1"
2461source = "registry+https://github.com/rust-lang/crates.io-index"
2462checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
2463dependencies = [
2464 "try-lock",
2465]
2466
2467[[package]]
2468name = "wasi"
2469version = "0.11.1+wasi-snapshot-preview1"
2470source = "registry+https://github.com/rust-lang/crates.io-index"
2471checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
2472
2473[[package]]
2474name = "wasip2"
2475version = "1.0.1+wasi-0.2.4"
2476source = "registry+https://github.com/rust-lang/crates.io-index"
2477checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7"
2478dependencies = [
2479 "wit-bindgen",
2480]
2481
2482[[package]]
2483name = "wasm-bindgen"
2484version = "0.2.106"
2485source = "registry+https://github.com/rust-lang/crates.io-index"
2486checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd"
2487dependencies = [
2488 "cfg-if",
2489 "once_cell",
2490 "rustversion",
2491 "wasm-bindgen-macro",
2492 "wasm-bindgen-shared",
2493]
2494
2495[[package]]
2496name = "wasm-bindgen-macro"
2497version = "0.2.106"
2498source = "registry+https://github.com/rust-lang/crates.io-index"
2499checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3"
2500dependencies = [
2501 "quote",
2502 "wasm-bindgen-macro-support",
2503]
2504
2505[[package]]
2506name = "wasm-bindgen-macro-support"
2507version = "0.2.106"
2508source = "registry+https://github.com/rust-lang/crates.io-index"
2509checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40"
2510dependencies = [
2511 "bumpalo",
2512 "proc-macro2",
2513 "quote",
2514 "syn 2.0.106",
2515 "wasm-bindgen-shared",
2516]
2517
2518[[package]]
2519name = "wasm-bindgen-shared"
2520version = "0.2.106"
2521source = "registry+https://github.com/rust-lang/crates.io-index"
2522checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4"
2523dependencies = [
2524 "unicode-ident",
2525]
2526
2527[[package]]
2528name = "webpki-roots"
2529version = "1.0.4"
2530source = "registry+https://github.com/rust-lang/crates.io-index"
2531checksum = "b2878ef029c47c6e8cf779119f20fcf52bde7ad42a731b2a304bc221df17571e"
2532dependencies = [
2533 "rustls-pki-types",
2534]
2535
2536[[package]]
2537name = "windows-core"
2538version = "0.62.2"
2539source = "registry+https://github.com/rust-lang/crates.io-index"
2540checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
2541dependencies = [
2542 "windows-implement",
2543 "windows-interface",
2544 "windows-link",
2545 "windows-result",
2546 "windows-strings",
2547]
2548
2549[[package]]
2550name = "windows-implement"
2551version = "0.60.2"
2552source = "registry+https://github.com/rust-lang/crates.io-index"
2553checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
2554dependencies = [
2555 "proc-macro2",
2556 "quote",
2557 "syn 2.0.106",
2558]
2559
2560[[package]]
2561name = "windows-interface"
2562version = "0.59.3"
2563source = "registry+https://github.com/rust-lang/crates.io-index"
2564checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
2565dependencies = [
2566 "proc-macro2",
2567 "quote",
2568 "syn 2.0.106",
2569]
2570
2571[[package]]
2572name = "windows-link"
2573version = "0.2.1"
2574source = "registry+https://github.com/rust-lang/crates.io-index"
2575checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
2576
2577[[package]]
2578name = "windows-result"
2579version = "0.4.1"
2580source = "registry+https://github.com/rust-lang/crates.io-index"
2581checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
2582dependencies = [
2583 "windows-link",
2584]
2585
2586[[package]]
2587name = "windows-strings"
2588version = "0.5.1"
2589source = "registry+https://github.com/rust-lang/crates.io-index"
2590checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
2591dependencies = [
2592 "windows-link",
2593]
2594
2595[[package]]
2596name = "windows-sys"
2597version = "0.52.0"
2598source = "registry+https://github.com/rust-lang/crates.io-index"
2599checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
2600dependencies = [
2601 "windows-targets 0.52.6",
2602]
2603
2604[[package]]
2605name = "windows-sys"
2606version = "0.60.2"
2607source = "registry+https://github.com/rust-lang/crates.io-index"
2608checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
2609dependencies = [
2610 "windows-targets 0.53.5",
2611]
2612
2613[[package]]
2614name = "windows-sys"
2615version = "0.61.2"
2616source = "registry+https://github.com/rust-lang/crates.io-index"
2617checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
2618dependencies = [
2619 "windows-link",
2620]
2621
2622[[package]]
2623name = "windows-targets"
2624version = "0.52.6"
2625source = "registry+https://github.com/rust-lang/crates.io-index"
2626checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
2627dependencies = [
2628 "windows_aarch64_gnullvm 0.52.6",
2629 "windows_aarch64_msvc 0.52.6",
2630 "windows_i686_gnu 0.52.6",
2631 "windows_i686_gnullvm 0.52.6",
2632 "windows_i686_msvc 0.52.6",
2633 "windows_x86_64_gnu 0.52.6",
2634 "windows_x86_64_gnullvm 0.52.6",
2635 "windows_x86_64_msvc 0.52.6",
2636]
2637
2638[[package]]
2639name = "windows-targets"
2640version = "0.53.5"
2641source = "registry+https://github.com/rust-lang/crates.io-index"
2642checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
2643dependencies = [
2644 "windows-link",
2645 "windows_aarch64_gnullvm 0.53.1",
2646 "windows_aarch64_msvc 0.53.1",
2647 "windows_i686_gnu 0.53.1",
2648 "windows_i686_gnullvm 0.53.1",
2649 "windows_i686_msvc 0.53.1",
2650 "windows_x86_64_gnu 0.53.1",
2651 "windows_x86_64_gnullvm 0.53.1",
2652 "windows_x86_64_msvc 0.53.1",
2653]
2654
2655[[package]]
2656name = "windows_aarch64_gnullvm"
2657version = "0.52.6"
2658source = "registry+https://github.com/rust-lang/crates.io-index"
2659checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
2660
2661[[package]]
2662name = "windows_aarch64_gnullvm"
2663version = "0.53.1"
2664source = "registry+https://github.com/rust-lang/crates.io-index"
2665checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
2666
2667[[package]]
2668name = "windows_aarch64_msvc"
2669version = "0.52.6"
2670source = "registry+https://github.com/rust-lang/crates.io-index"
2671checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
2672
2673[[package]]
2674name = "windows_aarch64_msvc"
2675version = "0.53.1"
2676source = "registry+https://github.com/rust-lang/crates.io-index"
2677checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
2678
2679[[package]]
2680name = "windows_i686_gnu"
2681version = "0.52.6"
2682source = "registry+https://github.com/rust-lang/crates.io-index"
2683checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
2684
2685[[package]]
2686name = "windows_i686_gnu"
2687version = "0.53.1"
2688source = "registry+https://github.com/rust-lang/crates.io-index"
2689checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
2690
2691[[package]]
2692name = "windows_i686_gnullvm"
2693version = "0.52.6"
2694source = "registry+https://github.com/rust-lang/crates.io-index"
2695checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
2696
2697[[package]]
2698name = "windows_i686_gnullvm"
2699version = "0.53.1"
2700source = "registry+https://github.com/rust-lang/crates.io-index"
2701checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
2702
2703[[package]]
2704name = "windows_i686_msvc"
2705version = "0.52.6"
2706source = "registry+https://github.com/rust-lang/crates.io-index"
2707checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
2708
2709[[package]]
2710name = "windows_i686_msvc"
2711version = "0.53.1"
2712source = "registry+https://github.com/rust-lang/crates.io-index"
2713checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
2714
2715[[package]]
2716name = "windows_x86_64_gnu"
2717version = "0.52.6"
2718source = "registry+https://github.com/rust-lang/crates.io-index"
2719checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
2720
2721[[package]]
2722name = "windows_x86_64_gnu"
2723version = "0.53.1"
2724source = "registry+https://github.com/rust-lang/crates.io-index"
2725checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
2726
2727[[package]]
2728name = "windows_x86_64_gnullvm"
2729version = "0.52.6"
2730source = "registry+https://github.com/rust-lang/crates.io-index"
2731checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
2732
2733[[package]]
2734name = "windows_x86_64_gnullvm"
2735version = "0.53.1"
2736source = "registry+https://github.com/rust-lang/crates.io-index"
2737checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
2738
2739[[package]]
2740name = "windows_x86_64_msvc"
2741version = "0.52.6"
2742source = "registry+https://github.com/rust-lang/crates.io-index"
2743checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
2744
2745[[package]]
2746name = "windows_x86_64_msvc"
2747version = "0.53.1"
2748source = "registry+https://github.com/rust-lang/crates.io-index"
2749checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
2750
2751[[package]]
2752name = "winnow"
2753version = "0.7.14"
2754source = "registry+https://github.com/rust-lang/crates.io-index"
2755checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829"
2756dependencies = [
2757 "memchr",
2758]
2759
2760[[package]]
2761name = "wit-bindgen"
2762version = "0.46.0"
2763source = "registry+https://github.com/rust-lang/crates.io-index"
2764checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59"
2765
2766[[package]]
2767name = "x509-parser"
2768version = "0.18.0"
2769source = "registry+https://github.com/rust-lang/crates.io-index"
2770checksum = "eb3e137310115a65136898d2079f003ce33331a6c4b0d51f1531d1be082b6425"
2771dependencies = [
2772 "asn1-rs",
2773 "data-encoding",
2774 "der-parser",
2775 "lazy_static",
2776 "nom",
2777 "oid-registry",
2778 "ring",
2779 "rusticata-macros",
2780 "thiserror 2.0.17",
2781 "time",
2782]
2783
2784[[package]]
2785name = "xtask"
2786version = "0.1.0"
2787dependencies = [
2788 "anyhow",
2789]
2790
2791[[package]]
2792name = "yasna"
2793version = "0.5.2"
2794source = "registry+https://github.com/rust-lang/crates.io-index"
2795checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd"
2796dependencies = [
2797 "time",
2798]
2799
2800[[package]]
2801name = "zerocopy"
2802version = "0.8.27"
2803source = "registry+https://github.com/rust-lang/crates.io-index"
2804checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c"
2805dependencies = [
2806 "zerocopy-derive",
2807]
2808
2809[[package]]
2810name = "zerocopy-derive"
2811version = "0.8.27"
2812source = "registry+https://github.com/rust-lang/crates.io-index"
2813checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831"
2814dependencies = [
2815 "proc-macro2",
2816 "quote",
2817 "syn 2.0.106",
2818]
2819
2820[[package]]
2821name = "zeroize"
2822version = "1.8.2"
2823source = "registry+https://github.com/rust-lang/crates.io-index"
2824checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
diff --git a/Cargo.toml b/Cargo.toml
new file mode 100644
index 0000000..17750ae
--- /dev/null
+++ b/Cargo.toml
@@ -0,0 +1,14 @@
1[workspace]
2members = ["packet-detector", "packet-detector-ebpf", "xtask"]
3resolver = "2"
4
5[workspace.dependencies]
6aya = "0.12"
7aya-ebpf = "0.1"
8
9[profile.dev]
10opt-level = 3
11
12[profile.release]
13lto = true
14opt-level = 3
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..6a481a4
--- /dev/null
+++ b/README.md
@@ -0,0 +1,37 @@
1# Packet Detector
2
3XDP program that prints "hello world" when detecting "hell0123" in packets on enp1s0.
4# this has been moved to automated testing! in run_test.sh in the root dir! this file is just for documenting the basic stuff of what happens
5
6## Build & Run
7
8./build.sh #
9sudo ./target/release/packet-detector
10
11## Test
12
13sudo tcpdump -i enp1s0 -X udp port 9999
14echo "hell0123" | nc -u 192.168.122.154 9999
15
16^C[root@rust1 packet-detector]# sudo ./target/release/packet-detector
17XDP program attached to enp1s0. Waiting for 'hell0123' at offset 42...
18Press Ctrl+C to exit
19hello world
20hello world
21root@rust1 ~]# sudo tcpdump -i enp1s0 -X udp port 9999
22dropped privs to tcpdump
23tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
24listening on enp1s0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
2516:08:13.495858 IP _gateway.36253 > rust1.distinct: UDP, length 9
26 0x0000: 4500 0025 f4ed 4000 4011 cfed c0a8 7a01 E..%..@.@.....z.
27 0x0010: c0a8 7a9a 8d9d 270f 0011 93fc 6865 6c6c ..z...'.....hell
28 0x0020: 3031 3233 0a 0123.
2916:11:26.438958 IP _gateway.51421 > rust1.distinct: UDP, length 9
30 0x0000: 4500 0025 3f88 4000 4011 8553 c0a8 7a01 E..%?.@.@..S..z.
31 0x0010: c0a8 7a9a c8dd 270f 0011 58bc 6865 6c6c ..z...'...X.hell
32 0x0020: 3031 3233 0a 0123.
3316:20:35.902662 IP _gateway.38275 > rust1.distinct: UDP, length 9
34 0x0000: 4500 0025 fc3e 4000 4011 c89c c0a8 7a01 E..%.>@.@.....z.
35 0x0010: c0a8 7a9a 9583 270f 0011 8c16 6865 6c6c ..z...'.....hell
36 0x0020: 3031 3233 0a
37
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..0976748
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,4 @@
1#!/bin/bash
2set -e
3cargo xtask build-ebpf
4cargo build -p packet-detector --release
diff --git a/packet-detector-ebpf/Cargo.toml b/packet-detector-ebpf/Cargo.toml
new file mode 100644
index 0000000..7241610
--- /dev/null
+++ b/packet-detector-ebpf/Cargo.toml
@@ -0,0 +1,12 @@
1[package]
2name = "packet-detector-ebpf"
3version = "0.1.0"
4edition = "2021"
5
6[dependencies]
7aya-ebpf = { workspace = true }
8network-types = "0.1.0"
9
10[[bin]]
11name = "packet-detector"
12path = "src/main.rs"
diff --git a/packet-detector-ebpf/src/main.rs b/packet-detector-ebpf/src/main.rs
new file mode 100644
index 0000000..db9e410
--- /dev/null
+++ b/packet-detector-ebpf/src/main.rs
@@ -0,0 +1,170 @@
1#![no_std]
2#![no_main]
3
4use aya_ebpf::{bindings::xdp_action, macros::{map, xdp}, maps::{HashMap, RingBuf}, programs::XdpContext};
5use network_types::{eth::{EthHdr, EtherType}, ip::{Ipv4Hdr, IpProto}, tcp::TcpHdr, udp::UdpHdr};
6
7#[repr(C)]
8#[derive(Clone, Copy)]
9pub struct ConnKey {
10 pub port_lo: u16, // lower port (client ephemeral)
11 pub port_hi: u16, // higher port (server, e.g. 8443)
12}
13
14#[repr(C)]
15pub struct TlsEvent {
16 pub src_ip: u32,
17 pub dst_ip: u32,
18 pub src_port: u16,
19 pub dst_port: u16,
20 pub tls_len: u16,
21 pub _pad: u16,
22}
23
24#[map]
25static TLS_EVENTS: RingBuf = RingBuf::with_byte_size(256 * 1024, 0);
26
27#[map]
28static ALLOWED_CONNS: HashMap<ConnKey, u8> = HashMap::with_max_entries(4096, 0);
29
30#[map]
31static BLOCKED_CONNS: HashMap<ConnKey, u8> = HashMap::with_max_entries(4096, 0);
32
33// Magic word: "hell0123" (8 bytes)
34const MAGIC: [u8; 8] = *b"hell0123";
35
36#[xdp]
37pub fn packet_detector(ctx: XdpContext) -> u32 {
38 match try_process(&ctx) {
39 Ok(action) => action,
40 Err(_) => xdp_action::XDP_PASS
41 }
42}
43
44fn try_process(ctx: &XdpContext) -> Result<u32, ()> {
45 let eth = ptr::<EthHdr>(ctx, 0)?;
46 if unsafe { (*eth).ether_type } != EtherType::Ipv4.into() { return Ok(xdp_action::XDP_PASS); }
47
48 let ip = ptr::<Ipv4Hdr>(ctx, EthHdr::LEN)?;
49 let src_ip = u32::from_be_bytes(unsafe { (*ip).src_addr });
50 let ip_hdr_len = (unsafe { (*ip).vihl } & 0x0F) as usize * 4;
51
52 match unsafe { (*ip).proto } {
53 IpProto::Tcp => process_tcp(ctx, ip, ip_hdr_len, src_ip),
54 IpProto::Udp => process_udp(ctx, ip, ip_hdr_len, src_ip),
55 _ => Ok(xdp_action::XDP_PASS),
56 }
57}
58
59fn make_conn_key(src_port: u16, dst_port: u16) -> ConnKey {
60 if src_port < dst_port {
61 ConnKey { port_lo: src_port, port_hi: dst_port }
62 } else {
63 ConnKey { port_lo: dst_port, port_hi: src_port }
64 }
65}
66
67fn process_tcp(ctx: &XdpContext, ip: *const Ipv4Hdr, ip_hdr_len: usize, src_ip: u32) -> Result<u32, ()> {
68 let tcp = ptr::<TcpHdr>(ctx, EthHdr::LEN + ip_hdr_len)?;
69 let payload_off = EthHdr::LEN + ip_hdr_len + (unsafe { (*tcp).doff() } as usize) * 4;
70
71 let src_port = u16::from_be_bytes(unsafe { (*tcp).source });
72 let dst_port = u16::from_be_bytes(unsafe { (*tcp).dest });
73
74 // Only filter TLS ports (443/8443)
75 let is_tls_port = dst_port == 443 || src_port == 443 || dst_port == 8443 || src_port == 8443;
76 if !is_tls_port {
77 return Ok(xdp_action::XDP_PASS);
78 }
79
80 let conn_key = make_conn_key(src_port, dst_port);
81
82 // Explicitly blocked (invalid cert) - drop
83 if unsafe { BLOCKED_CONNS.get(&conn_key) }.is_some() {
84 return Ok(xdp_action::XDP_DROP);
85 }
86
87 // Already validated (valid cert) - allow
88 if unsafe { ALLOWED_CONNS.get(&conn_key) }.is_some() {
89 return Ok(xdp_action::XDP_PASS);
90 }
91
92 // Check if this packet has a TLS cert - send to userspace for validation
93 if is_tls_cert(ctx, payload_off) {
94 const SZ: usize = 512;
95 if let Some(tls_ptr) = bounds(ctx, payload_off, SZ) {
96 if let Some(mut entry) = TLS_EVENTS.reserve::<[u8; 16 + SZ]>(0) {
97 let p = entry.as_mut_ptr() as *mut u8;
98 unsafe {
99 core::ptr::write(p as *mut TlsEvent, TlsEvent {
100 src_ip,
101 dst_ip: u32::from_be_bytes((*ip).dst_addr),
102 src_port,
103 dst_port,
104 tls_len: SZ as u16,
105 _pad: 0,
106 });
107 for i in 0..SZ { *p.add(16 + i) = *tls_ptr.add(i); }
108 }
109 entry.submit(0);
110 }
111 }
112 }
113
114 // Allow packet through - handshake continues, userspace will decide later
115 Ok(xdp_action::XDP_PASS)
116}
117
118fn process_udp(ctx: &XdpContext, ip: *const Ipv4Hdr, ip_hdr_len: usize, src_ip: u32) -> Result<u32, ()> {
119 let udp = ptr::<UdpHdr>(ctx, EthHdr::LEN + ip_hdr_len)?;
120 let payload_off = EthHdr::LEN + ip_hdr_len + UdpHdr::LEN;
121
122 // Check for magic word at payload start
123 if let Some(data) = bounds(ctx, payload_off, MAGIC.len()) {
124 let mut matched = true;
125 for i in 0..MAGIC.len() {
126 if unsafe { *data.add(i) } != MAGIC[i] { matched = false; break; }
127 }
128 if matched {
129 // Send event to userspace (reuse TlsEvent struct)
130 if let Some(mut entry) = TLS_EVENTS.reserve::<[u8; 16]>(0) {
131 let p = entry.as_mut_ptr() as *mut u8;
132 unsafe {
133 core::ptr::write(p as *mut TlsEvent, TlsEvent {
134 src_ip,
135 dst_ip: u32::from_be_bytes((*ip).dst_addr),
136 src_port: u16::from_be_bytes((*udp).src),
137 dst_port: u16::from_be_bytes((*udp).dst),
138 tls_len: 0, // 0 = UDP magic match
139 _pad: 0,
140 });
141 }
142 entry.submit(0);
143 }
144 return Ok(xdp_action::XDP_PASS);
145 }
146 // No match - drop the packet
147 return Ok(xdp_action::XDP_DROP);
148 }
149 Ok(xdp_action::XDP_PASS)
150}
151
152#[inline(always)]
153fn is_tls_cert(ctx: &XdpContext, off: usize) -> bool {
154 if let Some(p) = bounds(ctx, off, 6) {
155 unsafe { *p == 0x16 && *p.add(1) == 0x03 && *p.add(2) <= 0x03 && *p.add(5) == 0x0B }
156 } else { false }
157}
158
159#[inline(always)]
160fn bounds(ctx: &XdpContext, off: usize, len: usize) -> Option<*const u8> {
161 if ctx.data() + off + len > ctx.data_end() { None } else { Some((ctx.data() + off) as *const u8) }
162}
163
164#[inline(always)]
165fn ptr<T>(ctx: &XdpContext, off: usize) -> Result<*const T, ()> {
166 bounds(ctx, off, core::mem::size_of::<T>()).map(|p| p as *const T).ok_or(())
167}
168
169#[panic_handler]
170fn panic(_: &core::panic::PanicInfo) -> ! { unsafe { core::hint::unreachable_unchecked() } }
diff --git a/packet-detector/Cargo.toml b/packet-detector/Cargo.toml
new file mode 100644
index 0000000..a6c699f
--- /dev/null
+++ b/packet-detector/Cargo.toml
@@ -0,0 +1,39 @@
1[package]
2name = "packet-detector"
3version = "0.1.0"
4edition = "2021"
5
6[[bin]]
7name = "packet-detector"
8path = "src/main.rs"
9
10[[bin]]
11name = "tls_server"
12path = "src/bin/tls_server.rs"
13
14[[bin]]
15name = "tls_client"
16path = "src/bin/tls_client.rs"
17
18[dependencies]
19anyhow = "1"
20aya = { workspace = true }
21chrono = { version = "0.4", features = ["serde"] }
22env_logger = "0.11"
23futures = "0.3"
24hex = "0.4"
25k8s-openapi = { version = "0.26", features = ["v1_31"] }
26kube = { version = "2.0", features = ["runtime", "client", "derive", "rustls-tls"] }
27log = "0.4"
28rcgen = { version = "0.14", features = ["pem", "x509-parser"] }
29rustls = { version = "0.23", features = ["tls12", "ring"] }
30rustls-pemfile = "2.2"
31rustls-webpki = { version = "0.102", features = ["ring"] }
32serde = { version = "1", features = ["derive"] }
33serde_json = "1"
34sha2 = "0.10"
35tls-parser = "0.12"
36tokio = { version = "1", features = ["full"] }
37tokio-rustls = "0.26"
38webpki-roots = "1"
39x509-parser = "0.18"
diff --git a/packet-detector/src/bin/tls_client.rs b/packet-detector/src/bin/tls_client.rs
new file mode 100644
index 0000000..6098172
--- /dev/null
+++ b/packet-detector/src/bin/tls_client.rs
@@ -0,0 +1,51 @@
1//! mTLS test client
2
3use std::sync::Arc;
4use packet_detector::tls_util::LoggingVerifier;
5use rustls::pki_types::{CertificateDer, PrivateKeyDer, ServerName};
6use rustls::version::TLS12;
7use rustls::ClientConfig;
8use tokio::io::{AsyncReadExt, AsyncWriteExt};
9use tokio::net::TcpStream;
10use tokio_rustls::TlsConnector;
11
12const CERT: &str = "client_cert.pem";
13const KEY: &str = "client_key.pem";
14
15fn load_creds() -> Result<(Vec<CertificateDer<'static>>, PrivateKeyDer<'static>), Box<dyn std::error::Error>> {
16 let cert_pem = std::fs::read_to_string(CERT)?;
17 let key_pem = std::fs::read_to_string(KEY)?;
18 let certs = rustls_pemfile::certs(&mut cert_pem.as_bytes()).collect::<Result<Vec<_>, _>>()?;
19 let key = rustls_pemfile::private_key(&mut key_pem.as_bytes())?.ok_or("No key")?;
20 Ok((certs, key))
21}
22
23#[tokio::main]
24async fn main() -> Result<(), Box<dyn std::error::Error>> {
25 rustls::crypto::ring::default_provider().install_default().ok();
26
27 let host = std::env::args().nth(1).unwrap_or_else(|| "127.0.0.1".into());
28 let port: u16 = std::env::args().nth(2).and_then(|s| s.parse().ok()).unwrap_or(8443);
29
30 let (certs, key) = load_creds()?;
31 println!("Connecting to {}:{} with client cert", host, port);
32
33 let config = ClientConfig::builder_with_protocol_versions(&[&TLS12])
34 .dangerous()
35 .with_custom_certificate_verifier(Arc::new(LoggingVerifier))
36 .with_client_auth_cert(certs, key)?;
37
38 let stream = TcpStream::connect(format!("{}:{}", host, port)).await?;
39 let mut tls = TlsConnector::from(Arc::new(config))
40 .connect(ServerName::try_from(host.clone())?, stream).await?;
41 println!("TLS handshake complete!");
42
43 let req = format!("GET / HTTP/1.1\r\nHost: {}\r\nConnection: close\r\n\r\n", host);
44 tls.write_all(req.as_bytes()).await?;
45
46 let mut resp = Vec::new();
47 tls.read_to_end(&mut resp).await?;
48 println!("\n{}", String::from_utf8_lossy(&resp));
49
50 Ok(())
51}
diff --git a/packet-detector/src/bin/tls_server.rs b/packet-detector/src/bin/tls_server.rs
new file mode 100644
index 0000000..7f68062
--- /dev/null
+++ b/packet-detector/src/bin/tls_server.rs
@@ -0,0 +1,295 @@
1//! TLS 1.2 Test Server with Client Tracking (mTLS Enabled)
2//!
3//! A mutual TLS (mTLS) HTTPS server for testing the eBPF TLS certificate validator.
4//! Requires client certificates signed by the CA for authentication.
5//! Tracks connected clients and displays their status.
6
7use std::collections::HashMap;
8use std::env;
9use std::fs;
10use std::net::SocketAddr;
11use std::path::Path;
12use std::sync::Arc;
13
14use packet_detector::tls_util::{dn, parse_pem};
15use rcgen::{BasicConstraints, CertificateParams, IsCa, Issuer, KeyPair, KeyUsagePurpose, SanType};
16use rustls::pki_types::{CertificateDer, PrivateKeyDer};
17use rustls::server::{ServerConfig, WebPkiClientVerifier};
18use rustls::version::TLS12;
19use rustls::RootCertStore;
20use tokio::io::{AsyncReadExt, AsyncWriteExt};
21use tokio::net::TcpListener;
22use tokio::sync::RwLock;
23use tokio_rustls::TlsAcceptor;
24
25const DEFAULT_PORT: u16 = 8443;
26const CA_CERT_PATH: &str = "ca_cert.pem";
27const CA_KEY_PATH: &str = "ca_key.pem";
28const SERVER_CERT_PATH: &str = "server_cert.pem";
29const SERVER_KEY_PATH: &str = "server_key.pem";
30const CLIENT_CERT_PATH: &str = "client_cert.pem";
31const CLIENT_KEY_PATH: &str = "client_key.pem";
32
33#[derive(Clone, Debug, serde::Serialize)]
34struct Client {
35 ip: String,
36 connected_at: chrono::DateTime<chrono::Utc>,
37 #[serde(skip)]
38 last_seen: chrono::DateTime<chrono::Utc>,
39 requests: u64,
40}
41
42#[derive(Default)]
43struct State {
44 clients: HashMap<String, Client>,
45 connections: u64,
46 requests: u64,
47}
48
49/// Generate a CA certificate for signing server and client certificates
50fn generate_ca_certificate() -> Result<(String, String, KeyPair), Box<dyn std::error::Error>> {
51 println!("Generating CA certificate...");
52
53 let mut params = CertificateParams::default();
54 params.distinguished_name = dn("eBPF Test CA", "Zero Trust Network");
55 params.is_ca = IsCa::Ca(BasicConstraints::Unconstrained);
56 params.key_usages = vec![
57 KeyUsagePurpose::KeyCertSign,
58 KeyUsagePurpose::CrlSign,
59 ];
60
61 let key_pair = KeyPair::generate()?;
62 let cert = params.self_signed(&key_pair)?;
63
64 Ok((cert.pem(), key_pair.serialize_pem(), key_pair))
65}
66
67/// Generate a server certificate signed by the CA
68fn generate_server_certificate(
69 ca_cert_pem: &str,
70 ca_key_pem: &str,
71) -> Result<(String, String), Box<dyn std::error::Error>> {
72 println!("Generating server certificate signed by CA...");
73
74 let ca_key = KeyPair::from_pem(ca_key_pem)?;
75 let issuer = Issuer::from_ca_cert_pem(ca_cert_pem, ca_key)?;
76
77 let mut params = CertificateParams::default();
78 params.distinguished_name = dn("localhost", "eBPF Test Server");
79 params.subject_alt_names = vec![
80 SanType::DnsName("localhost".try_into()?),
81 SanType::IpAddress(std::net::IpAddr::V4(std::net::Ipv4Addr::new(127, 0, 0, 1))),
82 ];
83 params.key_usages = vec![
84 KeyUsagePurpose::DigitalSignature,
85 KeyUsagePurpose::KeyEncipherment,
86 ];
87
88 let key_pair = KeyPair::generate()?;
89 let cert = params.signed_by(&key_pair, &issuer)?;
90
91 Ok((cert.pem(), key_pair.serialize_pem()))
92}
93
94/// Generate a client certificate signed by the CA
95fn generate_client_certificate(
96 client_name: &str,
97 ca_cert_pem: &str,
98 ca_key_pem: &str,
99) -> Result<(String, String), Box<dyn std::error::Error>> {
100 println!("Generating client certificate for: {}", client_name);
101
102 let ca_key = KeyPair::from_pem(ca_key_pem)?;
103 let issuer = Issuer::from_ca_cert_pem(ca_cert_pem, ca_key)?;
104
105 let mut params = CertificateParams::default();
106 params.distinguished_name = dn(client_name, "eBPF Test Client");
107 params.key_usages = vec![
108 KeyUsagePurpose::DigitalSignature,
109 ];
110
111 let key_pair = KeyPair::generate()?;
112 let cert = params.signed_by(&key_pair, &issuer)?;
113
114 Ok((cert.pem(), key_pair.serialize_pem()))
115}
116
117/// PKI setup result
118struct PkiSetup {
119 ca_cert_pem: String,
120 server_cert: Vec<CertificateDer<'static>>,
121 server_key: PrivateKeyDer<'static>,
122}
123
124/// Load or generate the full PKI (CA, server cert, client cert)
125fn setup_pki() -> Result<PkiSetup, Box<dyn std::error::Error>> {
126 let ca_cert_pem: String;
127 let ca_key_pem: String;
128
129 // Load or generate CA
130 if Path::new(CA_CERT_PATH).exists() && Path::new(CA_KEY_PATH).exists() {
131 println!("Loading existing CA from {} and {}", CA_CERT_PATH, CA_KEY_PATH);
132 ca_cert_pem = fs::read_to_string(CA_CERT_PATH)?;
133 ca_key_pem = fs::read_to_string(CA_KEY_PATH)?;
134 } else {
135 println!("Generating new PKI infrastructure...");
136 let (cert, key, _) = generate_ca_certificate()?;
137 fs::write(CA_CERT_PATH, &cert)?;
138 fs::write(CA_KEY_PATH, &key)?;
139 println!("Saved CA to {} and {}", CA_CERT_PATH, CA_KEY_PATH);
140 ca_cert_pem = cert;
141 ca_key_pem = key;
142 }
143
144 // Load or generate server certificate
145 let server_cert_pem: String;
146 let server_key_pem: String;
147
148 if Path::new(SERVER_CERT_PATH).exists() && Path::new(SERVER_KEY_PATH).exists() {
149 println!("Loading existing server certificate...");
150 server_cert_pem = fs::read_to_string(SERVER_CERT_PATH)?;
151 server_key_pem = fs::read_to_string(SERVER_KEY_PATH)?;
152 } else {
153 let (cert, key) = generate_server_certificate(&ca_cert_pem, &ca_key_pem)?;
154 fs::write(SERVER_CERT_PATH, &cert)?;
155 fs::write(SERVER_KEY_PATH, &key)?;
156 println!("Saved server cert to {} and {}", SERVER_CERT_PATH, SERVER_KEY_PATH);
157 server_cert_pem = cert;
158 server_key_pem = key;
159 }
160
161 // Load or generate client certificate
162 if !Path::new(CLIENT_CERT_PATH).exists() || !Path::new(CLIENT_KEY_PATH).exists() {
163 let (cert, key) = generate_client_certificate("test-client", &ca_cert_pem, &ca_key_pem)?;
164 fs::write(CLIENT_CERT_PATH, &cert)?;
165 fs::write(CLIENT_KEY_PATH, &key)?;
166 println!("Saved client cert to {} and {}", CLIENT_CERT_PATH, CLIENT_KEY_PATH);
167 }
168
169 // Parse certificates
170 let server_certs = parse_pem(&server_cert_pem)?;
171
172 let server_key = rustls_pemfile::private_key(&mut server_key_pem.as_bytes())?
173 .ok_or("No server private key found")?;
174
175 Ok(PkiSetup {
176 ca_cert_pem,
177 server_cert: server_certs,
178 server_key,
179 })
180}
181
182fn parse_request(data: &[u8]) -> (&str, Option<String>) {
183 let req = std::str::from_utf8(data).unwrap_or("");
184 let first_line = req.lines().next().unwrap_or("");
185
186 // Check X-Client-Name header
187 let client = req.lines()
188 .find(|l| l.to_lowercase().starts_with("x-client-name:"))
189 .map(|l| l.split(':').nth(1).unwrap_or("").trim().to_string())
190 .or_else(|| {
191 // Check ?client= query param
192 first_line.find("client=").map(|i| {
193 let rest = &first_line[i + 7..];
194 rest[..rest.find(|c| c == '&' || c == ' ').unwrap_or(rest.len())].to_string()
195 })
196 });
197
198 (first_line, client)
199}
200
201async fn handle_connection(
202 mut stream: tokio_rustls::server::TlsStream<tokio::net::TcpStream>,
203 peer: SocketAddr,
204 state: Arc<RwLock<State>>,
205) {
206 state.write().await.connections += 1;
207
208 let mut buf = vec![0u8; 4096];
209 let n = match stream.read(&mut buf).await {
210 Ok(0) => return,
211 Ok(n) => n,
212 Err(_) => return,
213 };
214
215 let (path, client_name) = parse_request(&buf[..n]);
216
217 // Track client if name provided
218 if let Some(name) = &client_name {
219 let mut s = state.write().await;
220 s.requests += 1;
221 let now = chrono::Utc::now();
222 s.clients.entry(name.clone())
223 .and_modify(|c| { c.last_seen = now; c.requests += 1; })
224 .or_insert(Client {
225 ip: peer.ip().to_string(),
226 connected_at: now,
227 last_seen: now,
228 requests: 1,
229 });
230 }
231
232 // Route request
233 let (ctype, body) = if path.contains("/status") || path.contains("/clients") {
234 let s = state.read().await;
235 ("application/json", serde_json::json!({
236 "clients": s.clients.len(),
237 "connections": s.connections,
238 "requests": s.requests,
239 "list": &s.clients
240 }).to_string())
241 } else if path.contains("/register") {
242 ("application/json", serde_json::json!({
243 "status": "ok",
244 "client": client_name.as_deref().unwrap_or("unknown")
245 }).to_string())
246 } else {
247 ("text/plain", format!("TLS Server OK - {} clients", state.read().await.clients.len()))
248 };
249
250 let resp = format!(
251 "HTTP/1.1 200 OK\r\nContent-Type: {}\r\nContent-Length: {}\r\nConnection: close\r\n\r\n{}",
252 ctype, body.len(), body
253 );
254 let _ = stream.write_all(resp.as_bytes()).await;
255 let _ = stream.shutdown().await;
256}
257
258
259#[tokio::main]
260async fn main() -> Result<(), Box<dyn std::error::Error>> {
261 rustls::crypto::ring::default_provider().install_default().ok();
262
263 let port: u16 = env::args().nth(1).and_then(|s| s.parse().ok()).unwrap_or(DEFAULT_PORT);
264
265 let pki = setup_pki()?;
266
267 // Build root store with CA
268 let mut root_store = RootCertStore::empty();
269 for cert in parse_pem(&pki.ca_cert_pem)? {
270 root_store.add(cert)?;
271 }
272
273 let verifier = WebPkiClientVerifier::builder(Arc::new(root_store)).build()?;
274 let config = ServerConfig::builder_with_protocol_versions(&[&TLS12])
275 .with_client_cert_verifier(verifier)
276 .with_single_cert(pki.server_cert, pki.server_key)?;
277
278 let acceptor = TlsAcceptor::from(Arc::new(config));
279 let listener = TcpListener::bind(SocketAddr::from(([0, 0, 0, 0], port))).await?;
280 let state = Arc::new(RwLock::new(State::default()));
281
282 println!("mTLS server on :{} (endpoints: /, /status, /register)", port);
283 println!("Test: curl -k --tlsv1.2 --cert {} --key {} https://127.0.0.1:{}", CLIENT_CERT_PATH, CLIENT_KEY_PATH, port);
284
285 loop {
286 let Ok((stream, peer)) = listener.accept().await else { continue };
287 let acceptor = acceptor.clone();
288 let state = state.clone();
289 tokio::spawn(async move {
290 if let Ok(tls) = acceptor.accept(stream).await {
291 handle_connection(tls, peer, state).await;
292 }
293 });
294 }
295}
diff --git a/packet-detector/src/lib.rs b/packet-detector/src/lib.rs
new file mode 100644
index 0000000..a3a8ac1
--- /dev/null
+++ b/packet-detector/src/lib.rs
@@ -0,0 +1,6 @@
1//! Packet Detector Library
2//!
3//! Shared utilities for TLS certificate validation.
4
5pub mod tls_util;
6pub mod validator;
diff --git a/packet-detector/src/main.rs b/packet-detector/src/main.rs
new file mode 100644
index 0000000..69cccec
--- /dev/null
+++ b/packet-detector/src/main.rs
@@ -0,0 +1,150 @@
1//! TLS Certificate Validator / UDP Magic Detector - eBPF-based
2
3use std::collections::HashSet;
4use std::mem::size_of;
5use std::net::Ipv4Addr;
6
7use anyhow::{Context, Result};
8use aya::maps::{HashMap as AyaHashMap, RingBuf};
9use aya::programs::{Xdp, XdpFlags};
10use aya::{include_bytes_aligned, Bpf};
11use log::{info, warn};
12use tls_parser::{parse_tls_plaintext, TlsMessage, TlsMessageHandshake};
13use tokio::signal;
14
15use packet_detector::validator::CertValidator;
16
17// this has to be the exact same as the struct in kernelspace
18#[repr(C)]
19#[derive(Clone, Copy, PartialEq, Eq, Hash)]
20struct ConnKey {
21 port_lo: u16,
22 port_hi: u16,
23}
24
25unsafe impl aya::Pod for ConnKey {}
26
27fn make_conn_key(src_port: u16, dst_port: u16) -> ConnKey {
28 if src_port < dst_port {
29 ConnKey { port_lo: src_port, port_hi: dst_port }
30 } else {
31 ConnKey { port_lo: dst_port, port_hi: src_port }
32 }
33}
34
35// this has to be the exact same as the struct in kernelspace
36#[repr(C)]
37#[derive(Clone, Copy)]
38struct Event {
39 src_ip: u32,
40 dst_ip: u32,
41 src_port: u16,
42 dst_port: u16,
43 tls_len: u16,
44 _pad: u16,
45}
46
47unsafe impl aya::Pod for Event {}
48
49const EVENT_SIZE: usize = size_of::<Event>();
50
51fn ip(n: u32) -> Ipv4Addr {
52 Ipv4Addr::from(n.to_be_bytes())
53}
54
55fn extract_certs(tls_data: &[u8]) -> Option<Vec<Vec<u8>>> {
56 if tls_data.len() < 6 || tls_data[0] != 0x16 || tls_data[5] != 0x0B { return None; }
57 let (_, rec) = parse_tls_plaintext(tls_data).ok()?;
58 for msg in &rec.msg {
59 if let TlsMessage::Handshake(TlsMessageHandshake::Certificate(c)) = msg {
60 return Some(c.cert_chain.iter().map(|x| x.data.to_vec()).collect());
61 }
62 }
63 None
64}
65
66enum Decision {
67 Allow(ConnKey),
68 Block(ConnKey),
69 Skip,
70}
71
72fn handle_event(data: &[u8], validator: Option<&CertValidator>) -> Decision {
73 if data.len() < EVENT_SIZE { return Decision::Skip; }
74 let ev: Event = unsafe { std::ptr::read(data.as_ptr() as *const _) };
75 let addr = format!("{}:{} -> {}:{}", ip(ev.src_ip), ev.src_port, ip(ev.dst_ip), ev.dst_port);
76 let conn_key = make_conn_key(ev.src_port, ev.dst_port);
77
78 if ev.tls_len == 0 {
79 info!("UDP magic from {}", addr);
80 return Decision::Allow(conn_key);
81 }
82
83 let Some(v) = validator else { return Decision::Skip };
84 let end = EVENT_SIZE + ev.tls_len as usize;
85 if end > data.len() { return Decision::Skip; }
86 let Some(certs) = extract_certs(&data[EVENT_SIZE..end]) else { return Decision::Skip };
87 let result = v.validate(&certs);
88 info!("{}: {}", addr, result.subject);
89
90 if result.valid {
91 info!("ALLOW conn {}:{} (signed by {})", conn_key.port_lo, conn_key.port_hi, result.issuer);
92 Decision::Allow(conn_key)
93 } else {
94 warn!("BLOCK conn {}:{} - {}", conn_key.port_lo, conn_key.port_hi, result.error.unwrap_or_default());
95 Decision::Block(conn_key)
96 }
97}
98
99#[tokio::main]
100async fn main() -> Result<()> {
101 rustls::crypto::ring::default_provider().install_default().ok();
102 env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init();
103
104 let args: Vec<String> = std::env::args().collect();
105 if args.len() < 2 {
106 eprintln!("Usage: {} <interface> [ca-cert.pem]", args[0]);
107 std::process::exit(1);
108 }
109
110 let iface = &args[1];
111 let validator = args.get(2).map(|p| CertValidator::with_ca_file(p)).transpose()?;
112 info!("Mode: {}", if validator.is_some() { "TLS cert validation" } else { "UDP magic detection" });
113
114 let mut bpf = Bpf::load(include_bytes_aligned!("../../target/bpfel-unknown-none/release/packet-detector"))?;
115 let program: &mut Xdp = bpf.program_mut("packet_detector").unwrap().try_into()?;
116 program.load()?;
117 program.attach(iface, XdpFlags::default()).context("XDP attach failed")?;
118 info!("XDP attached to {}", iface);
119
120 let mut allowed: AyaHashMap<_, ConnKey, u8> = AyaHashMap::try_from(bpf.take_map("ALLOWED_CONNS").unwrap())?;
121 let mut blocked: AyaHashMap<_, ConnKey, u8> = AyaHashMap::try_from(bpf.take_map("BLOCKED_CONNS").unwrap())?;
122 let mut ring: RingBuf<_> = RingBuf::try_from(bpf.take_map("TLS_EVENTS").unwrap())?;
123 let mut allowed_count = 0u32;
124 let mut blocked_count = 0u32;
125
126 println!("\nRunning on {} - Ctrl+C to stop\n", iface);
127
128 loop {
129 tokio::select! {
130 _ = signal::ctrl_c() => break,
131 _ = tokio::time::sleep(tokio::time::Duration::from_millis(10)) => {
132 while let Some(item) = ring.next() {
133 match handle_event(item.as_ref(), validator.as_ref()) {
134 Decision::Allow(key) => {
135 allowed.insert(key, 1, 0)?;
136 allowed_count += 1;
137 }
138 Decision::Block(key) => {
139 blocked.insert(key, 1, 0)?;
140 blocked_count += 1;
141 }
142 Decision::Skip => {}
143 }
144 }
145 }
146 }
147 }
148 println!("\nAllowed: {}, Blocked: {}", allowed_count, blocked_count);
149 Ok(())
150}
diff --git a/packet-detector/src/tls_util.rs b/packet-detector/src/tls_util.rs
new file mode 100644
index 0000000..456991b
--- /dev/null
+++ b/packet-detector/src/tls_util.rs
@@ -0,0 +1,73 @@
1use rcgen::{DistinguishedName, DnType};
2use rustls::client::danger::{HandshakeSignatureValid, ServerCertVerified, ServerCertVerifier};
3use rustls::pki_types::{CertificateDer, ServerName, UnixTime};
4use rustls::{DigitallySignedStruct, Error, SignatureScheme};
5use sha2::{Digest, Sha256};
6use x509_parser::prelude::*;
7
8/// SHA256 fingerprint (truncated to 16 bytes by default)
9pub fn fingerprint(cert: &CertificateDer<'_>, full: bool) -> String {
10 let hash = Sha256::digest(cert.as_ref());
11 if full { hex::encode(hash) } else { hex::encode(&hash[..16]) }
12}
13
14pub fn dn(cn: &str, org: &str) -> DistinguishedName {
15 let mut d = DistinguishedName::new();
16 d.push(DnType::CommonName, cn);
17 d.push(DnType::OrganizationName, org);
18 d.push(DnType::CountryName, "US");
19 d
20}
21
22/// Parse certs from PEM
23pub fn parse_pem(pem: &str) -> Result<Vec<CertificateDer<'static>>, std::io::Error> {
24 rustls_pemfile::certs(&mut pem.as_bytes()).collect()
25}
26
27fn schemes() -> Vec<SignatureScheme> {
28 rustls::crypto::ring::default_provider()
29 .signature_verification_algorithms
30 .supported_schemes()
31}
32
33/// Macro to implement the boilerplate verifier methods
34macro_rules! impl_verifier_base {
35 () => {
36 fn verify_tls12_signature(&self, _: &[u8], _: &CertificateDer<'_>, _: &DigitallySignedStruct) -> Result<HandshakeSignatureValid, Error> {
37 Ok(HandshakeSignatureValid::assertion())
38 }
39 fn verify_tls13_signature(&self, _: &[u8], _: &CertificateDer<'_>, _: &DigitallySignedStruct) -> Result<HandshakeSignatureValid, Error> {
40 Ok(HandshakeSignatureValid::assertion())
41 }
42 fn supported_verify_schemes(&self) -> Vec<SignatureScheme> {
43 schemes()
44 }
45 };
46}
47
48/// Accepts all certificates, logs info
49#[derive(Debug)]
50pub struct LoggingVerifier;
51
52impl ServerCertVerifier for LoggingVerifier {
53 fn verify_server_cert(&self, cert: &CertificateDer<'_>, intermediates: &[CertificateDer<'_>], _: &ServerName<'_>, _: &[u8], _: UnixTime) -> Result<ServerCertVerified, Error> {
54 println!("\n=== Server Certificate ===");
55 match X509Certificate::from_der(cert.as_ref()) {
56 Ok((_, x)) => {
57 println!("Subject: {}", x.subject());
58 println!("Issuer: {}", x.issuer());
59 println!("SHA256: {}", fingerprint(cert, true));
60 if x.subject() == x.issuer() { println!("Type: Self-Signed"); }
61 }
62 Err(e) => println!("Parse failed: {}", e),
63 }
64 for (i, c) in intermediates.iter().enumerate() {
65 if let Ok((_, x)) = X509Certificate::from_der(c.as_ref()) {
66 println!("Intermediate #{}: {}", i + 1, x.subject());
67 }
68 }
69 println!("Chain length: {}\n", 1 + intermediates.len());
70 Ok(ServerCertVerified::assertion())
71 }
72 impl_verifier_base!();
73}
diff --git a/packet-detector/src/validator.rs b/packet-detector/src/validator.rs
new file mode 100644
index 0000000..92e64d7
--- /dev/null
+++ b/packet-detector/src/validator.rs
@@ -0,0 +1,64 @@
1//! Certificate chain validation - signature only
2
3use anyhow::{anyhow, Result};
4use rustls::pki_types::CertificateDer;
5use x509_parser::prelude::*;
6
7pub struct ValidationResult {
8 pub valid: bool,
9 pub subject: String,
10 pub issuer: String,
11 pub error: Option<String>,
12}
13
14impl ValidationResult {
15 fn fail(subject: String, issuer: String, err: impl ToString) -> Self {
16 Self { valid: false, subject, issuer, error: Some(err.to_string()) }
17 }
18}
19
20pub struct CertValidator {
21 ca_der: Vec<u8>,
22}
23
24impl CertValidator {
25 pub fn with_ca_file(path: &str) -> Result<Self> {
26 let pem = std::fs::read_to_string(path)?;
27 let der = rustls_pemfile::certs(&mut pem.as_bytes())
28 .next()
29 .ok_or_else(|| anyhow!("No cert in PEM"))??;
30 Ok(Self { ca_der: der.to_vec() })
31 }
32
33 pub fn validate(&self, chain: &[Vec<u8>]) -> ValidationResult {
34 let Some(ee_der) = chain.first() else {
35 return ValidationResult::fail(String::new(), String::new(), "Empty chain");
36 };
37
38 let (subject, issuer) = match X509Certificate::from_der(ee_der) {
39 Ok((_, c)) => (c.subject().to_string(), c.issuer().to_string()),
40 Err(e) => return ValidationResult::fail(String::new(), String::new(), format!("{e:?}")),
41 };
42
43 let ca = CertificateDer::from(self.ca_der.clone());
44 let anchor = match webpki::anchor_from_trusted_cert(&ca) {
45 Ok(a) => a,
46 Err(e) => return ValidationResult::fail(subject, issuer, format!("CA: {e:?}")),
47 };
48
49 let cert = CertificateDer::from(ee_der.clone());
50 let ee = match webpki::EndEntityCert::try_from(&cert) {
51 Ok(c) => c,
52 Err(e) => return ValidationResult::fail(subject, issuer, format!("{e:?}")),
53 };
54
55 let intermediates: Vec<_> = chain[1..].iter().map(|c| CertificateDer::from(c.clone())).collect();
56 let algos = webpki::ALL_VERIFICATION_ALGS;
57 let time = webpki::types::UnixTime::since_unix_epoch(std::time::Duration::from_secs(4102444800)); // 2100
58
59 match ee.verify_for_usage(algos, &[anchor], &intermediates, time, webpki::KeyUsage::client_auth(), None, None) {
60 Ok(_) => ValidationResult { valid: true, subject, issuer, error: None },
61 Err(e) => ValidationResult::fail(subject, issuer, format!("{e:?}")),
62 }
63 }
64}
diff --git a/run_test.sh b/run_test.sh
new file mode 100755
index 0000000..33b53d2
--- /dev/null
+++ b/run_test.sh
@@ -0,0 +1,97 @@
1#!/bin/bash
2set -e
3
4DIR=/root/w/packet_ebpf
5CERTS=/tmp/ebpf_certs
6PIDS=()
7
8# Cleanup on exit
9cleanup() { kill "${PIDS[@]}" 2>/dev/null; rm -rf "$CERTS"; }
10trap cleanup EXIT
11
12# Start background process and track PID
13bg() { "$@" &>/dev/null & PIDS+=($!); }
14
15# Print result
16ok() { echo " $1: OK"; }
17fail() { echo " $1: FAIL"; }
18
19# Build
20echo "=== Building ==="
21cd "$DIR"
22cargo xtask build-ebpf --release &>/dev/null
23cargo build --release -p packet-detector &>/dev/null
24echo "Done"
25echo
26
27# Test 1: UDP - test actual packet delivery
28echo "=== UDP Magic Word (only 'hell0123' passes) ==="
29
30# Start XDP filter
31./target/release/packet-detector lo &>/dev/null & PIDS+=($!)
32sleep 1
33
34RECV_FILE=$(mktemp)
35
36# Test valid packet
37timeout 2 bash -c "nc -u -l 127.0.0.1 9999 > $RECV_FILE" &
38sleep 0.3
39echo 'hell0123' | nc -u -w1 127.0.0.1 9999 2>/dev/null || true
40sleep 0.5
41grep -q 'hell0123' "$RECV_FILE" && ok "hell0123 passed (XDP_PASS)" || fail "hell0123 dropped"
42
43# Test invalid packet
44> "$RECV_FILE" # clear file
45timeout 2 bash -c "nc -u -l 127.0.0.1 9999 > $RECV_FILE" &
46sleep 0.3
47echo 'wrongmsg' | nc -u -w1 127.0.0.1 9999 2>/dev/null || true
48sleep 0.5
49grep -q 'wrongmsg' "$RECV_FILE" && fail "wrongmsg passed (should drop)" || ok "wrongmsg dropped (XDP_DROP)"
50
51rm -f "$RECV_FILE"
52kill "${PIDS[-1]}" 2>/dev/null; unset 'PIDS[-1]'
53echo
54
55# Test 2: TLS
56echo "=== TLS Certificate ==="
57
58# Create two separate PKI environments
59BAD_CERTS="$CERTS/bad"
60GOOD_CERTS="$CERTS/good"
61mkdir -p "$BAD_CERTS" "$GOOD_CERTS"
62
63# Start server with UNTRUSTED certs on port 8443
64cd "$BAD_CERTS"
65bg "$DIR/target/release/tls_server" 8443
66sleep 3
67
68# Start server with TRUSTED certs on port 8444
69cd "$GOOD_CERTS"
70bg "$DIR/target/release/tls_server" 8444
71sleep 3
72
73# Start packet-detector with ONLY the good CA (won't trust bad server)
74"$DIR/target/release/packet-detector" lo "$GOOD_CERTS/ca_cert.pem" &>/dev/null & PIDS+=($!)
75sleep 2
76
77# Test 1: Connect to BAD server (untrusted cert)
78# Handshake completes, but HTTP request should fail (blocked after validation)
79cd "$BAD_CERTS"
80BAD_OUT=$(timeout 5 "$DIR/target/release/tls_client" 127.0.0.1 8443 2>&1) || true
81if echo "$BAD_OUT" | grep -q "HTTP/1.1 200"; then
82 fail "Untrusted cert - HTTP should have been blocked"
83else
84 ok "Untrusted cert - HTTP blocked (XDP_DROP after validation)"
85fi
86
87# Test 2: Connect to GOOD server (trusted cert) - should succeed fully
88cd "$GOOD_CERTS"
89GOOD_OUT=$(timeout 5 "$DIR/target/release/tls_client" 127.0.0.1 8444 2>&1) || true
90if echo "$GOOD_OUT" | grep -q "HTTP/1.1 200"; then
91 ok "Trusted cert - HTTP succeeded (XDP_PASS)"
92else
93 fail "Trusted cert - HTTP failed"
94fi
95
96echo
97echo "=== Done ==="
diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml
new file mode 100644
index 0000000..13979c3
--- /dev/null
+++ b/xtask/Cargo.toml
@@ -0,0 +1,7 @@
1[package]
2name = "xtask"
3version = "0.1.0"
4edition = "2021"
5
6[dependencies]
7anyhow = "1"
diff --git a/xtask/src/main.rs b/xtask/src/main.rs
new file mode 100644
index 0000000..1009eef
--- /dev/null
+++ b/xtask/src/main.rs
@@ -0,0 +1,38 @@
1use anyhow::Result;
2use std::process::Command;
3
4fn main() -> Result<()> {
5 let args: Vec<String> = std::env::args().collect();
6
7 if args.len() < 2 {
8 eprintln!("Usage: cargo xtask build-ebpf");
9 std::process::exit(1);
10 }
11
12 match args[1].as_str() {
13 "build-ebpf" => build_ebpf()?,
14 _ => eprintln!("Unknown command: {}", args[1]),
15 }
16
17 Ok(())
18}
19
20fn build_ebpf() -> Result<()> {
21 let status = Command::new("cargo")
22 .args(&[
23 "+nightly",
24 "build",
25 "--target=bpfel-unknown-none",
26 "--release",
27 "-Z",
28 "build-std=core",
29 "--manifest-path=packet-detector-ebpf/Cargo.toml",
30 ])
31 .status()?;
32
33 if !status.success() {
34 anyhow::bail!("Failed to build eBPF program");
35 }
36
37 Ok(())
38}