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_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=1754376635; bh=X5w2RVrESDXCDp9TeKC8mo1gDlM+HkfPvojsmAulg24=; 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=F9m+42bzy4/Js5PeEo/Q/9YWAPLsRmkSWUy8tCd8PbSIdV+jhNU7P4OYH+ataORgu ytWVAgewLTeKaxiMEuspYefVCFE91yWyo44GHt5RF+WtkLnswYSxIsZTk3LAqpLKlS VS7H6rOQuXqe3jjV293cCNxMFbkcmL53UhtoqcQE7DpegdnIrDlDfl7BkaIE/uuvyC G/8Fgo7jzDqIlaB/f1PbXQG0kNQCe0ZvbzE41oF3sX1NoG9sc9BueCa9LbwCnez9z5 QAWVGqnMMjAq5ylMcO0qya9B7cFPWBGpU1vmQy1jC42e2QyXfSk1Tk1k9GGNxnNP88 IOGoxyM+vdDMA== Received: from zero (unknown [182.253.151.158]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id 866343128021; Tue, 5 Aug 2025 06:50:34 +0000 (UTC) From: Ahmad Gani To: Ammar Faizi Cc: Ahmad Gani , Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: [PATCH gwproxy v3 3/9] dnslookup: Allow only port string number Date: Tue, 5 Aug 2025 13:49:23 +0700 Message-ID: <20250805064933.109080-4-reyuki@gnuweeb.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250805064933.109080-1-reyuki@gnuweeb.org> References: <20250805064933.109080-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 290325d4f989..3bd437207d99 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