forked from freifunk-gluon/community-packages
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support wgkex loadbalancing mechanism
- Loading branch information
1 parent
524c9f1
commit bf1eacc
Showing
4 changed files
with
128 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
include $(TOPDIR)/rules.mk | ||
|
||
PKG_NAME:=ffmuc-mesh-vpn-wireguard-vxlan | ||
PKG_VERSION:=1 | ||
PKG_VERSION:=2 | ||
PKG_RELEASE:=1 | ||
|
||
PKG_MAINTAINER:=Annika Wickert <[email protected]> | ||
|
@@ -11,7 +11,7 @@ include $(TOPDIR)/../package/gluon.mk | |
|
||
define Package/ffmuc-mesh-vpn-wireguard-vxlan | ||
TITLE:=Support for connecting meshes via wireguard | ||
DEPENDS:=+gluon-mesh-vpn-core +micrond +kmod-wireguard +wireguard-tools +ip-full | ||
DEPENDS:=+gluon-mesh-vpn-core +micrond +kmod-wireguard +wireguard-tools +ip-full +lua-jsonc | ||
endef | ||
|
||
$(eval $(call BuildPackageGluon,ffmuc-mesh-vpn-wireguard-vxlan)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...-vpn-wireguard-vxlan/luasrc/lib/gluon/gluon-mesh-wireguard-vxlan/parse-wgkex-response.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
local json = require 'jsonc' | ||
|
||
local input = assert(arg[1]) | ||
local data = assert(json.parse(input)) | ||
if not data.Endpoint or not data.Endpoint.Address or not data.Endpoint.Port | ||
or not data.Endpoint.PublicKey or not data.Endpoint.AllowedIPs or not data.Endpoint.AllowedIPs[1] then | ||
error("Malformed JSON response, missing required value") | ||
end | ||
print(data.Endpoint.Address) | ||
print(data.Endpoint.Port) | ||
print(data.Endpoint.PublicKey) | ||
print(data.Endpoint.AllowedIPs[1]) |