mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-15 03:11:02 +01:00
bca8944e7a
- handle the same AlPN list - use dev build tag for debugging purposes
18 lines
324 B
Go
18 lines
324 B
Go
//go:build !dev
|
|
|
|
package tls
|
|
|
|
import (
|
|
"crypto/tls"
|
|
"fmt"
|
|
)
|
|
|
|
func ServerQUICTLSConfig(originTLSCfg *tls.Config) (*tls.Config, error) {
|
|
if originTLSCfg == nil {
|
|
return nil, fmt.Errorf("valid TLS config is required for QUIC listener")
|
|
}
|
|
cfg := originTLSCfg.Clone()
|
|
cfg.NextProtos = []string{nbalpn}
|
|
return cfg, nil
|
|
}
|