From 92d0262d8d204189ba4ad4cfb93747fdc1b445e0 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 24 Apr 2021 16:52:18 +0200 Subject: wireguard: T1802: generate QR code for clients on CLI generate wireguard mobile-config wg0 server wg.vyos.net address 1.2.2.2/24 WireGuard client configuration for interface: wg0 [Interface] PrivateKey = AEXrZ4b3xFVLg1lql3hy/93+d43q3+3vPdSMUGI6/Fo= Address = 1.2.2.2/24 [Peer] PublicKey = h1HkYlSuHdJN6Qv4Hz4bBzjGg5WUty+U1L7DJsZy1iE= Endpoint = wg.vyos.net:41751 AllowedIPs = 0.0.0.0/0, ::/0 The servers public key and port are automatically extracter from the running config. (cherry picked from commit 92d62740a1dd84d27ed3006cdc8d2560673f6bca) --- op-mode-definitions/wireguard.xml.in | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'op-mode-definitions/wireguard.xml.in') diff --git a/op-mode-definitions/wireguard.xml.in b/op-mode-definitions/wireguard.xml.in index 69ba8043d..9cc979b7b 100644 --- a/op-mode-definitions/wireguard.xml.in +++ b/op-mode-definitions/wireguard.xml.in @@ -26,6 +26,38 @@ sudo ${vyos_op_scripts_dir}/wireguard.py --genkey --location "$4" + + + Generate QR code and movile configuration for Wireguard interface + + + + + + + + IP address or FQDN the client will connect to + + + <hostname> + + + sudo ${vyos_op_scripts_dir}/wireguard_client.py --interface "$4" --server "$6" + + + + IPv4/IPv6 address used on the client side + + + <hostname> + + + sudo ${vyos_op_scripts_dir}/wireguard_client.py --interface "$4" --server "$6" --address "$8" + + + + + @@ -73,7 +105,7 @@ - sudo ${vyos_op_scripts_dir}/wireguard.py --showinterface "$4" + sudo ${vyos_op_scripts_dir}/wireguard.py --showinterface "$4" -- cgit v1.2.3