1
1
Fork 0
mirror of https://git.sr.ht/~emersion/tlstunnel synced 2024-04-28 00:35:05 +02:00

Disallow frontends without any listening address

This commit is contained in:
Simon Ser 2022-06-25 11:46:14 +02:00
parent d1812162a8
commit 9a879327c3

View File

@ -64,6 +64,10 @@ func parseFrontend(srv *Server, d *scfg.Directive) error {
addresses = append(addresses, listenDirective.Params...)
}
if len(addresses) == 0 {
return fmt.Errorf("missing listening addresses in frontend block")
}
for _, addr := range addresses {
host, port, err := net.SplitHostPort(addr)
if err != nil {