From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server-vie001.gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_DBL_BLOCKED_OPENDNS, URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=new2025; t=1755147197; bh=Y9EA0brxvxUX2+ckLrBU0XxQWUEW1mzWVSvm1f4r3mM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Message-ID:Date:From: Reply-To:Subject:To:Cc:In-Reply-To:References:Resent-Date: Resent-From:Resent-To:Resent-Cc:User-Agent:Content-Type: Content-Transfer-Encoding; b=UQO5oaMCRQCx+JNKMR31xnnfAqIn7wjIt+52VDYlMlf3ebYpzo+F7qzUf35Pr3yGJ RKS/MNVFyaIN381bOsfmaop1dV0jB4vB5tqswOIqErSxO2CaQD9foKXxZfsVnmVSKp Z9FF8aLaqhF5bprDj3FFyQUDrbE2Q86PCHHq3Idipclw+r4eYNANAQqiHaXen9ziYH irinrMMAajT+AwRlYNFdWYDsI86JRvDk7Orbq+bTeVwI1/3hsAtCD1bgmpY+diEtOG 1o00209TKOmYY9flnY/EeMDNApECWu1mP3jH9OVa5PNaap/eYSQQAyhbv0LoG4yIv7 AwsHUC452sIAQ== Received: from zero (unknown [36.68.224.235]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id 765433127F9A; Thu, 14 Aug 2025 04:53:16 +0000 (UTC) From: Ahmad Gani To: Ammar Faizi Cc: Ahmad Gani , Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: [PATCH gwproxy v5 1/2] dns: Allow only port string number Date: Thu, 14 Aug 2025 11:46:54 +0700 Message-ID: <20250814044658.252579-2-reyuki@gnuweeb.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250814044658.252579-1-reyuki@gnuweeb.org> References: <20250814044658.252579-1-reyuki@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Instead of adding additional work for parsing well-known services like http, https, etc... (port in socks5 field is a number anyway). Signed-off-by: Ahmad Gani --- man/gwp_dns_queue.3 | 2 +- src/gwproxy/dns.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/man/gwp_dns_queue.3 b/man/gwp_dns_queue.3 index dcd06746bbcc..f57807517df5 100644 --- a/man/gwp_dns_queue.3 +++ b/man/gwp_dns_queue.3 @@ -77,7 +77,7 @@ contains: The hostname being resolved. .TP .B char *service -The service name or port number (e.g., "http", "443"). +The port number in ascii format. .TP .B _Atomic(int) refcnt Atomic reference count for the entry. diff --git a/src/gwproxy/dns.h b/src/gwproxy/dns.h index a4038fc0b254..10c7cea2ebe4 100644 --- a/src/gwproxy/dns.h +++ b/src/gwproxy/dns.h @@ -71,8 +71,7 @@ void gwp_dns_ctx_free(struct gwp_dns_ctx *ctx); * * @param ctx Pointer to the DNS context. * @param name Name to resolve. - * @param service Service to resolve (e.g., "http", "https", or port - * number). + * @param service Service to resolve in port number ascii format. * @return Pointer to a gwp_dns_entry on success, NULL on failure. */ struct gwp_dns_entry *gwp_dns_queue(struct gwp_dns_ctx *ctx, -- Ahmad Gani