key=CONF_BIND_IP,
type=ConfigEntryType.STRING,
default_value="0.0.0.0",
- options=[ConfigValueOption(x, x) for x in {"0.0.0.0", *ip_addresses}],
+ options=[ConfigValueOption(x, x) for x in {"0.0.0.0", "::", *ip_addresses}],
label="Bind to IP/interface",
description="Start the stream server on this specific interface. \n"
- "Use 0.0.0.0 to bind to all interfaces, which is the default. \n"
+ "Use 0.0.0.0 or :: to bind to all interfaces, which is the default. \n"
"This is an advanced setting that should normally "
"not be adjusted in regular setups.",
category="generic",
key=CONF_BIND_IP,
type=ConfigEntryType.STRING,
default_value="0.0.0.0",
- options=[ConfigValueOption(x, x) for x in {"0.0.0.0", *ip_addresses}],
+ options=[ConfigValueOption(x, x) for x in {"0.0.0.0", "::", *ip_addresses}],
label="Bind to IP/interface",
description="Bind the (web)server to this specific interface. \n"
- "Use 0.0.0.0 to bind to all interfaces. \n"
+ "Use 0.0.0.0 or :: to bind to all interfaces. \n"
"Set this address for example to a docker-internal network, "
"when you are running a reverse proxy to enhance security and "
"protect outside access to the webinterface and API. \n\n"
for ip in adapter.ips:
if ip.is_IPv6 and not include_ipv6:
continue
- ip_str = str(ip.ip)
+ # ifaddr returns IPv6 addresses as (address, flowinfo, scope_id) tuples
+ ip_str = ip.ip[0] if isinstance(ip.ip, tuple) else ip.ip
if ip_str.startswith(("127", "169.254")):
# filter out IPv4 loopback/APIPA address
continue
self._webapp.router.add_route("*", "/{tail:.*}", self._handle_catch_all)
await self._apprunner.setup()
# set host to None to bind to all addresses on both IPv4 and IPv6
- host = None if bind_ip == "0.0.0.0" else bind_ip
+ host = None if bind_ip in ("0.0.0.0", "::") else bind_ip
try:
self._tcp_site = web.TCPSite(
self._apprunner, host=host, port=bind_port, ssl_context=ssl_context