Create network filters route

This commit is contained in:
2024-01-03 14:50:59 +01:00
parent 706bce0fd8
commit 22f5acd0ff
11 changed files with 180 additions and 31 deletions

View File

@ -2159,18 +2159,6 @@ dependencies = [
"serde_derive",
]
[[package]]
name = "serde-xml-rs"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb3aa78ecda1ebc9ec9847d5d3aba7d618823446a049ba2491940506da6e2782"
dependencies = [
"log",
"serde",
"thiserror",
"xml-rs",
]
[[package]]
name = "serde_derive"
version = "1.0.193"
@ -2677,7 +2665,6 @@ dependencies = [
"reqwest",
"rust-embed",
"serde",
"serde-xml-rs",
"serde_json",
"sysinfo",
"tempfile",
@ -2981,12 +2968,6 @@ dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "xml-rs"
version = "0.8.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a"
[[package]]
name = "zerocopy"
version = "0.7.31"

View File

@ -22,7 +22,6 @@ actix-web-actors = "4.2.0"
actix-http = "3.4.0"
serde = { version = "1.0.193", features = ["derive"] }
serde_json = "1.0.108"
serde-xml-rs = "0.6.0"
quick-xml = { version = "0.31.0", features = ["serialize", "overlapped-lists"] }
futures-util = "0.3.28"
anyhow = "1.0.75"

View File

@ -16,7 +16,7 @@ struct StaticConfig {
iso_mimetypes: &'static [&'static str],
net_mac_prefix: &'static str,
constraints: ServerConstraints,
builtin_network_rules: &'static [&'static str],
builtin_nwfilter_rules: &'static [&'static str],
}
#[derive(serde::Serialize)]
@ -46,7 +46,7 @@ pub async fn static_config(local_auth: LocalAuthEnabled) -> impl Responder {
oidc_auth_enabled: !AppConfig::get().disable_oidc,
iso_mimetypes: &constants::ALLOWED_ISO_MIME_TYPES,
net_mac_prefix: constants::NET_MAC_ADDR_PREFIX,
builtin_network_rules: &constants::BUILTIN_NETWORK_FILTER_RULES,
builtin_nwfilter_rules: &constants::BUILTIN_NETWORK_FILTER_RULES,
constraints: ServerConstraints {
iso_max_size: constants::ISO_MAX_SIZE,