summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/appendix/http-api.rst54
-rw-r--r--docs/configuration-overview.rst9
-rw-r--r--docs/services/dhcp.rst11
3 files changed, 61 insertions, 13 deletions
diff --git a/docs/appendix/http-api.rst b/docs/appendix/http-api.rst
index 945a2518..1a78fecc 100644
--- a/docs/appendix/http-api.rst
+++ b/docs/appendix/http-api.rst
@@ -87,3 +87,57 @@ It will returns:
{"success": true, "data": " /* So very dummy */\n dummy dum0 {\n address 192.168.168.1/32\n address 192.168.168.2/32\n /* That is a description */\n description \"Test interface\"\n }\n dummy dum1 {\n address 203.0.113.76/32\n address 203.0.113.79/32\n }\n", "error": null}
+Opmode
+------
+
+It is possible to run show and generate commands outside configure.
+
+
+Request:
+
+.. code-block:: none
+
+ curl -X POST -F key=mykey https://myip/generate --insecure -F data='{"cmd": "wireguard preshared-key"}'
+
+Response:
+
+.. code-block:: none
+
+ {"success": true, "data": "wxxxxxxxfHJj/aDWf0qg0=\n", "error": null}
+
+Request:
+
+.. code-block:: none
+
+ curl -X POST -F key=mykey https://myip/show --insecure -F data='{"cmd": "wireguard keypairs pubkey default"}'
+
+Response:
+
+.. code-block:: none
+
+ {"success": true, "data": "<<censored_but_right_key>>\n", "error": null}
+
+Request:
+
+.. code-block:: none
+
+ curl -X POST -F key=mykey https://myip/show --insecure -F data='{"cmd": "wireguard keypairs pubkey default"}'
+
+Response:
+
+.. code-block:: none
+
+ {"success": true, "data": "<<censored_but_right_key>>\n", "error": null}
+
+Request:
+
+.. code-block:: none
+
+ curl -s -k -X POST -F data='{"op": "show", "path": ["ip", "route"]}' -F key=mykey https://myip:44302/show
+
+Response:
+
+.. code-block:: none
+
+ {"success": true, "data": "Codes: K - kernel route, C - connected, S - static, R - RIP,\n O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,\n T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,\n F - PBR, f - OpenFabric,\n > - selected route, * - FIB route, q - queued route, r - rejected route\n\nS>* 0.0.0.0/0 [210/0] via 10.3.0.1, eth0, 12:42:53\nC>* 10.3.0.0/24 is directly connected, eth0, 12:42:53\nS>* 10.10.10.0/24 [1/0] via 10.3.0.1, eth0, 12:42:53\nS>* 10.10.11.0/24 [1/0] via 10.3.0.1, eth0, 12:42:53\nS>* 169.254.169.254/32 [210/0] via 10.3.0.3, eth0, 12:42:53\n", "error": null}
+
diff --git a/docs/configuration-overview.rst b/docs/configuration-overview.rst
index 51091d9d..cbc4ab3b 100644
--- a/docs/configuration-overview.rst
+++ b/docs/configuration-overview.rst
@@ -247,11 +247,10 @@ Comment
Add comment as an annotation to a configuration node.
- The ``comment` command allows you to insert a comment above the
- ``<config node>`` configuration section. Comments are enclosed with
- ``/*`` and ``*/`` as open/close delimiters. A ``comment`` cannot be
- used at the top of the configuration hierarchy, only on subsections.
- Comments need to be commited, just like other config changes.
+ The ``comment`` command allows you to insert a comment above the
+ ``<config node>`` configuration section. When shown, comments are
+ enclosed with ``/*`` and ``*/`` as open/close delimiters. Comments
+ need to be commited, just like other config changes.
To remove an existing comment from your current configuration,
specify an empty string enclosed in double quote marks (``""``) as
diff --git a/docs/services/dhcp.rst b/docs/services/dhcp.rst
index c8b26263..2e8bb4b0 100644
--- a/docs/services/dhcp.rst
+++ b/docs/services/dhcp.rst
@@ -480,15 +480,10 @@ Configuration Options
Specify a NIS+ server address for DHCPv6 clients.
-.. cfgcmd:: set service dhcpv6-server shared-network-name <name> subnet <prefix> sip-server-address <address>
+.. cfgcmd:: set service dhcpv6-server shared-network-name <name> subnet <prefix> sip-server <address | fqdn>
- Specify a :abbr:`SIP (Session Initiation Protocol)` server by IPv6 address
- for all DHCPv6 clients.
-
-.. cfgcmd:: set service dhcpv6-server shared-network-name <name> subnet <prefix> sip-server-name <fqdn>
-
- Specify a :abbr:`SIP (Session Initiation Protocol)` server by FQDN for all
- DHCPv6 clients.
+ Specify a :abbr:`SIP (Session Initiation Protocol)` server by IPv6
+ address of Fully Qualified Domain Name for all DHCPv6 clients.
.. cfgcmd:: set service dhcpv6-server shared-network-name <name> subnet <prefix> sntp-server-address <address>