Merge pull request #2483 from zx2c4/custom-wg-script

wireguard: use custom wg-quick
This commit is contained in:
Justin Cormack
2017-09-15 09:51:54 -07:00
committed by GitHub
5 changed files with 24 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
kernel:
image: linuxkit/kernel:4.9.43
image: linuxkit/kernel:4.9.49
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:851e9c3ad0574d640b733b92fdb26c368d2f7f8f
@@ -13,11 +13,11 @@ onboot:
image: linuxkit/dhcpcd:f3f5413abb78fae9020e35bd4788fa93df4530b7
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: wg0
image: linuxkit/ip:b084fd2ada446015e00e43a441bb0ae41ff8b227
image: linuxkit/ip:044287be54a62d1590dcd4d22543c1a1031479e6
net: new
binds:
- /etc/wireguard:/etc/wireguard
command: ["sh", "-c", "ip link set dev wg0 up; ip address add dev wg0 192.168.2.1/24; wg setconf wg0 /etc/wireguard/wg0.conf; wg show wg0"]
command: ["/usr/bin/lk-wg-config", "configure", "/etc/wireguard/wg0.conf"]
runtime:
interfaces:
- name: wg0
@@ -26,11 +26,11 @@ onboot:
bindNS:
net: /run/netns/wg0
- name: wg1
image: linuxkit/ip:b084fd2ada446015e00e43a441bb0ae41ff8b227
image: linuxkit/ip:044287be54a62d1590dcd4d22543c1a1031479e6
net: new
binds:
- /etc/wireguard:/etc/wireguard
command: ["sh", "-c", "ip link set dev wg1 up; ip address add dev wg1 192.168.2.2/24; wg setconf wg1 /etc/wireguard/wg1.conf; wg show wg1"]
command: ["/usr/bin/lk-wg-config", "configure", "/etc/wireguard/wg1.conf"]
runtime:
interfaces:
- name: wg1
@@ -40,7 +40,7 @@ onboot:
net: /run/netns/wg1
services:
- name: getty
image: linuxkit/getty:797cb79e0a229fcd16ebf44a0da74bcec03968ec
image: linuxkit/getty:48870d0f92c65fecd6ddb18004d68d85f9b9cde3
env:
- INSECURE=true
net: /run/netns/wg1
@@ -58,7 +58,9 @@ services:
files:
- path: etc/wireguard/wg0.conf
contents: |
[Interface]
[Interface]
Address = 192.168.2.1/24
DNS = 192.168.2.2
PrivateKey = KG7EKkHDkp7THfW5mOXcZzo3RbGAjq+ARMfJGFm5G1s=
ListenPort = 51820
[Peer]
@@ -68,6 +70,7 @@ files:
- path: etc/wireguard/wg1.conf
contents: |
[Interface]
Address = 192.168.2.2/24
PrivateKey = SCGCKDuTm4PMOw+LXdK/2s8mxnv145QHOohKRq3vc2A=
ListenPort = 51821
[Peer]