Can configure network NAT settings from UI

This commit is contained in:
2024-01-09 21:57:18 +01:00
parent 71e22bc328
commit f82925dbcb
11 changed files with 446 additions and 11 deletions

View File

@ -43,6 +43,7 @@ struct ServerConstraints {
disk_size: LenConstraints,
net_name_size: LenConstraints,
net_title_size: LenConstraints,
net_nat_comment_size: LenConstraints,
dhcp_reservation_host_name: LenConstraints,
nwfilter_name_size: LenConstraints,
nwfilter_comment_size: LenConstraints,
@ -81,6 +82,10 @@ pub async fn static_config(local_auth: LocalAuthEnabled) -> impl Responder {
net_name_size: LenConstraints { min: 2, max: 50 },
net_title_size: LenConstraints { min: 0, max: 50 },
net_nat_comment_size: LenConstraints {
min: 0,
max: constants::NET_NAT_COMMENT_MAX_SIZE,
},
dhcp_reservation_host_name: LenConstraints { min: 2, max: 250 },