Skip to content

Commit a40b139

Browse files
add a codepoint for the plaintextv2 protocol
1 parent 71e3298 commit a40b139

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

protocols.go

+7
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const (
3232
P_NOISE = 0x01c6
3333
P_WS = 0x01DD
3434
P_WSS = 0x01DE // deprecated alias for /tls/ws
35+
P_PLAINTEXTV2 = 0x706c61
3536
)
3637

3738
var (
@@ -209,6 +210,11 @@ var (
209210
Code: P_NOISE,
210211
VCode: CodeToVarint(P_NOISE),
211212
}
213+
protoPlaintextV2 = Protocol{
214+
Name: "plaintextv2",
215+
Code: P_PLAINTEXTV2,
216+
VCode: CodeToVarint(P_PLAINTEXTV2),
217+
}
212218
protoWS = Protocol{
213219
Name: "ws",
214220
Code: P_WS,
@@ -251,6 +257,7 @@ func init() {
251257
protoNOISE,
252258
protoWS,
253259
protoWSS,
260+
protoPlaintextV2,
254261
} {
255262
if err := AddProtocol(p); err != nil {
256263
panic(err)

0 commit comments

Comments
 (0)