smarthome icon indicating copy to clipboard operation
smarthome copied to clipboard

Http module cannot bind on all interfaces

Open RedTiger26 opened this issue 1 year ago • 0 comments

The http module currently prevents binding on all network interfaces.

In this code file, if the binding ip adress is set to '0.0.0.0' (bind on all interfaces), it will be changed to the (first) local ip address. https://github.com/smarthomeNG/smarthome/blob/master/modules/http/init.py#L149C1-L150C52

if self._ip == '0.0.0.0': self._ip = self._get_local_ip_address()

However, for certain scenarios, this is needed. In my case, I want to use smarthomeng together with other tools in a docker compose environment that has a reverse proxy for external access. This needs multiple interfaces, but due to the nature of docker, the ip address may change, so I need to specify binding to all interfaces to get this running.

Can this behaviour be fixed to allow binding on all interfaces?

RedTiger26 avatar Feb 09 '24 18:02 RedTiger26