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=1759389657; bh=WKGY7MQ6MSQbpmUDXEbp8zAyy6XFqk/m7j/+/BLeQms=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type: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=pQ1rLQu0Wy++/8jJJMLZH4+/MRehLIsjEG2chfRiP+8XWyQ1lvTbwWiTulE1uUWfh ZXEQjnzbxgwQXjqdRvAq8ycpbyrQzBxyLCE2qIUS9MlkND8jkwSwSS4EnNJBi5chuw 5/H213m50YfoqqX8lx911mIPPWGbQmKDbnOgPHJclwBI6YqCLzVQIiCarvI31Ce2tQ fUvgq/zmOGo3qWjGklhQhaGy9LoZthEC7gUlSFg4zH32pgFyCbMHCqRyI4oWicDpHm UrPGFG27yYBuxLhAm8ttHTPFLAVhtR0zzhafnYkcxdHXlEfKqX84AxMsTEiUcIQpP8 E17Gq/9vxx7Kg== Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id 82BBD3127974 for ; Thu, 2 Oct 2025 07:20:57 +0000 (UTC) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-267f0fe72a1so5070295ad.2 for ; Thu, 02 Oct 2025 00:20:57 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWLypI9rJRVnIWcMQ8e/yvSGpGpqU2rToEZWJOPTJMQUndVcTuHgXgE5D160Dvo7mTVtWne@vger.gnuweeb.org X-Gm-Message-State: AOJu0YyLLU4Y9bJxg64gCSKg9ouew4NeOY4f/gSLDVQ6ArrzZhGik1xt nznUi+apXTrG/0VAeiuFo612RQU+PDco75/gIdqTgdOud7iMeY+1l7jIdHnMfVASyf/yiZr7uP8 Fl5GTjP0MvuxfThus5ZrwGe/kk0FkO7s= X-Google-Smtp-Source: AGHT+IHwRrUrxhvOdWbBd6QDjQZnDIeSLUThFaDVugdAkkeYx3TKrVS6PDwDhq+yUp8Uc5CP6yYuO/fahJX35kWQdEg= X-Received: by 2002:a17:903:1b46:b0:24e:3cf2:2450 with SMTP id d9443c01a7336-28e7f28e79bmr75622165ad.2.1759389655861; Thu, 02 Oct 2025 00:20:55 -0700 (PDT) MIME-Version: 1.0 References: <20250930085428.717195-1-alviro.iskandar@gnuweeb.org> <20251002070502.GA18177-ammarfaizi2@gnuweeb.org> In-Reply-To: <20251002070502.GA18177-ammarfaizi2@gnuweeb.org> From: Alviro Iskandar Setiawan Date: Thu, 2 Oct 2025 14:20:44 +0700 X-Gmail-Original-Message-ID: X-Gm-Features: AS18NWAlFjUj1YYmRYkkeTnpZ1eyB9FVKyNDrmyC7dKfIMalYyC4chKAIpnqegs Message-ID: Subject: Re: [PATCH gwproxy v13 0/8] Initial work on integration of DNS parser lib in gwproxy To: Ammar Faizi Cc: Ahmad Gani , "GNU/Weeb Mailing List" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: On Thu, Oct 2, 2025 at 2:05=E2=80=AFPM Ammar Faizi wrote: > It fails to connect when "socks5h" protocol is used. ic ic, I think I found the problem. In short, we should resend the UDP buffer if gwp_dns_res_complete_query() throws -EAGAIN. How does it work? * First, the DNS resolver will try to resolve IPv4 first if --socks5-prefer-ipv6 is not used. * If no IPv4 record is not found and it has the ability to go with IPv6, gwp_dns_res_complete_query() will return -EAGAIN and fill the UDP buffer with IPv6 resolution payload. * The resolver is expected to send the IPv6 resolution payload in that case, but my code didn't handle that. Can you test this patch and confirm if it fixes the problem? https://gist.githubusercontent.com/alviroiskandar/f8d5b3ce7f30753613646508d= d7ef356/raw/be63c7b68e9f576e7904fa21ee13857b1b3031b1/ipv6_fix.diff