Add networking options for configuring listening ports

- Handle both internal (unauth) an external (auth) ports
    - Allow specifying binding IP in `ip:port` format
- Simplify the templating for `listen.gotmpl` and `base_path.gotmpl`
    - Combine nginx settings getters into a single script `get_nginx_settings.py`
- Replace port constants `5000` and `8971` in code with values from config
- Update `Network Configuration` section in the advanced documentation

Provides a solution for discussion #17761
This commit is contained in:
Eric Work
2026-01-26 22:47:02 -08:00
parent 5fdb56a106
commit fdafdd1471
18 changed files with 181 additions and 131 deletions
@@ -10,7 +10,8 @@ echo "[INFO] Starting certsync..."
lefile="/etc/letsencrypt/live/frigate/fullchain.pem"
tls_enabled=`python3 /usr/local/nginx/get_listen_settings.py | jq -r .tls.enabled`
tls_enabled=`python3 /usr/local/nginx/get_nginx_settings.py | jq -r .tls.enabled`
listen_external_port=`python3 /usr/local/nginx/get_nginx_settings.py | jq -r .listen.external_port`
while true
do
@@ -34,7 +35,7 @@ do
;;
esac
liveprint=`echo | openssl s_client -showcerts -connect 127.0.0.1:8971 2>&1 | openssl x509 -fingerprint 2>&1 | grep -i fingerprint || echo 'failed'`
liveprint=`echo | openssl s_client -showcerts -connect 127.0.0.1:$listen_external_port 2>&1 | openssl x509 -fingerprint 2>&1 | grep -i fingerprint || echo 'failed'`
case "$liveprint" in
*Fingerprint*)
@@ -55,4 +56,4 @@ do
done
exit 0
exit 0