diff options
author | Selva Nair | 2021-09-07 18:31:24 -0400 |
---|---|---|
committer | Gert Doering | 2022-12-27 09:29:56 +0100 |
commit | 125263804701f9e62a5a27587e4ea6afdb21f54d (patch) | |
tree | c917bc7be180dd8911456671e88222665b221f8c /doc | |
parent | 8516b4b3665aa94d3114194f33fbb9c34119ab71 (diff) | |
download | openvpn-125263804701f9e62a5a27587e4ea6afdb21f54d.zip openvpn-125263804701f9e62a5a27587e4ea6afdb21f54d.tar.gz |
Add remote-count and remote-entry query via management
Selecting the remote host via the management interface
(management-query-remote) provides a restrictive user
experience as there is no easy way to tabulate all available
remote entries and show a list to the user to choose from.
Fix that.
Two new commands for querying the management interface are added:
(i) remote-entry-count : returns the number of remotes specified
in the config file. Example result:
10
END
(ii) remote-entry-get i [j]: returns the remote entry at index i
in the form index,host,port,protocol. Or, if j is present
all entries from index i to j-1 are returned, one per line.
Example result for i = 2:
2,ovpn.example.com,1194,udp
END
Example result for i = 2, j = 4
2,ovpn.example.com,1194,udp
3,ovpn.example.com,443,tcp-client
END
remote-entry-get all: returns all remote entries.
v2: use independent callback functions for the two commands
v3: return results as 0 or more lines terminated by END, as done
for all other similar commands. v1 was fashioned after
pkcs11-id-count and pkcs11-id-get which uses a format not
consistent with the rest of the management commands.
See also management-notes.txt
Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20210907223126.8440-1-selva.nair@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22815.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/management-notes.txt | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/doc/management-notes.txt b/doc/management-notes.txt index 7bb10c2..60d46d6 100644 --- a/doc/management-notes.txt +++ b/doc/management-notes.txt @@ -785,6 +785,66 @@ Immediately kill a client instance by CID. CID -- client ID. See documentation for ">CLIENT:" notification for more info. +COMMAND -- remote-entry-count (OpenVPN 2.6+ management version > 3) +------------------------------------------------------------------- + +Retrieve available number of remote host/port entries + +Example: + + Management interface client sends: + + remote-entry-count + + OpenVPN daemon responds with + + 5 + END + +COMMAND -- remote-entry-get (OpenVPN 2.6+ management version > 3) +------------------------------------------------------------------ + + remote-entry-get <start> [<end>] + +Retrieve remote entry (host, port and protocol) for index +<start> or indices from <start> to <end>+1. Alternatively +<start> = "all" retrieves all remote entries. + +Example 1: + + Management interface client sends: + + remote-entry-get 1 + + OpenVPN daemon responds with + + 1,vpn.example.com,1194,udp + END + +Example 2: + + Management interface client sends: + + remote-entry-get 1 3 + + OpenVPN daemon responds with + + 1,vpn.example.com,1194,udp + 2,vpn.example.net,443,tcp-client + END + +Example 3: + Management interface client sends: + + remote-entry-get all + + OpenVPN daemon with 3 connection entries responds with + + 1,vpn.example.com,1194,udp + 2,vpn.example.com,443,tcp-client + 3,vpn.example.net,443,udp + END + COMMAND -- remote (OpenVPN AS 2.1.5/OpenVPN 2.3 or higher) -------------------------------------------- |