From 23a4dd23e0932f836f8f9f18833dae2345de28e7 Mon Sep 17 00:00:00 2001 From: jkoschke Date: Wed, 12 Jan 2022 23:20:46 +0100 Subject: [PATCH] added initial tinc config --- tinc-homeassistant/Dockerfile | 25 +++++++++++++++++++++++++ tinc-homeassistant/config.yaml | 17 +++++++++++++++++ tinc-homeassistant/run.sh | 3 +++ tinc-homeassistant/tinc-down | 1 + tinc-homeassistant/tinc-up | 1 + 5 files changed, 47 insertions(+) create mode 100644 tinc-homeassistant/Dockerfile create mode 100644 tinc-homeassistant/config.yaml create mode 100644 tinc-homeassistant/run.sh create mode 100644 tinc-homeassistant/tinc-down create mode 100644 tinc-homeassistant/tinc-up diff --git a/tinc-homeassistant/Dockerfile b/tinc-homeassistant/Dockerfile new file mode 100644 index 0000000..d96c4b9 --- /dev/null +++ b/tinc-homeassistant/Dockerfile @@ -0,0 +1,25 @@ +ARG BUILD_FROM +FROM $BUILD_FROM + + + +RUN sudo apt-get update +RUN sudo apt-get install tinc + +EXPOSE 655/tcp 655/udp + +VOLUME [ "/etc/tinc" ] +ENTRYPOINT [ "/usr/sbin/tinc" ] + + +COPY run.sh / +COPY tinc-down / +COPY tinc-up / +RUN chmod a+x /run.sh +RUN chmod a+x /tinc-up +RUN chmod a+x /tinc-down +RUN mkdir hosts +RUN tincd -c . -K + +#CMD [ "/run.sh" ] +CMD [ "start" "-D" "-U" "nobody" ] \ No newline at end of file diff --git a/tinc-homeassistant/config.yaml b/tinc-homeassistant/config.yaml new file mode 100644 index 0000000..9595d3c --- /dev/null +++ b/tinc-homeassistant/config.yaml @@ -0,0 +1,17 @@ +name: "Tinc VPN" +description: "Addon to connect HASS via Tinc VPN" +version: "1.0.0" +slug: "hassio_tinc" +arch: + - aarch64 + - amd64 + - armhf + - armv7 + - i386 +ports: + - 655/tcp: 655 + - 655/udp: 655 +options: + name: "hassio" +schema: + name: str \ No newline at end of file diff --git a/tinc-homeassistant/run.sh b/tinc-homeassistant/run.sh new file mode 100644 index 0000000..c73e2dd --- /dev/null +++ b/tinc-homeassistant/run.sh @@ -0,0 +1,3 @@ +#!/usr/bin/with-contenv bashio + +echo "Hello world!" diff --git a/tinc-homeassistant/tinc-down b/tinc-homeassistant/tinc-down new file mode 100644 index 0000000..3463ba7 --- /dev/null +++ b/tinc-homeassistant/tinc-down @@ -0,0 +1 @@ +ifconfig $INTERFACE down \ No newline at end of file diff --git a/tinc-homeassistant/tinc-up b/tinc-homeassistant/tinc-up new file mode 100644 index 0000000..70b73d6 --- /dev/null +++ b/tinc-homeassistant/tinc-up @@ -0,0 +1 @@ +ifconfig $INTERFACE 10.0.0.1 netmask 255.255.255.0 \ No newline at end of file