[Openvpn-devel,v1] proxy-options.rst: Add proper documentation for --http-proxy-user-pass

Message ID 20240118164903.22519-1-gert@greenie.muc.de
State Accepted
Headers show
Series [Openvpn-devel,v1] proxy-options.rst: Add proper documentation for --http-proxy-user-pass | expand

Commit Message

Gert Doering Jan. 18, 2024, 4:49 p.m. UTC
From: Frank Lichtenheld <frank@lichtenheld.com>

And extend examples section for authenticated HTTP proxies because
is was misleading.

Change-Id: I7a754d0b4a76a9227bf922f65176cd9ec4d7670c
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/498
This mail reflects revision 1 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <gert@greenie.muc.de>

Comments

Gert Doering Jan. 18, 2024, 5:06 p.m. UTC | #1
Your patch has been applied to the master and release/2.6 branch (docs).

(2.6 needed conflict resultion because of the "NTLMv1 has been removed"
line)

commit d3f84afedd33734416704d5d92e8d3ac639ef491 (master)
commit 7b1f2009ce9670e2e0ffea0c01b1c4922a2d4369 (release/2.6)
Author: Frank Lichtenheld
Date:   Thu Jan 18 17:49:03 2024 +0100

     proxy-options.rst: Add proper documentation for --http-proxy-user-pass

     Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20240118164903.22519-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28083.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/doc/man-sections/proxy-options.rst b/doc/man-sections/proxy-options.rst
index 9cf311f..ad49c60 100644
--- a/doc/man-sections/proxy-options.rst
+++ b/doc/man-sections/proxy-options.rst
@@ -4,7 +4,7 @@ 
   is required, a file name to an ``authfile`` file containing a username
   and password on 2 lines can be given, or :code:`stdin` to prompt from
   console. Its content can also be specified in the config file with the
-  ``--http-proxy-user-pass`` option. (See section on inline files)
+  ``--http-proxy-user-pass`` option (See `INLINE FILE SUPPORT`_).
 
   The last optional argument is an ``auth-method`` which should be one
   of :code:`none`, :code:`basic`, or :code:`ntlm2`.
@@ -25,14 +25,43 @@ 
   Examples:
   ::
 
+     # no authentication
      http-proxy proxy.example.net 3128
+     # basic authentication, load credentials from file
      http-proxy proxy.example.net 3128 authfile.txt
+     # basic authentication, ask user for credentials
      http-proxy proxy.example.net 3128 stdin
-     http-proxy proxy.example.net 3128 auto basic
-     http-proxy proxy.example.net 3128 auto-nct ntlm2
+     # NTLM authentication, load credentials from file
+     http-proxy proxy.example.net 3128 authfile.txt ntlm2
+     # determine which authentication is required, ask user for credentials
+     http-proxy proxy.example.net 3128 auto
+     # determine which authentication is required, but reject basic
+     http-proxy proxy.example.net 3128 auto-nct
+     # determine which authentication is required, but set credentials
+     http-proxy proxy.example.net 3128 auto
+     http-proxy-user-pass authfile.txt
+     # basic authentication, specify credentials inline
+     http-proxy proxy.example.net 3128 "" basic
+     <http-proxy-user-pass>
+     username
+     password
+     </http-proxy-user-pass>
 
   Note that support for NTLMv1 proxies was removed with OpenVPN 2.7.
 
+--http-proxy-user-pass userpass
+  Overwrite the username/password information for ``--http-proxy``. If specified
+  as an inline option (see `INLINE FILE SUPPORT`_), it will be interpreted as
+  username/password separated by a newline. When specified on the command line
+  it is interpreted as a filename same as the third argument to ``--http-proxy``.
+
+  Example::
+
+    <http-proxy-user-pass>
+    username
+    password
+    </http-proxy-user-pass>
+
 --http-proxy-option args
   Set extended HTTP proxy options. Requires an option ``type`` as argument
   and an optional ``parameter`` to the type.  Repeat to set multiple