Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SNI #182

Merged
merged 1 commit into from
Sep 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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