🎉 Release of add-on Cloudflared 1.0.0

This commit is contained in:
Brenner-Bot
2022-03-16 21:08:45 +00:00
parent a91e8b8f66
commit 159ad3366a
5 changed files with 77 additions and 64 deletions
+3 -3
View File
@@ -86,10 +86,10 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
[addon-cloudflared]: https://github.com/brenner-tobias/addon-cloudflared/tree/v0.7.0 [addon-cloudflared]: https://github.com/brenner-tobias/addon-cloudflared/tree/v1.0.0
[addon-doc-cloudflared]: https://github.com/brenner-tobias/addon-cloudflared/blob/v0.7.0/README.md [addon-doc-cloudflared]: https://github.com/brenner-tobias/addon-cloudflared/blob/v1.0.0/README.md
[cloudflared-issue]: https://github.com/brenner-tobias/addon-cloudflared/issues [cloudflared-issue]: https://github.com/brenner-tobias/addon-cloudflared/issues
[cloudflared-version-shield]: https://img.shields.io/badge/version-v0.7.0-blue.svg [cloudflared-version-shield]: https://img.shields.io/badge/version-v1.0.0-blue.svg
[cloudflared-aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg [cloudflared-aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
[cloudflared-amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg [cloudflared-amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
[cloudflared-armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg [cloudflared-armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg
+5 -10
View File
@@ -1,17 +1,12 @@
## Whats changed ## Whats changed
## 🚨 Breaking change 🚨 ## 🧰 Maintenance
It is now mandatory to add the option `warp_routes` if `warp_enable` is set to `true`, - First Stable Release @brenner-tobias (#76)
otherwise the add on will not start.
You can safely ignore this if you don't use the Cloudflare Warp functionality. ## 📚 Documentation
- Remove Manager API calls @elcajon (#72) - Documentation updates @elcajon (#73)
## 🚀 Enhancements
- Add image signing - CAS Codenotary @elcajon (#69)
## ⬆️ Dependency updates ## ⬆️ Dependency updates
- Bump docker/build-push-action from 2.9.0 to 2.10.0 @dependabot (#70) - ️ Update Cloudflared to version 2022.3.2 @github-actions (#74)
+67 -46
View File
@@ -32,26 +32,23 @@ use since the URL can change anytime.**
The installation of this add-on is pretty straightforward but requires some prerequisites The installation of this add-on is pretty straightforward but requires some prerequisites
and a manual step at the first set-up. and a manual step at the first set-up.
**Before starting, please make sure to remove all other add-ons or configuration ### Prerequisites
entries handling SSL certificates, domain names and so on (e.g. DuckDNS) and
restart your HomeAssistant instance.**
1. (Optional if you don't yet have a working Cloudflare set-up): 1. Before starting, please make sure to remove all other add-ons or configuration
entries handling SSL certificates, domain names and so on (e.g. DuckDNS) and
restart your HomeAssistant instance.
1. If you don't yet have a working Cloudflare set-up:
Get a domain name and set-up Cloudflare. See section Get a domain name and set-up Cloudflare. See section
[Domain Name and Cloudlfare Set-Up](#domain-name-and-cloudlfare-set-up) for details. [Domain Name and Cloudlfare Set-Up](#domain-name-and-cloudlfare-set-up) for details.
1. Add the `http` integration settings to your HA-config as described [below](#Configuration.yaml).
### Initial Add-on Setup
The following instructions describe the minimum necessary steps to use this add-on:
1. Add the `http` integration settings to your HA-config as described [below](#configurationyaml).
1. Set the `external_hostname` add-on option with your domain name or a subdomain 1. Set the `external_hostname` add-on option with your domain name or a subdomain
that you want to use to access Home Assistant. that you want to use to access Home Assistant.
1. (Optional) Change the `tunnel_name` add-on option (default: homeassistant). 1. (Optional) Change the `tunnel_name` add-on option (default: homeassistant).
1. (Optional) Add additional hosts to forward to in the `additional_hosts` array
(see [detailed description below](#option-additional_hosts)).
1. **Any existing DNS entries matching your defined `external_hostname` and `additional_hosts`
will be overridden at Cloudflare**.
1. (Optional) Add a `catch_all_service` to forward all other hosts to a URL
(see [detailed description below](#option-catch_all_service)).
1. (Optional) Add the `nginx_proxy_manager` flag to use the Cloudflare tunnel with
the Nginxproxymanager add-on (see
[detailed description below](#option-nginx_proxy_manager)).
1. Start the "Cloudflare" add-on. **Any existing DNS entries matching your defined 1. Start the "Cloudflare" add-on. **Any existing DNS entries matching your defined
`external_hostname` and `additional_hosts` will be overridden at Cloudflare**. `external_hostname` and `additional_hosts` will be overridden at Cloudflare**.
1. Check the logs of the "Cloudflare" add-on and **follow the instruction to authenticate 1. Check the logs of the "Cloudflare" add-on and **follow the instruction to authenticate
@@ -60,29 +57,27 @@ restart your HomeAssistant instance.**
1. A tunnel and a DNS entry will be created and show up in your Cloudflare DNS / 1. A tunnel and a DNS entry will be created and show up in your Cloudflare DNS /
Teams dashboard. Teams dashboard.
Please review the rest of this site for further information and more
advanced configuration options.
## Configuration ## Configuration
### Configuration.yaml There are more advanced configuration options this add-on provides.
Please check the index below for further information.
Since HomeAssistant blocks requests from proxies / reverse proxies, you have to tell - [`additional_hosts`](#option-additional_hosts)
your instance to allow requests from the Cloudflared Add-on. The add-on runs locally, - [`catch_all_service`](#option-catch_all_service)
so HA has to trust the docker network. In order to do so, add the following lines - [`nginx_proxy_manager`](#option-nginx_proxy_manager)
to your `/config/configuration.yaml` (there is no need to adapt anything in these - [`quick_tunnel`](#option-quick_tunnel)
lines since the IP range of the docker network is always the same): - [`data_folder`](#option-data_folder)
- [`custom_config`](#option-custom_config-advanced-option)
- [`warp_enable`](#option-warp_enable-advanced-option)
- [`warp_routes`](#option-warp_routes)
- [`log_level`](#option-log_level)
- [`reset_cloudflared_files`](#option-reset_cloudflared_files)
- [`warp_reset`](#option-warp_reset)
**Note**: _Remember to restart Home Assistance when the configuration is changed._ ### Overview: Add-on Configuration
```yaml
http:
use_x_forwarded_for: true
trusted_proxies:
- 172.30.33.0/24
```
If you need assistance changing the config, please follow the
[Advanced Configuration Tutorial][advancedconfiguration].
### Add-on Configuration
**Note**: _Remember to restart the add-on when the configuration is changed._ **Note**: _Remember to restart the add-on when the configuration is changed._
@@ -110,6 +105,8 @@ additional_hosts:
nginx_proxy_manager: true nginx_proxy_manager: true
log_level: "debug" log_level: "debug"
warp_enable: true warp_enable: true
warp_routes:
- 192.168.1.0/24
``` ```
**Note**: _This is just an example, don't copy and paste it! Create your own!_ **Note**: _This is just an example, don't copy and paste it! Create your own!_
@@ -120,7 +117,7 @@ You can use the internal reverse proxy of Cloudflare Tunnel to define additional
hosts next to home assistant. That way, you can use the tunnel to also access hosts next to home assistant. That way, you can use the tunnel to also access
other systems like a diskstation, router or anything else. other systems like a diskstation, router or anything else.
Like with the `external_hostname` of HomeAssistant, DNS entries at will be Like with the `external_hostname` of HomeAssistant, DNS entries will be
automatically created at Cloudflare. automatically created at Cloudflare.
Add the (optional) `disableChunkedEncoding` option to a hostname, to disable Add the (optional) `disableChunkedEncoding` option to a hostname, to disable
@@ -128,7 +125,7 @@ chunked transfer encoding. This is useful if you are running a WSGI server,
like Proxmox for example. Visit [Cloudflare Docs][disablechunkedencoding] for like Proxmox for example. Visit [Cloudflare Docs][disablechunkedencoding] for
further information. further information.
Please find below an examplary entry for two additional hosts: Please find below an examplary entry for three additional hosts:
```yaml ```yaml
additional_hosts: additional_hosts:
@@ -198,10 +195,10 @@ them to wherever you like.
You can get started with zero setup by using You can get started with zero setup by using
[Cloudflare Quick Tunnels](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/run-tunnel/trycloudflare). [Cloudflare Quick Tunnels](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/run-tunnel/trycloudflare).
Set `quick_tunnel` to `true` , all other configuration will be ignored. After Set `quick_tunnel` to `true` , all other configuration will be ignored. After
starting the addon check the logs for your unique randomly generated starting the addon, check the logs for your unique randomly generated
`trycloudflare.com` URL. `trycloudflare.com` URL.
Please note that you still have to add the `http` integration settings to your Please note that you still have to add the `http` integration settings to your
HA-config as described [here](#Configuration.yaml). HA-config as described [here](#configurationyaml).
Quick Tunnel add-on configuration: Quick Tunnel add-on configuration:
@@ -214,9 +211,9 @@ additional_hosts: []
### Option: `data_folder` ### Option: `data_folder`
The `data_folder` option allows to change default storage The `data_folder` option allows to change the default storage
location (`/data`) for the automatically created `cert.pem` and location (`/data`) for the automatically created `cert.pem` and
`tunnel.json` file.` `tunnel.json` file.
Possible values are: Possible values are:
@@ -224,18 +221,18 @@ Possible values are:
- `share`: Files will be stored in /share/cloudflared. - `share`: Files will be stored in /share/cloudflared.
- `ssl`: Files will be stored in /ssl/cloudflared. - `ssl`: Files will be stored in /ssl/cloudflared.
```yam ```yaml
data_folder: ssl data_folder: ssl
``` ```
The add-on takes care of moving the created files within the default location The add-on takes care of moving the created files from the default location
to the custom `data_folder` when adding the option after initial add-on setup. to the custom `data_folder` when adding the option after initial add-on setup.
**Note**: There are currently no automations in place when changing **Note**: There are currently no automations in place when changing
from custom data folder to another custom data folder or back to default. from custom data folder to another custom data folder or back to default.
You have to take care of moving the files accordingly. You have to take care of moving the files accordingly.
### Option: `custom_config` ### Option: `custom_config` (advanced option)
The `custom_config` option can be used to create a custom `config.yml` The `custom_config` option can be used to create a custom `config.yml`
file to create more complex ingress configurations. file to create more complex ingress configurations.
@@ -271,10 +268,10 @@ ingress:
`external_hostname` options will be ignored. Make sure to add all needed `external_hostname` options will be ignored. Make sure to add all needed
services (e.g. a homeassistant ingress rule) inside `config.yml`. services (e.g. a homeassistant ingress rule) inside `config.yml`.
### Option: `warp_enable` ### Option: `warp_enable` (advanced option)
If you want to route your home network(s) you can set this option to If you want to route your home network(s) you can set this option to
`true`. This will enable your cloudflared tunnel to proxy related traffic `true`. This will enable your cloudflared tunnel to proxy network traffic
through your tunnel. through your tunnel.
Before setting this to `true` please have a look at the [cloudflared documentation][cloudflared-route]. Before setting this to `true` please have a look at the [cloudflared documentation][cloudflared-route].
@@ -282,7 +279,7 @@ Before setting this to `true` please have a look at the [cloudflared documentati
This add-on will take care of setting up cloudflared tunnel and routing specific This add-on will take care of setting up cloudflared tunnel and routing specific
configuration. All other configuration is up to you. configuration. All other configuration is up to you.
From the above documentation: An excerpt from the above documentation:
- Enable HTTP filtering by turning on the Proxy switch under Settings > - Enable HTTP filtering by turning on the Proxy switch under Settings >
Network > L7 Firewall. Network > L7 Firewall.
@@ -293,12 +290,14 @@ From the above documentation:
### Option: `warp_routes` ### Option: `warp_routes`
This option controls which routes will be added to your tunnel. This option controls which routes will be added to your tunnel.
This option is mandatory if `warp_enable` is set to `true. This option is mandatory if `warp_enable` is set to `true.
See the example below on how to specifie networks (IP/CIDR) in See the example below on how to specifie networks (IP/CIDR) in
`warp_routes`. `warp_routes`.
```yaml ```yaml
warp_enable: true
warp_routes: warp_routes:
- 192.168.0.0/24 - 192.168.0.0/24
- 192.168.10.0/24 - 192.168.10.0/24
@@ -355,10 +354,32 @@ to `true`.
warp_reset: true warp_reset: true
``` ```
**Note**: _This will delete the routes assigned to your tunnel. The add-on **Note**: _This will remove the routes assigned to your tunnel. The add-on
options `warp_reset`, `warp_enable` and `warp_routes` will automatically be options `warp_reset`, `warp_enable` and `warp_routes` will automatically be
removed from the add-on configuration._ removed from the add-on configuration._
## Home Assistant configuration
### configuration.yaml
Since HomeAssistant blocks requests from proxies / reverse proxies, you have to tell
your instance to allow requests from the Cloudflared Add-on. The add-on runs locally,
so HA has to trust the docker network. In order to do so, add the following lines
to your `/config/configuration.yaml` (there is no need to adapt anything in these
lines since the IP range of the docker network is always the same):
**Note**: _Remember to restart Home Assistance when the configuration is changed._
```yaml
http:
use_x_forwarded_for: true
trusted_proxies:
- 172.30.33.0/24
```
If you need assistance changing the config, please follow the
[Advanced Configuration Tutorial][advancedconfiguration].
## Domain Name and Cloudlfare Set-Up ## Domain Name and Cloudlfare Set-Up
To use this plugin, you need a domain name that is using Cloudflare for its To use this plugin, you need a domain name that is using Cloudflare for its
+1 -4
View File
@@ -19,9 +19,6 @@ connection.
DNS servers of Cloudflare. If you do not have one, you can get one for free at DNS servers of Cloudflare. If you do not have one, you can get one for free at
[Freenom][freenom] following [this article][domainarticle].** [Freenom][freenom] following [this article][domainarticle].**
**Note**: _This add-on needs the Admin API role in order to get the internal
IP of Nginx Proxy Manager, in case it is used with the tunnel._
## Disclaimer ## Disclaimer
Please make sure to be compliant with the Please make sure to be compliant with the
@@ -34,6 +31,6 @@ mainly streaming videos or other Non-HTML content.
[domainarticle]: https://www.linkedin.com/pulse/what-do-domain-name-how-get-one-free-tobias-brenner?trk=public_post-content_share-article [domainarticle]: https://www.linkedin.com/pulse/what-do-domain-name-how-get-one-free-tobias-brenner?trk=public_post-content_share-article
[freenom]: https://freenom.com [freenom]: https://freenom.com
[maintenance-shield]: https://img.shields.io/maintenance/yes/2022.svg [maintenance-shield]: https://img.shields.io/maintenance/yes/2022.svg
[project-stage-shield]: https://img.shields.io/badge/project%20stage-experimental-yellow.svg [project-stage-shield]: https://img.shields.io/badge/project%20stage-production%20ready-brightgreen.svg
[releases-shield]: https://img.shields.io/github/v/release/brenner-tobias/addon-cloudflared?include_prereleases [releases-shield]: https://img.shields.io/github/v/release/brenner-tobias/addon-cloudflared?include_prereleases
[releases]: https://github.com/brenner-tobias/addon-cloudflared/releases [releases]: https://github.com/brenner-tobias/addon-cloudflared/releases
+1 -1
View File
@@ -40,4 +40,4 @@ schema:
- str? - str?
slug: cloudflared slug: cloudflared
url: https://github.com/brenner-tobias/addon-cloudflared/ url: https://github.com/brenner-tobias/addon-cloudflared/
version: 0.7.0 version: 1.0.0