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

@@ -11,11 +11,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
@@ -24,11 +24,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
@@ -66,7 +66,8 @@ services:
files:
- path: etc/wireguard/wg0.conf
contents: |
[Interface]
[Interface]
Address = 192.168.2.1/24
PrivateKey = KG7EKkHDkp7THfW5mOXcZzo3RbGAjq+ARMfJGFm5G1s=
ListenPort = 51820
[Peer]
@@ -76,6 +77,7 @@ files:
- path: etc/wireguard/wg1.conf
contents: |
[Interface]
Address = 192.168.2.2/24
PrivateKey = SCGCKDuTm4PMOw+LXdK/2s8mxnv145QHOohKRq3vc2A=
ListenPort = 51821
[Peer]