You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
in some cases it is necessary to advertise a different IP to the one belonging to the host where the service is running. For instance if you are running the service in a docker container without using host networking or if you need the service outside of the connected network but routing isn't an option and you need to rely on NAT instead.
Currently, dnssd supports specifying an arbitrary IP and hc actually sets the necessary parameter if you set the configuration option Config.IP. This works great, however, Config.IP's documentation states it is a deprecated option. As I think running an hc service inside docker is probably a common use case I'd suggest removing the deprecation notice in the Config.IP option. Alternatively, allowing a custom dnssd configuration but I don't think there are any other parameters that might be worth overriding so the first option seems more convenient. A third option would be to allow specifying a dns entry and resolve it instead of passing an IP address, this would keep things dynamic while allowing you to override the advertised IP.
Thanks for the awesome work :)
Regards
David
The text was updated successfully, but these errors were encountered:
I don't think it's the same, based on the docstring:
// Addr specifies the tcp address for the server
// to listen to in form of "host:port".
// If empty, a random port is used.
What I was suggesting (which was already possible) was decoupling the ip:port you are binding to and the ip:port you are advertising. Simplest use case is running inside a docker container (without using networking in host mode), in which case, you'd probably be binding to 0.0.0.0:12345 but you'd want to announce the IP of the host machine.
Hello,
in some cases it is necessary to advertise a different IP to the one belonging to the host where the service is running. For instance if you are running the service in a docker container without using host networking or if you need the service outside of the connected network but routing isn't an option and you need to rely on NAT instead.
Currently, dnssd supports specifying an arbitrary IP and hc actually sets the necessary parameter if you set the configuration option
Config.IP
. This works great, however,Config.IP
's documentation states it is a deprecated option. As I think running anhc
service inside docker is probably a common use case I'd suggest removing the deprecation notice in theConfig.IP
option. Alternatively, allowing a customdnssd
configuration but I don't think there are any other parameters that might be worth overriding so the first option seems more convenient. A third option would be to allow specifying a dns entry and resolve it instead of passing an IP address, this would keep things dynamic while allowing you to override the advertised IP.Thanks for the awesome work :)
Regards
David
The text was updated successfully, but these errors were encountered: