feat(models): add domain structs and CIDR validation

Add shared models (Network, Host, Port, Application, ApplicationPort)
with serde derives for Leptos server function serialization.
Add server/validation.rs with valider_ip_dans_reseau() and 5 unit tests.
Gate SSR-only modules (config, validation) with #[cfg(feature = "ssr")].

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-15 19:48:52 +02:00
parent b6d1e22d25
commit 4e9eab0450
6 changed files with 274 additions and 8 deletions

11
Cargo.lock generated
View File

@@ -836,6 +836,15 @@ dependencies = [
"rustversion",
]
[[package]]
name = "ipnetwork"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf466541e9d546596ee94f9f69590f89473455f88372423e0008fc1a7daf100e"
dependencies = [
"serde",
]
[[package]]
name = "itertools"
version = "0.14.0"
@@ -1597,10 +1606,12 @@ dependencies = [
"axum",
"console_error_panic_hook",
"dotenvy",
"ipnetwork",
"leptos",
"leptos_axum",
"leptos_meta",
"leptos_router",
"serde",
"thiserror 1.0.69",
"tokio",
"tower-http 0.5.2",