Skip to content

luci-app-wireguard: convert to JavaScript #5323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
luci-app-wireguard: merge app and proto rpcd
Signed-off-by: lvoegl <lvoegl@tdt.de>
  • Loading branch information
lvoegl committed Sep 17, 2021
commit d98935c45b7affde6b5323d87473ea82736a1335
2 changes: 1 addition & 1 deletion applications/luci-app-wireguard/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk

LUCI_TITLE:=WireGuard Status
LUCI_DEPENDS:=+wireguard-tools +luci-proto-wireguard
LUCI_DEPENDS:=+wireguard-tools
LUCI_PKGARCH:=all

include ../../luci.mk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


var callGetWgInstances = rpc.declare({
object: 'luci.wireguard_status',
object: 'luci.wireguard',
method: 'getWgInstances'
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ local io = require "io"
local uci = require "uci"

local methods = {
generateKeyPair = {
call = function()
local prv = sys.exec("wg genkey 2>/dev/null"):sub(1, -2)
local pub = sys.exec("echo '" .. prv .. "' | wg pubkey 2>/dev/null"):sub(1, -2)

return {keys = {priv = prv, pub = pub}}
end
},
getWgInstances = {
call = function()
local data = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Grant access to LuCI app wireguard",
"read": {
"ubus": {
"luci.wireguard_status": [
"luci.wireguard": [
"getWgInstances"
]
}
Expand Down
2 changes: 1 addition & 1 deletion protocols/luci-proto-wireguard/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk

LUCI_TITLE:=Support for WireGuard VPN
LUCI_DEPENDS:=+wireguard-tools
LUCI_DEPENDS:=+wireguard-tools +luci-app-wireguard
LUCI_PKGARCH:=all

include ../../luci.mk
Expand Down

This file was deleted.