UI/Application listening on IPv6 - Please use -h :: to listen on all IPv6 interfaces, -p is removed (#3257)

This commit is contained in:
dgtlmoon
2025-06-11 12:03:12 +02:00
committed by GitHub
parent 66bc7fbc04
commit c0e229201b
3 changed files with 15 additions and 6 deletions

View File

@@ -190,6 +190,15 @@ jobs:
docker kill test-changedetectionio-ssl
- name: Test IPv6 Mode
run: |
# IPv6 - :: bind to all interfaces inside container (like 0.0.0.0), ::1 would be localhost only
docker run --name test-changedetectionio-ipv6 --rm -p 5000:5000 -e LISTEN_HOST=:: -d test-changedetectionio
sleep 3
# Should return 0 (no error) when grep finds it on localhost
curl --retry-connrefused --retry 6 http://[::1]:5000 -v|grep -q checkbox-uuid
docker kill test-changedetectionio-ipv6
- name: Test changedetection.io SIGTERM and SIGINT signal shutdown
run: |

View File

@@ -65,8 +65,7 @@ def main():
datastore_path = None
do_cleanup = False
host = "0.0.0.0"
ipv6_enabled = False
host = os.environ.get("LISTEN_HOST", "0.0.0.0").strip()
port = int(os.environ.get('PORT', 5000))
ssl_mode = False
@@ -108,10 +107,6 @@ def main():
if opt == '-d':
datastore_path = arg
if opt == '-6':
logger.success("Enabling IPv6 listen support")
ipv6_enabled = True
# Cleanup (remove text files that arent in the index)
if opt == '-c':
do_cleanup = True

View File

@@ -74,6 +74,11 @@ services:
# ./cert.pem:/app/cert.pem and ./privkey.pem:/app/privkey.pem
# - SSL_CERT_FILE=cert.pem
# - SSL_PRIVKEY_FILE=privkey.pem
#
# LISTEN_HOST / "host", Same as -h
# - LISTEN_HOST=::
# - LISTEN_HOST=0.0.0.0
# Comment out ports: when using behind a reverse proxy , enable networks: etc.
ports: