Add http_port range validation (0 or 1-65535)

Change http_port type from u16 to u32 to allow out-of-range values to be
caught by validation. Add HttpPortInvalid error variant and validation check
for http_port > 65535. Add test for http_port=65536 producing HttpPortInvalid.
http_port=0 (disabled) remains valid per existing test.
This commit is contained in:
2026-06-12 04:28:35 +00:00
parent 53ef5b32c3
commit d24148dae9
3 changed files with 33 additions and 9 deletions

View File

@@ -259,7 +259,7 @@ async fn test_rate_limit_eviction_task() {
fn make_redirect_listener_config(
bind_addr: &str,
http_port: u16,
http_port: u32,
https_port: u16,
) -> reverse_proxy::config::static_config::ListenerConfig {
reverse_proxy::config::static_config::ListenerConfig {