[PATCH] Document --preresolve option

Sami Rusani via Openvpn-devel <[email protected]>
Newsgroups gmane.network.openvpn.devel
Message-ID <q2D43uJoozPKtfJvLVuPcngp0-9sjp_HkGFBfdR3bpOTXmPGoi5Fz__jvpLGvsEWHXC5lBnqny8sXX-kkN3zXoRTJmTLjA0mzKb9yG5A4K4=@pm.me>
Hi,

Please find attached a small documentation patch for OpenVPN/openvpn#532.

Thanks,Sami

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
0001-Document-preresolve-option.patch (application/octet-stream, 1.9 KB)
From ea8b0bb5fe93d7a240130c529a61a55ca5367304 Mon Sep 17 00:00:00 2001
From: Sami Rusani <[email protected]>
Date: Sat, 27 Jun 2026 21:03:51 +0200
Subject: [PATCH] Document --preresolve option

The option resolves configured remote, local, and proxy hostnames at
startup, but it was missing from both the usage text and the client
options man page.

GitHub: fixes OpenVPN/openvpn#532
---
 doc/man-sections/client-options.rst | 4 ++++
 src/openvpn/options.c               | 1 +
 2 files changed, 5 insertions(+)

diff --git a/doc/man-sections/client-options.rst b/doc/man-sections/client-options.rst
index 3ad9104..5d0148c 100644
--- a/doc/man-sections/client-options.rst
+++ b/doc/man-sections/client-options.rst
@@ -568,6 +568,10 @@ configuration.
   By default, ``--resolv-retry infinite`` is enabled. You can disable by
   setting n=0.
 
+--preresolve
+  Resolve configured ``--remote``, ``--local``, ``--http-proxy``, and
+  ``--socks-proxy`` hostnames at startup before opening the connection.
+
 --single-session
   After initially connecting to a remote peer, disallow any new
   connections. Using this option means that a remote peer cannot connect,
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index f414024..87218d4 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -175,6 +175,7 @@ static const char usage_message[] =
     "--resolv-retry n: If hostname resolve fails for --remote, retry\n"
     "                  resolve for n seconds before failing (disabled by default).\n"
     "                  Set n=\"infinite\" to retry indefinitely.\n"
+    "--preresolve    : Resolve configured --remote, --local, and proxy hostnames at startup.\n"
     "--float         : Allow remote to change its IP address/port, such as through\n"
     "                  DHCP (this is the default if --remote is not used).\n"
     "--ipchange cmd  : Run command cmd on remote ip address initial\n"
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.