From 3e9c465e041fd335bbfa73dfe9445d464a49a91f Mon Sep 17 00:00:00 2001 From: Dengfeng Liu Date: Thu, 24 Oct 2024 16:21:35 +0800 Subject: [PATCH] improve: permit tcp proxy's remote_port == 0 Signed-off-by: Dengfeng Liu --- config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.c b/config.c index 2b04297..a01d6f5 100644 --- a/config.c +++ b/config.c @@ -241,8 +241,8 @@ validate_proxy(struct proxy_service *ps) return 0; } } else if (strcmp(ps->proxy_type, "tcp") == 0 || strcmp(ps->proxy_type, "udp") == 0) { - if (ps->remote_port == 0 || ps->local_port == 0 || ps->local_ip == NULL) { - debug(LOG_ERR, "Proxy [%s] error: remote_port or local_port or local_ip not found", ps->proxy_name); + if (ps->local_port == 0 || ps->local_ip == NULL) { + debug(LOG_ERR, "Proxy [%s] error: local_port or local_ip not found", ps->proxy_name); return 0; } } else if (strcmp(ps->proxy_type, "http") == 0 || strcmp(ps->proxy_type, "https") == 0) {