browser_brave/browser_chromium: make Chrome devtools port 9221 reachable (#3189) (#3194)

* browser_brave/browser_chromium: expose Chrome devtools on 9221 via nginx (#3189)

Headful Chromium ignores --remote-debugging-address and only binds
127.0.0.1, so the mapped 9221 port had nothing to forward to. Run
devtools on 127.0.0.1:9222 and let nginx listen on 9221 and proxy it
(including the websocket upgrade).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* browser_brave/browser_chromium: only expose devtools when 9221 is mapped; fix chromium flag anchor

The LSIO chromium wrapper has no --no-first-run line, so the debugging
flag was never added; anchor on --password-store=basic, present in both
wrappers. Keep the nginx proxy in sites-available and enable it from
90-ingress.sh only when the 9221 port is mapped, so DevTools is not
reachable from the add-on network by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
AlexandreandClaude Opus 5.5 authored and GitHub committed 2026-11-04 09:59:01 +01:00
1 parent 60fb259196
commit dcff141344
9 files changed
+32 -6

No files matched your search

+3
View File
@@ -1,4 +1,7 @@
## 1.98.63-ls143.1 (04-11-2026)
- Fix Chrome devtools port 9221 not reachable from outside the container: the browser only binds 127.0.0.1, so it now listens on 9222 and nginx exposes it on 9221 only when that port is mapped (#3189)
## 1.98.63-ls143 (2026-10-31)
- Update to latest version from linuxserver/docker-brave (changelog : https://github.com/linuxserver/docker-brave/releases)
+1 -1
View File
@@ -45,7 +45,7 @@ RUN \
if [[ -d /etc/services.d ]] && ls /etc/services.d/*/run 1> /dev/null 2>&1; then sed -i "1a set +e" /etc/services.d/*/run; fi
# Modify commands
RUN sed -i '/no-first-run/a\ --remote-debugging-address=0.0.0.0 --remote-debugging-port=9221 \\' /usr/bin/wrapped-*
RUN sed -i '/--password-store=basic/a\ --remote-debugging-port=9222 \\' /usr/bin/wrapped-*
# Global LSIO modifications
COPY ha_lsio.sh /ha_lsio.sh
+1 -1
View File
@@ -69,5 +69,5 @@ slug: brave
tmpfs: true
udev: true
url: https://github.com/alexbelgium/hassio-addons
version: "1.98.63-ls143"
version: "1.98.63-ls143.1"
video: true
+4
View File
@@ -1,4 +1,8 @@
## 2026.10.31.1 (04-11-2026)
- Fix Chrome devtools port 9221 not reachable from outside the container: the browser only binds 127.0.0.1, so it now listens on 9222 and nginx exposes it on 9221 only when that port is mapped (#3189)
- Fix devtools flag never being added to the LSIO chromium wrapper
## 2026.10.31 (2026-10-31)
- Update to latest version from linuxserver/docker-chromium (changelog : https://github.com/linuxserver/docker-chromium/releases)
- Upstream tag : version-2dba585f
+1 -1
View File
@@ -45,7 +45,7 @@ RUN \
if [[ -d /etc/services.d ]] && ls /etc/services.d/*/run 1> /dev/null 2>&1; then sed -i "1a set +e" /etc/services.d/*/run; fi
# Modify commands
RUN sed -i '/no-first-run/a\ --remote-debugging-address=0.0.0.0 --remote-debugging-port=9221 \\' /usr/bin/wrapped-*
RUN sed -i '/--password-store=basic/a\ --remote-debugging-port=9222 \\' /usr/bin/wrapped-*
ENV GLOBAL_VAR_FILES="/etc/usr/bin/wrapped-chromium"
+1 -1
View File
@@ -71,5 +71,5 @@ slug: chromium
tmpfs: true
udev: true
url: https://github.com/alexbelgium/hassio-addons
version: "2026.10.31"
version: "2026.10.31.1"
video: true
@@ -27,3 +27,8 @@ sed -i "s|SUBFOLDER|${SUBFOLDER}|g" "${NGINX_CONFIG}"
# Enable ingress
cp "${NGINX_CONFIG}" /etc/nginx/sites-enabled
# Expose Chrome devtools only when its port is mapped
if [[ -n "$(bashio::app.port "9221")" ]]; then
cp /etc/nginx/sites-available/devtools.conf /etc/nginx/sites-enabled
fi
@@ -0,0 +1,15 @@
# Chrome devtools: the browser only binds 127.0.0.1 when not headless,
# so expose it on 9221 through nginx (enabled by 90-ingress.sh when mapped)
server {
listen 9221;
location / {
proxy_pass http://127.0.0.1:9222;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
}
}
@@ -27,8 +27,7 @@ seccomp_mode="$(awk -F':' '/^Seccomp:/{gsub(/[[:space:]]/,"",$2); print $2}' /pr
# Base arguments (exactly what you requested + required safety flags)
args=(
--remote-debugging-address=0.0.0.0
--remote-debugging-port=9221
--remote-debugging-port=9222
--user-data-dir="${USER_DATA_DIR}"
--disable-dev-shm-usage
--no-first-run