ListenHost, how is it set?

How is ListenHost actually set in caddy currently? A simple grep does not yield much.

in CoreDNS I can’t use ResolveTCPAddr as I’m a DNS server. I could use a bind-like directive to bind to specific ip addresses.

But I still don’t understand how it currently is used in Caddy :confused:

It’s set in bind.go’s setup function.

So the HTTP server has a bind directive, like so: bind which will bind that listener to instead of :port (default).

Does that help?

Yes, I just double checked the code of that bind directive. Quite a hack :slight_smile:

So I need this as well and will port that directive over. I do believe that it needs a list of IP addresses, i.e. bind to multiple interfaces… But that can all come later.

Thanks for the help.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.