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=1754013308; 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=AVsJ5Tdza8ZzaKeE/nzFNVfknoA/M/XncOVc0UrtxCy8fnpenUvQZ3PAfF+H9Dfm8 mLzxCyBzeb8yeZ3quyFIQuHr4J7gD+6z7LY3ny5fp/1kDcHhXBqS7kIlVRRUff/6te vTaUopjZ7fPpNQLEQbgGNc3bstq+i26rIbr/d1D2C00vtmXhUJ83s9wRvURw4Zsx9a DskqHnLKNQzMpRhe/1+ScQFhAbAKr4KgFrheYRE/lQ3mALEXiFfPYPgd8qf82baQ8K XSz+LRh4wJ6Izs5istPJeVdBB0b4/oCc4tIaWVNoKFRayzZGvxoRY5uVd3MpwM6iit 4ZrSgB1vZXekQ== Received: from zero (unknown [182.253.151.159]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id F19563126F0D; Fri, 1 Aug 2025 01:55:06 +0000 (UTC) From: Ahmad Gani To: Ammar Faizi Cc: Ahmad Gani , Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: [PATCH gwproxy v2 2/3] dnslookup: Allow only port string number Date: Fri, 1 Aug 2025 08:54:23 +0700 Message-ID: <20250801015427.439511-3-reyuki@gnuweeb.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250801015427.439511-1-reyuki@gnuweeb.org> References: <20250801015427.439511-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