Compare commits

...

10 Commits

Author SHA1 Message Date
Alexandre
45a72135b4 nobuild 2026-03-19 10:42:47 +01:00
Alexandre
70f5f1c133 nobuild 2026-03-19 10:42:05 +01:00
Alexandre
0a80daabd8 nobuild 2026-03-19 10:41:15 +01:00
github-actions
b277dd6cd7 GitHub bot: changelog 2026-03-19 08:56:48 +00:00
Alexandre
f64368c77b Use embedded nginx https://github.com/alexbelgium/hassio-addons/issues/2567 2026-03-19 09:54:19 +01:00
Alexandre
a9b89481cf nobuild 2026-03-19 09:42:49 +01:00
Alexandre
16fe9fb4a9 Change ingress_port from 0 to 20211 2026-03-19 09:39:52 +01:00
github-actions
688ea34874 GitHub bot: changelog 2026-03-19 08:39:00 +00:00
Alexandre
dd83fb0e1f correct ingress
https://github.com/alexbelgium/hassio-addons/issues/2567
2026-03-19 09:36:57 +01:00
Alexandre
10c52ec37f Update nginx config to turn off gzip
Disable gzip compression in nginx configuration.
2026-03-19 09:36:10 +01:00
8 changed files with 24 additions and 140 deletions

View File

@@ -1,7 +1,6 @@
## 26.3.16-3 (18-03-2026)
- Minor bugs fixed
## 26.3.16-2 (17-03-2026)
- Minor bugs fixed
## 26.3.16-5 (19-03-2026)
- Use embedded ingress system
## 26.3.16-1 (17-03-2026)
- Minor bugs fixed
## 26.3.7-3 (07-03-2026)

View File

@@ -6,6 +6,7 @@ hassio_api: true
host_network: true
image: ghcr.io/alexbelgium/netalertx-{arch}
ingress: true
ingress_entry: devices.php
ingress_port: 20211
ingress_stream: true
init: false
@@ -41,4 +42,4 @@ slug: netalertx
tmpfs: true
udev: true
url: https://github.com/alexbelgium/hassio-addons
version: "26.3.16-3"
version: "26.3.16-5"

View File

@@ -1,25 +0,0 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
#################
# NGINX SETTING #
#################
declare ingress_interface
declare ingress_port
declare ingress_entry
echo "Adapting for ingress"
# Remove backend api url to use the base path
sed -i "s|'/server'|''|g" /app/back/app.conf
sed -i "s|(\$is_trusted != \"TRUSTED\")|(\$is_trusted = \"AAA\")|g" /services/config/nginx/netalertx.conf.template
# Adapt nginx configuration
ingress_port=$(bashio::addon.ingress_port)
ingress_interface=$(bashio::addon.ip_address)
ingress_entry=$(bashio::addon.ingress_entry)
sed -i "s|%%port%%|${ingress_port}|g" /etc/nginx/http.d/ingress.conf
sed -i "s|%%interface%%|${ingress_interface}|g" /etc/nginx/http.d/ingress.conf
sed -i "s|%%ingress_entry%%|${ingress_entry}|g" /etc/nginx/http.d/ingress.conf

View File

@@ -38,7 +38,6 @@ done
# Fix php
sed -i 's|>>"\?/tmp/log/app\.php_errors\.log"\? 2>/dev/stderr|>>"/tmp/log/app.php_errors.log"|g' /services/start-php-fpm.sh
sed -i 's|TEMP_CONFIG_FILE=$(mktemp "${TMP_DIR}/netalertx\.conf\.XXXXXX")|TEMP_CONFIG_FILE=$(mktemp -p "${TMP_DIR:-/tmp}" netalertx.conf.XXXXXX)|' /services/start-php-fpm.sh
sed -i "/default_type/a include /etc/nginx/http.d/ingress.conf;" "${SYSTEM_NGINX_CONFIG_TEMPLATE}"
#####################
# Configure network #

View File

@@ -1,60 +0,0 @@
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen %%interface%%:%%port%% default_server;
server_name netalertx;
proxy_buffering off;
include /etc/nginx/includes/server_params.conf;
include /etc/nginx/includes/proxy_params.conf;
location ~ ^/php%%ingress_entry%%/(.*)$ {
rewrite ^/php%%ingress_entry%%/(.*)$ /php/$1 break;
}
location / {
proxy_pass http://127.0.0.1:20211/;
rewrite ^%%ingress_entry%%/?(.*)$ /$1 break;
sub_filter_once off;
sub_filter_types *;
sub_filter '"/server' '"%%ingress_entry%%/server';
sub_filter 'href="/' 'href="%%ingress_entry%%/';
sub_filter 'src="/' 'src="%%ingress_entry%%/';
sub_filter 'action="/' 'action="%%ingress_entry%%/';
sub_filter '(?>$host)/css/' '%%ingress_entry%%/css/';
sub_filter '(?>$host)/js/' '%%ingress_entry%%/js/';
sub_filter '/img/' '%%ingress_entry%%/img/';
sub_filter '/lib/' '%%ingress_entry%%/lib/';
sub_filter '/php/' '%%ingress_entry%%/php/';
# sub_filter '"/server"' '"%%ingress_entry%%/server"';
# sub_filter "'/server'" "'%%ingress_entry%%/server'";
# sub_filter "fetch(sseUrl" "fetch(%%ingress_entry%%sseUrl";
# Websocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range;
proxy_hide_header X-Powered-By;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Accept-Encoding "";
proxy_connect_timeout 30m;
proxy_send_timeout 30m;
proxy_read_timeout 30m;
add_header X-Frame-Options "SAMEORIGIN";
}
}

View File

@@ -1,16 +0,0 @@
proxy_http_version 1.1;
proxy_ignore_client_abort off;
proxy_read_timeout 86400s;
proxy_redirect off;
proxy_send_timeout 86400s;
proxy_max_temp_file_size 0;
proxy_hide_header X-Frame-Options;
proxy_set_header Accept-Encoding "";
proxy_set_header Connection $connection_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-NginX-Proxy true;
proxy_set_header X-Real-IP $remote_addr;

View File

@@ -1,6 +0,0 @@
root /dev/null;
server_name $hostname;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;

View File

@@ -1,49 +1,41 @@
arch:
- aarch64
- amd64
description: "\U0001F5A7\U0001F50D WIFI / LAN scanner, intruder, and presence detector"
environment:
PGID: "20211"
PORT: "20211"
PUID: "20211"
TZ: Europe/Berlin
NETALERTX_DATA: /config
NETALERTX_CONFIG: /config/config
NETALERTX_DB: /config/db
TMP_DIR: /tmp/tmp
NETALERTX_CONFIG_FILE: /config/config/app.conf
NETALERTX_DB_FILE: /config/db/app.db
full_access: true
description: "\U0001F5A7\U0001F50D Centralized network visibility and continuous asset discovery."
hassio_api: true
host_network: true
image: ghcr.io/alexbelgium/netalertx-{arch}
ingress: true
ingress_port: 0
ingress_entry: devices.php
ingress_port: 20211
ingress_stream: true
init: false
full_access: true
map:
- addon_config:rw
- media:rw
- share:rw
- ssl
name: NetAlertX Full Access
options:
env_vars: []
name: NetAlertX
panel_icon: mdi:wifi-check
ports:
20211/tcp: 20211
20212/tcp: 20212
ports_description:
20211/tcp: WebUI port
20212/tcp: GraphQL port
20211/tcp: NetAlertX WebUI port
20212/tcp: GraphQL & MCP port
privileged:
- NET_ADMIN
- NET_RAW
environment:
PUID: "20211"
PGID: "20211"
TZ: Europe/Berlin
NETALERTX_DATA: /config
NETALERTX_CONFIG: /config/config
NETALERTX_CONFIG_FILE: /config/config/app.conf
NETALERTX_DB: /config/db
NETALERTX_DB_FILE: /config/db/app.db
TMP_DIR: /tmp/tmp
SKIP_STARTUP_CHECKS: excessive capabilities.sh,appliance integrity.sh
schema:
env_vars:
- name: match(^[A-Za-z0-9_]+$)
value: str?
APP_CONF_OVERRIDE: str?
TZ: str?
services:
- mqtt:want
@@ -51,4 +43,4 @@ slug: netalertx_fa
tmpfs: true
udev: true
url: https://github.com/alexbelgium/hassio-addons
version: "26.2.6-4"
version: "26.3.16-5"