Skip to content

Commit

Permalink
Merge pull request #182 from multiformats/marco/sni
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoPolo authored Sep 8, 2022
2 parents e8c0913 + cbdb5fa commit 450ddd9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions protocols.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const (
P_GARLIC32 = 0x01BF
P_P2P_WEBRTC_DIRECT = 0x0114
P_TLS = 0x01c0
P_SNI = 0x01c1
P_NOISE = 0x01c6
P_WS = 0x01DD
P_WSS = 0x01DE // deprecated alias for /tls/ws
Expand Down Expand Up @@ -228,6 +229,13 @@ var (
Code: P_TLS,
VCode: CodeToVarint(P_TLS),
}
protoSNI = Protocol{
Name: "sni",
Size: LengthPrefixedVarSize,
Code: P_SNI,
VCode: CodeToVarint(P_SNI),
Transcoder: TranscoderDns,
}
protoNOISE = Protocol{
Name: "noise",
Code: P_NOISE,
Expand Down Expand Up @@ -285,6 +293,7 @@ func init() {
protoUNIX,
protoP2P_WEBRTC_DIRECT,
protoTLS,
protoSNI,
protoNOISE,
protoWS,
protoWSS,
Expand Down

0 comments on commit 450ddd9

Please sign in to comment.