1
1
Fork 0
mirror of https://git.sr.ht/~emersion/tlstunnel synced 2024-05-11 09:36:14 +02:00

Remove listen directive

The name is misleading, because we're doing some magic to figure out
what server name to obtain a certificate for. In other words,
`listen example.org:443` would actually listen without binding to a
particular IP address (same as `listen :443`).
This commit is contained in:
Simon Ser 2020-09-09 13:18:18 +02:00
parent 758cac1f77
commit f4d13a4101
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

View File

@ -44,12 +44,7 @@ func parseFrontend(srv *Server, d *Directive) error {
}
var listenNames []string
for _, listenDirective := range d.ChildrenByName("listen") {
var listenAddr string
if err := listenDirective.ParseParams(&listenAddr); err != nil {
return err
}
for _, listenAddr := range d.Params {
host, port, err := net.SplitHostPort(listenAddr)
if err != nil {
return fmt.Errorf("failed to parse listen address %q: %v", listenAddr, err)