diff --git a/directives.go b/directives.go index 3628fc9..830cd4b 100644 --- a/directives.go +++ b/directives.go @@ -59,7 +59,12 @@ func parseFrontend(srv *Server, d *scfg.Directive) error { frontend.Protocols = protocolDirective.Params } - for _, addr := range d.Params { + addresses := append([]string(nil), d.Params...) + for _, listenDirective := range d.Children.GetAll("listen") { + addresses = append(addresses, listenDirective.Params...) + } + + for _, addr := range addresses { host, port, err := net.SplitHostPort(addr) if err != nil { return fmt.Errorf("failed to parse frontend address %q: %v", addr, err) diff --git a/tlstunnel.1.scd b/tlstunnel.1.scd index d995250..d11243c 100644 --- a/tlstunnel.1.scd +++ b/tlstunnel.1.scd @@ -49,6 +49,9 @@ The following directives are supported: The frontend directive supports the following sub-directives: + *listen*
... + Additional addresses to listen on. + *backend*