Release Add-On Cloudflared 0.2.1

This commit is contained in:
Tobias Brenner
2022-01-16 21:39:50 +01:00
parent 475d089fc2
commit 6ccab6b940
4 changed files with 90 additions and 10 deletions
+6
View File
@@ -1,3 +1,9 @@
## v0.2.1
- Bump Cloudflared to 2022.1.2
## v0.2.0
- Added possibility to configure additional hosts to forward to
## v0.1.9 ## v0.1.9
- Bump Cloudflared to 2022.1.0 - Bump Cloudflared to 2022.1.0
+66 -5
View File
@@ -10,6 +10,13 @@ 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].**
## Disclaimer
Please make sure to be compliant with the
[Cloudflare Self-Serve Subscription Agreement][cloudflare-sssa] when using this
add-on. Especially [section 2.8][cloudflare-sssa-28] could be breached when
mainly streaming videos or other Non-HTML content.
## Installation ## Installation
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
@@ -22,7 +29,7 @@ restart your HomeAssistant instance.**
1. (Optional if you don't yet have a working Cloudflare set-up): 1. (Optional 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. Set the "external_hostname" add-on option with your domain name or a subdomain 1. Set the "j" 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. **Make sure that there is no DNS entry with your desired external hostname and 1. **Make sure that there is no DNS entry with your desired external hostname and
@@ -38,11 +45,26 @@ restart your HomeAssistant instance.**
**Note**: _Remember to restart the add-on when the configuration is changed._ **Note**: _Remember to restart the add-on when the configuration is changed._
Example add-on configuration: Example basic add-on configuration:
```yaml ```yaml
external_hostname: "ha.example.com" external_hostname: "ha.example.com"
tunnel_name: homeassistant tunnel_name: "homeassistant"
additional_hosts: []
```
Example extended add-on configuration:
```yaml
external_hostname: "ha.example.com"
tunnel_name: "homeassistant"
additional_hosts:
- hostname: "diskstation.example.com"
service: "http://192.168.1.5"
- hostname: "website.example.com"
service: "http://192.168.1.2"
nginxproxymanager: true
log_level: "debug"
``` ```
**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!_
@@ -63,13 +85,42 @@ http:
- 172.30.33.0/24 - 172.30.33.0/24
``` ```
### Option: `additional_hosts`
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
other systems like a diskstation, router or anything else.
Like with the `external_hostname` of HomeAssistant, DNS entries at will be
automatically created at Cloudflare.
Please find below an examplary entry for two additional hosts:
```yaml
additional_hosts:
- hostname: "diskstation.example.com"
service: "http://192.168.1.2"
- hostname: "router.example.com"
service: "http://192.168.1.1"
```
**Note**: _If you delete a hostname from the list, it will not be served
anymore (the request will run agains the default route). Nevertheless,
you should also manually delete the DNS entry from Cloudflare since it can not
be deleted by the Add-On._
### Option: `nginxproxymanager` ### Option: `nginxproxymanager`
If you want to use the Cloudflare Tunnel with the Add-On If you want to use the Cloudflare Tunnel with the Add-On
[Nginx Proxy Manager][nginxproxymanager], you can do so by setting this option. [Nginx Proxy Manager][nginxproxymanager], you can do so by setting this option.
```yaml
nginxproxymanager: true
```
**Note**: _This will still route your defined `external_hostname`to HomeAssistant **Note**: _This will still route your defined `external_hostname`to HomeAssistant
and any other incoming domain to Nginx Proxy Manager._ as well as any potential `additional_hosts` to where you defined in the config.
Any other incoming traffic will be routed to Nginx Proxy Manager._
In order to route multiple sub-domains through the tunnel, you have to create individual In order to route multiple sub-domains through the tunnel, you have to create individual
CNAME records in Cloudflare for all of them, pointing to your `external_hostname` CNAME records in Cloudflare for all of them, pointing to your `external_hostname`
@@ -83,7 +134,13 @@ them to wherever you like.
The `log_level` option controls the level of log output by the addon and can The `log_level` option controls the level of log output by the addon and can
be changed to be more or less verbose, which might be useful when you are be changed to be more or less verbose, which might be useful when you are
dealing with an unknown issue. Possible values are: dealing with an unknown issue.
```yaml
log_level: debug
```
Possible values are:
- `trace`: Show every detail, like all called internal functions. - `trace`: Show every detail, like all called internal functions.
- `debug`: Shows detailed debug information. - `debug`: Shows detailed debug information.
@@ -103,6 +160,10 @@ In case something went wrong or you want to reset your Cloudflare tunnel
for some other reason (e.g., switch to another Cloudflare account), you can reset for some other reason (e.g., switch to another Cloudflare account), you can reset
all your local Cloudflare files by setting this option to `true`. all your local Cloudflare files by setting this option to `true`.
```yaml
reset_cloudflared_files: true
```
**Note**: _After deleting the files, the option `reset_cloudflared_files` will **Note**: _After deleting the files, the option `reset_cloudflared_files` will
automaticaly be removed from the add-on configuration._ automaticaly be removed from the add-on configuration._
+9
View File
@@ -22,6 +22,15 @@ DNS servers of Cloudflare. If you do not have one, you can get one for free at
**Note**: _This add-on needs the Admin API role in order to get the internal **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._ IP of Nginx Proxy Manager, in case it is used with the tunnel._
## Disclaimer
Please make sure to be compliant with the
[Cloudflare Self-Serve Subscription Agreement][cloudflare-sssa] when using this
add-on. Especially [section 2.8][cloudflare-sssa-28] could be breached when
mainly streaming videos or other Non-HTML content.
[cloudflare-sssa]: https://www.cloudflare.com/terms/
[cloudflare-sssa-28]: https://www.cloudflare.com/terms/#:~:text=2.8%20Limitation%20on%20Serving%20Non%2DHTML%20Content
[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
+8 -4
View File
@@ -1,6 +1,6 @@
--- ---
name: Cloudflared name: Cloudflared
version: 0.1.9 version: 0.2.1
slug: cloudflared slug: cloudflared
description: > description: >
Use a Cloudflared tunnel (formerly Argo Tunnel) Use a Cloudflared tunnel (formerly Argo Tunnel)
@@ -17,11 +17,15 @@ arch:
- armv7 - armv7
- i386 - i386
options: options:
external_hostname: "" external_ha_hostname: ""
tunnel_name: homeassistant tunnel_name: "homeassistant"
additional_hosts: []
schema: schema:
external_hostname: str external_ha_hostname: str
tunnel_name: str tunnel_name: str
additional_hosts:
- hostname: str
service: str
nginxproxymanager: bool? nginxproxymanager: bool?
log_level: list(trace|debug|info|notice|warning|error|fatal)? log_level: list(trace|debug|info|notice|warning|error|fatal)?
reset_cloudflared_files: bool? reset_cloudflared_files: bool?