From 696f50ab79ec4cd15fb52f0f9bf30d01115f4c6b Mon Sep 17 00:00:00 2001 From: Chinmay Kousik Date: Sun, 17 Jul 2022 15:09:29 +0530 Subject: [PATCH] Add webrtc (#179) * Add x-webrtc * update webrtc protocol * address review comments * fix fmt * update code to 0x118 --- protocols.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/protocols.go b/protocols.go index 28b3959..fc97ab3 100644 --- a/protocols.go +++ b/protocols.go @@ -36,6 +36,7 @@ const ( P_WS = 0x01DD P_WSS = 0x01DE // deprecated alias for /tls/ws P_PLAINTEXTV2 = 0x706c61 + P_WEBRTC = 0x118 ) var ( @@ -247,6 +248,11 @@ var ( Code: P_WSS, VCode: CodeToVarint(P_WSS), } + protoWebRTC = Protocol{ + Name: "webrtc", + Code: P_WEBRTC, + VCode: CodeToVarint(P_WEBRTC), + } ) func init() { @@ -283,6 +289,7 @@ func init() { protoWS, protoWSS, protoPlaintextV2, + protoWebRTC, } { if err := AddProtocol(p); err != nil { panic(err)