summaryrefslogtreecommitdiffhomepage
path: root/protocols/luci-proto-wireguard/root/usr/share
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-05-17 15:45:20 +0200
committerJo-Philipp Wich <jo@mein.io>2022-05-17 15:45:20 +0200
commit9ba20645b01aacb391ab8c69f57b3da60db8f630 (patch)
tree71144e46bb8d1990aa897347697adf0f4057471f /protocols/luci-proto-wireguard/root/usr/share
parentc19020b2a4236945c1ad4a699ebb761a5dd7dc1f (diff)
luci-proto-wireguard: rewrite protocol handler
This commit rewrites large chunks of the WireGuard protocol handler in order to simplify the process of importing and exporting configuration. The major changes are: 1) The wireguard interface configuration tab (General Settings) gained an import assistant which allows dragging or pasting a native WireGuard configuration file in order to import required settrings into uci 2) The peer configuration tab gained a similar import assistant which allows importing the settings for a WireGuard peer from an existing native WireGuard configuration file 3) The QR code export feature has been rewritten to make the resulting codes actually useful for importing into a WireGuard client application. Additionally the plaintext native WireGuard configuration is displayed to allow copy-pasting it for use on a Linux or OS X system Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'protocols/luci-proto-wireguard/root/usr/share')
-rw-r--r--protocols/luci-proto-wireguard/root/usr/share/rpcd/acl.d/luci-wireguard.json6
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/luci-proto-wireguard/root/usr/share/rpcd/acl.d/luci-wireguard.json b/protocols/luci-proto-wireguard/root/usr/share/rpcd/acl.d/luci-wireguard.json
index 9d0a561411..079be14793 100644
--- a/protocols/luci-proto-wireguard/root/usr/share/rpcd/acl.d/luci-wireguard.json
+++ b/protocols/luci-proto-wireguard/root/usr/share/rpcd/acl.d/luci-wireguard.json
@@ -1,12 +1,16 @@
{
"luci-proto-wireguard": {
"description": "Grant access to LuCI Wireguard procedures",
+ "read": {
+ "file": {
+ "/usr/bin/qrencode --inline --8bit --type=SVG --output=- -- *": [ "exec" ]
+ }
+ },
"write": {
"ubus": {
"luci.wireguard": [
"generateKeyPair",
"getPublicAndPrivateKeyFromPrivate",
- "generateQrCode",
"generatePsk"
]
}