0
0
mirror of https://github.com/OpenVPN/openvpn.git synced 2024-09-20 12:02:28 +02:00
openvpn/doc/man-sections/plugin-options.rst
David Sommerseth f500c49c8e doc/man: convert openvpn.8 to split-up .rst files
To avoid keeping around a full-size openvpn.rst file which is never
needed but will take space in the repo forever, patches 01...04
of the big documentation overhaul projects were squashed togehter,
keeping the individual commit logs and URL references below.

Signed-off-by: Gert Doering <gert@greenie.muc.de>

* This is a combination of 4 commits.
* This is the 1st commit message:

doc/man: Add an .rst formatted version of the man page

This is the first step to move away from a manually editing g/nroff
encoded man page.

Some modifications was needed to ensure formatting was consistent and
rendered reasonably okay in GitHub and that the generated man page
(using rst2man) is looking as a proper man page.  Unsupported options
has also been moved into its own section.  HTML rendering directly
using rst2html has also been used to validate the conversion.

The rst2man and rst2html utilities comes from the python-docutils
project: https://docutils.sourceforge.io/

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200716225338.611-2-davids@openvpn.net>
URL: https://sourceforge.net/p/openvpn/mailman/message/37063370/
Signed-off-by: Gert Doering <gert@greenie.muc.de>

* This is the commit message #2:

doc/man: Replace old man page with generated man page

The doc/openvpn.8 and doc/openvpn.8.html files are now being removed
from the git tree, as it will be generated from the doc/openvpn.8.rst
file using python-docutils.

An additional dist-hook is added so these files are generated
automatically when source tarballs are generated for releases.  This
means users compiling directly from the source tarball will not need
python-docutils installed.

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200716225338.611-3-davids@openvpn.net>
URL: https://sourceforge.net/p/openvpn/mailman/message/37063373/
Signed-off-by: Gert Doering <gert@greenie.muc.de>

* This is the commit message #3:

doc/man: Split up and reorganize main man page

The openvpn.8.rst file is quite long and hard to edit, as it covers
several hundred options.  Some options were even documented multiple
places.  The example has also received some attention, cleaning up
old and outdated infomration.

In this commit the main man page is split up into multiple sections
and options are sorted into each of the corresponding section.
Inside each category, each option is for now sorted alphabetically.
The main openvpn.8.rst file is currently kept unchanged and will be
handled in the next commit.

Many language improvements contributed by Richard Bonhomme has also
been incorproated.

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200716225338.611-4-davids@openvpn.net>
URL: https://sourceforge.net/p/openvpn/mailman/message/37063376/
Signed-off-by: Gert Doering <gert@greenie.muc.de>

* This is the commit message #4:

doc/man: Complete openvpn.8.rst splitting

This rebuilds the openvpn.8.rst content by using the text which was
split out in the previous commit by using RST ..include statements.

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200716225338.611-5-davids@openvpn.net>
URL: https://sourceforge.net/p/openvpn/mailman/message/37063377/
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2020-07-17 11:23:18 +02:00

58 lines
2.3 KiB
ReStructuredText

Plug-in Interface Options
-------------------------
OpenVPN can be extended by loading external plug-in modules at runtime. These
plug-ins must be prebuilt and adhere to the OpenVPN Plug-In API.
--plugin args
Loads an OpenVPN plug-in module.
Valid syntax:
::
plugin module-name
plugin module-name "arguments"
The ``module-name`` needs to be the first
argument, indicating the plug-in to load. The second argument is an
optional init string which will be passed directly to the plug-in.
If the init consists of multiple arguments it must be enclosed in
double-quotes (\"). Multiple plugin modules may be loaded into one
OpenVPN process.
The ``module-name`` argument can be just a filename or a filename
with a relative or absolute path. The format of the filename and path
defines if the plug-in will be loaded from a default plug-in directory
or outside this directory.
::
--plugin path Effective directory used
===================== =============================
myplug.so DEFAULT_DIR/myplug.so
subdir/myplug.so DEFAULT_DIR/subdir/myplug.so
./subdir/myplug.so CWD/subdir/myplug.so
/usr/lib/my/plug.so /usr/lib/my/plug.so
``DEFAULT_DIR`` is replaced by the default plug-in directory, which is
configured at the build time of OpenVPN. ``CWD`` is the current directory
where OpenVPN was started or the directory OpenVPN have switched into
via the ``--cd`` option before the ``--plugin`` option.
For more information and examples on how to build OpenVPN plug-in
modules, see the README file in the ``plugin`` folder of the OpenVPN
source distribution.
If you are using an RPM install of OpenVPN, see
:code:`/usr/share/openvpn/plugin`. The documentation is in ``doc`` and
the actual plugin modules are in ``lib``.
Multiple plugin modules can be cascaded, and modules can be used in
tandem with scripts. The modules will be called by OpenVPN in the order
that they are declared in the config file. If both a plugin and script
are configured for the same callback, the script will be called last. If
the return code of the module/script controls an authentication function
(such as tls-verify, auth-user-pass-verify, or client-connect), then
every module and script must return success (:code:`0`) in order for the
connection to be authenticated.