From 936056907a49c6784412727a4b5b12b7e536421a Mon Sep 17 00:00:00 2001 From: Fabio Bigmoby Mauro Date: Fri, 12 Nov 2021 19:27:26 +0100 Subject: [PATCH] Migrate JSON config to YAML --- wireguard_client/Dockerfile | 2 +- wireguard_client/build.json | 9 ----- wireguard_client/build.yaml | 7 ++++ wireguard_client/config.json | 75 ------------------------------------ wireguard_client/config.yaml | 55 ++++++++++++++++++++++++++ 5 files changed, 63 insertions(+), 85 deletions(-) delete mode 100644 wireguard_client/build.json create mode 100644 wireguard_client/build.yaml delete mode 100755 wireguard_client/config.json create mode 100644 wireguard_client/config.yaml diff --git a/wireguard_client/Dockerfile b/wireguard_client/Dockerfile index 0950bc0..66ee3b9 100755 --- a/wireguard_client/Dockerfile +++ b/wireguard_client/Dockerfile @@ -1,4 +1,4 @@ -ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:10.0.1 +ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:10.2.2 # hadolint ignore=DL3006 FROM ${BUILD_FROM} diff --git a/wireguard_client/build.json b/wireguard_client/build.json deleted file mode 100644 index 6fa2926..0000000 --- a/wireguard_client/build.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "build_from": { - "aarch64": "ghcr.io/hassio-addons/base/aarch64:10.0.1", - "amd64": "ghcr.io/hassio-addons/base/amd64:10.0.1", - "armhf": "ghcr.io/hassio-addons/base/armhf:10.0.1", - "armv7": "ghcr.io/hassio-addons/base/armv7:10.0.1", - "i386": "ghcr.io/hassio-addons/base/i386:10.0.1" - } -} \ No newline at end of file diff --git a/wireguard_client/build.yaml b/wireguard_client/build.yaml new file mode 100644 index 0000000..ccb5afb --- /dev/null +++ b/wireguard_client/build.yaml @@ -0,0 +1,7 @@ +--- +build_from: + aarch64: ghcr.io/hassio-addons/base/aarch64:10.2.2 + amd64: ghcr.io/hassio-addons/base/amd64:10.2.2 + armhf: ghcr.io/hassio-addons/base/armhf:10.2.2 + armv7: ghcr.io/hassio-addons/base/armv7:10.2.2 + i386: ghcr.io/hassio-addons/base/i386:10.2.2 \ No newline at end of file diff --git a/wireguard_client/config.json b/wireguard_client/config.json deleted file mode 100755 index 87f41d9..0000000 --- a/wireguard_client/config.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name":"WireGuard Client", - "version":"0.1.8", - "slug":"wireguard_client", - "description":"Fast, modern, secure Wireguard tunnel (client)", - "url":"https://github.com/bigmoby/addon-wireguard-client", - "arch":[ - "aarch64", - "amd64", - "armhf", - "armv7", - "i386" - ], - "apparmor": true, - "host_network": true, - "init":false, - "full_access": false, - "ports":{ - "80/tcp": 80 - }, - "ports_description":{ - "80/tcp": "WireGuard client status API" - }, - "hassio_api":true, - "privileged":[ - "NET_ADMIN" - ], - "devices": ["/dev/net/tun"], - "map":[ - "ssl:rw" - ], - "options":{ - "interface":{ - "private_key": "password?", - "address": "10.6.0.2", - "dns":[ - "8.8.8.8", - "8.8.4.4" - ], - "post_up": "iptables -t nat -A POSTROUTING -o wg0 -j MASQUERADE", - "post_down": "iptables -t nat -D POSTROUTING -o wg0 -j MASQUERADE" - }, - "peer":{ - "public_key": "", - "pre_shared_key": "", - "endpoint": "xxxxxx.duckdns.com", - "allowed_ips":[ - "10.6.0.0/24" - ], - "persistent_keep_alive": "25" - } - }, - "schema":{ - "log_level":"list(trace|debug|info|notice|warning|error|fatal)?", - "interface":{ - "private_key": "password?", - "address": "str", - "dns":[ - "str" - ], - "post_up": "str", - "post_down": "str" - }, - "peer":{ - "public_key":"str?", - "pre_shared_key":"str?", - "endpoint":"str", - "allowed_ips":[ - "str" - ], - "persistent_keep_alive":"int" - } - }, - "image": "bigmoby/{arch}-addon-wireguard-client" - } diff --git a/wireguard_client/config.yaml b/wireguard_client/config.yaml new file mode 100644 index 0000000..d87ced4 --- /dev/null +++ b/wireguard_client/config.yaml @@ -0,0 +1,55 @@ +--- +name: WireGuard Client +version: 0.1.9 +slug: wireguard_client +description: Fast, modern, secure Wireguard tunnel (client) +url: https://github.com/bigmoby/addon-wireguard-client +arch: + - aarch64 + - amd64 + - armhf + - armv7 + - i386 +apparmor: true +host_network: true +init: false +ports: + 80/tcp: 80 +ports_description: + 80/tcp: WireGuard client status API +hassio_api: true +privileged: + - NET_ADMIN +devices: + - /dev/net/tun +map: + - ssl:rw +options: + interface: + private_key: "" + address: 10.6.0.2 + dns: [ 8.8.8.8, 8.8.4.4] + post_up: "iptables -t nat -A POSTROUTING -o wg0 -j MASQUERADE" + post_down: "iptables -t nat -D POSTROUTING -o wg0 -j MASQUERADE" + peer: + public_key: "" + pre_shared_key: "" + endpoint: "xxxxxx.duckdns.com:51820" + allowed_ips: [ "10.6.0.0/24" ] + persistent_keep_alive: "25" +schema: + log_level: list(trace|debug|info|notice|warning|error|fatal)? + interface: + private_key: password? + address: str + dns: + - str + post_up: str + post_down: str + peer: + public_key: str? + pre_shared_key: str? + endpoint: str + allowed_ips: + - str + persistent_keep_alive: int \ No newline at end of file