projects
/
project
/
unetd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f0aecf
)
example: create wireguard and tunnel device
author
Felix Fietkau
<nbd@nbd.name>
Thu, 23 Jun 2022 08:46:19 +0000
(10:46 +0200)
committer
Felix Fietkau
<nbd@nbd.name>
Thu, 23 Jun 2022 08:46:19 +0000
(10:46 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
examples/test-net0.sh
patch
|
blob
|
history
diff --git
a/examples/test-net0.sh
b/examples/test-net0.sh
index 5089ee1f7133a5aab02007dcb73ad05dd2d36778..06de301175a09105ad9ec3f3de5b1209b7dbae52 100755
(executable)
--- a/
examples/test-net0.sh
+++ b/
examples/test-net0.sh
@@
-2,10
+2,15
@@
ifname="${1:-wg0}"
host="${2:-ap1}"
+ip link add dev $ifname type wireguard > /dev/null 2>&1
+
../unetd -d -h $PWD/hosts -N '{
"name": "'"$ifname"'",
"type": "file",
"key": "'"$(cat ./net0-${host}.key)"'",
"file": "'"$PWD/net0.json"'",
+ "tunnels": {
+ "vx0": "l2-tunnel"
+ },
"update-cmd": "'"$PWD/../scripts/update-cmd.pl"'"
}'