From 0bd724776609a954af72ff24dbc7da4ba1e87a9f Mon Sep 17 00:00:00 2001 From: Veillax <126523099+Veillax@users.noreply.github.com> Date: Fri, 30 Oct 2026 19:14:34 -0600 Subject: [PATCH] Update the add-on to Bamboo v0.1.6 and add opt-in service discovery options --- README.md | 2 +- bamboo/CHANGELOG.md | 5 +++++ bamboo/DOCS.md | 4 ++++ bamboo/Dockerfile | 4 ++-- bamboo/config.yaml | 8 +++++++- bamboo/run.sh | 13 +++++++++++++ bamboo/translations/en.yaml | 9 +++++++++ 7 files changed, 41 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9ca74d1..b5b618a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ It builds on your Home Assistant machine the first time you install it. It suppo ## For maintainers -The add-on version is the Bamboo release it installs: version `0.1.5` downloads Bamboo `v0.1.5` and checks it against that release's `SHA256SUMS`. To follow a new Bamboo release, change `version` in `bamboo/config.yaml` (and the default of `BUILD_VERSION` in `bamboo/Dockerfile`), and add a line to `bamboo/CHANGELOG.md`. +The add-on version is the Bamboo release it installs: version `0.1.6` downloads Bamboo `v0.1.6` and checks it against that release's `SHA256SUMS`. To follow a new Bamboo release, change `version` in `bamboo/config.yaml` (and the default of `BUILD_VERSION` in `bamboo/Dockerfile`), and add a line to `bamboo/CHANGELOG.md`. ## License diff --git a/bamboo/CHANGELOG.md b/bamboo/CHANGELOG.md index 112ce41..8c0bfda 100644 --- a/bamboo/CHANGELOG.md +++ b/bamboo/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.1.6 + +* Installs Bamboo v0.1.6. +* New, off by default: **Suggest services** reports what is listening on Home Assistant's machine as suggested targets in Hammerhead. **Scan subnets** also scans the private subnets you list. Nothing is exposed until you pick a target. + ## 0.1.5 * First version of the add-on. Installs Bamboo v0.1.5. diff --git a/bamboo/DOCS.md b/bamboo/DOCS.md index b2816d9..fcfd470 100644 --- a/bamboo/DOCS.md +++ b/bamboo/DOCS.md @@ -33,6 +33,10 @@ Without it, the page fails with "400: Bad Request". Home Assistant has its own s The add-on uses host networking, so a resource can also point at any address on your network, such as a camera at `192.168.1.40`. Pick this site as the target and enter that address and port. +## Suggest services (optional) + +Turn on **Suggest services** and Bamboo reports the services listening on Home Assistant's machine to Hammerhead, so you can pick one as a target instead of typing its address. Fill in **Scan subnets** (for example `192.168.1.0/24`) and it also looks for services on those networks, trying the ports in **Scan ports** or a short list of common ones. It is gentle, with a rate limit and a sweep every 15 minutes, and only private networks are accepted. Nothing is exposed until you pick a target. Only scan networks you are allowed to scan. + ## Updates The add-on version is the Bamboo release it installs. Update it from the add-on's page when a new version appears. Bamboo's own auto-update is not used here, because a new version arrives as an add-on update instead. Your WireGuard key and settings are kept across updates. diff --git a/bamboo/Dockerfile b/bamboo/Dockerfile index cab93e6..bb86ec9 100644 --- a/bamboo/Dockerfile +++ b/bamboo/Dockerfile @@ -1,9 +1,9 @@ ARG BUILD_FROM FROM ${BUILD_FROM} -# The add-on version in config.yaml is the Bamboo release it installs (0.1.5 installs v0.1.5). +# The add-on version in config.yaml is the Bamboo release it installs (0.1.6 installs v0.1.6). ARG BUILD_ARCH -ARG BUILD_VERSION=0.1.5 +ARG BUILD_VERSION=0.1.6 # Download the release for this CPU and check it against the release's SHA256SUMS before installing. RUN set -eu; \ diff --git a/bamboo/config.yaml b/bamboo/config.yaml index 44e007c..f628ce6 100644 --- a/bamboo/config.yaml +++ b/bamboo/config.yaml @@ -1,5 +1,5 @@ name: Bamboo -version: "0.1.5" +version: "0.1.6" slug: bamboo description: Connects Home Assistant and your home network to a Blacktip edge, so you can reach them from the internet without opening any ports. url: https://git.veillax.com/Veillax/bamboo @@ -16,6 +16,12 @@ host_network: true options: hammerhead_url: "" token: "" + discover: false + discover_subnets: "" + discover_ports: "" schema: hammerhead_url: url token: password + discover: bool + discover_subnets: str? + discover_ports: str? diff --git a/bamboo/run.sh b/bamboo/run.sh index 2a135bf..f5287b3 100644 --- a/bamboo/run.sh +++ b/bamboo/run.sh @@ -14,6 +14,19 @@ fi export BAMBOO_HAMMERHEAD="${url%/}" export BAMBOO_TOKEN="${token}" +# Service discovery is opt-in: Bamboo reports what it finds as suggested targets in Hammerhead. +if bashio::config.true 'discover'; then + export BAMBOO_DISCOVER=1 +fi +subnets="$(bashio::config 'discover_subnets')" +if [ -n "${subnets}" ]; then + export BAMBOO_DISCOVER_SUBNETS="${subnets}" +fi +ports="$(bashio::config 'discover_ports')" +if [ -n "${ports}" ]; then + export BAMBOO_DISCOVER_PORTS="${ports}" +fi + bashio::log.info "Starting $(bamboo -version), connecting to ${BAMBOO_HAMMERHEAD}" # /data survives restarts and updates; it holds this site's WireGuard key. exec bamboo -data /data diff --git a/bamboo/translations/en.yaml b/bamboo/translations/en.yaml index 0615661..96802e9 100644 --- a/bamboo/translations/en.yaml +++ b/bamboo/translations/en.yaml @@ -5,3 +5,12 @@ configuration: token: name: Site token description: The token of the site you created for this network. In Hammerhead, open Sites and use Show command to copy it. + discover: + name: Suggest services + description: Report the services listening on this machine to Hammerhead as suggested targets. Nothing is exposed until you pick one. + discover_subnets: + name: Scan subnets + description: "Also scan these private subnets for services, comma separated, for example 192.168.1.0/24. Each can be at most a /22. Leave empty to scan nothing. Only scan networks you are allowed to scan." + discover_ports: + name: Scan ports + description: "The TCP ports to try when scanning, for example 22,80,443,8000-8010. Leave empty for a short list of common ones."