set an ALPN value in the tls.Config
@@ -21,6 +21,7 @@ import (
const certValidityPeriod = 100 * 365 * 24 * time.Hour // ~100 years
const certificatePrefix = "libp2p-tls-handshake:"
+const alpn string = "libp2p"
var extensionID = getPrefixedExtensionID([]int{1, 1})
@@ -50,6 +51,7 @@ func NewIdentity(privKey ic.PrivKey) (*Identity, error) {
VerifyPeerCertificate: func(_ [][]byte, _ [][]*x509.Certificate) error {
panic("tls config not specialized for peer")
},
+ NextProtos: []string{alpn},
SessionTicketsDisabled: true,
},
}, nil
