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.
ffmuc-mesh-vpn-wireguard: enable loadbalancing (freifunk-gluon#100)
* ffmuc-mesh-vpn-wireguard: Add support for the server-side loadbalancing with wgkex v0.2.0+ --------- Co-authored-by: Grische <2787581+grische@users.noreply.github.com> Co-authored-by: DasSkelett <dasskelett@gmail.com> Co-authored-by: Tobias <tobias-m99@gmx.de>
- Loading branch information
1 parent
df6e490
commit 9fc30b8
Showing
6 changed files
with
216 additions
and
52 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
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
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]) |
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