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=1754452657; 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=BBCCkb/rOI5J7Q1m7aOWYiRBqQYhyb/Ak7baFxUab5S0JoFR4gt6cu0kv+XGwr+0S lEPIKvzz+8YtlSzHZS+SdUJNMLeqyHt3qGMeQ6TyjMwbeoaQXK+g7iK8NlVOWl1IYE 7+OJUO0rSCP73B1mFZVhHlwYhrcFy1PZsZIRSABQCXhTMGFRmfGoTmpyKcQNSkL+G4 T8wcmTNltxymJXUt9jqIGgQmdfO7idNKTYBsqfFz+0RG7cRmhGdnMUsdQHJbJI8WB7 QRIopFBVqXo00dbavJSHhsqvlnvv930TERInjVHhCf6M+dpeEa78vxV3F7K3ge4oef /WXVDY7E2j7dA== Received: from zero (unknown [182.253.228.106]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id B47633127C3A; Wed, 6 Aug 2025 03:57:36 +0000 (UTC) From: Ahmad Gani To: Ammar Faizi Cc: Ahmad Gani , Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: [PATCH gwproxy v4 3/6] dnslookup: Allow only port string number Date: Wed, 6 Aug 2025 10:57:21 +0700 Message-ID: <20250806035727.216702-4-reyuki@gnuweeb.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250806035727.216702-1-reyuki@gnuweeb.org> References: <20250806035727.216702-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