Commit d94957f 1 parent 9bc1395 commit d94957f Copy full SHA for d94957f
File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,8 @@ func TestConstructSucceeds(t *testing.T) {
190
190
"/ip4/127.0.0.1/tcp/127/noise" ,
191
191
"/ip4/127.0.0.1/tcp/127/wss" ,
192
192
"/ip4/127.0.0.1/tcp/127/wss" ,
193
+ "/ip4/127.0.0.1/tcp/127/webrtc-direct" ,
194
+ "/ip4/127.0.0.1/tcp/127/webrtc" ,
193
195
}
194
196
195
197
for _ , a := range cases {
Original file line number Diff line number Diff line change @@ -31,14 +31,15 @@ const (
31
31
P_ONION3 = 445
32
32
P_GARLIC64 = 446
33
33
P_GARLIC32 = 447
34
- P_P2P_WEBRTC_DIRECT = 276
34
+ P_P2P_WEBRTC_DIRECT = 276 // Deprecated. use webrtc-direct instead
35
35
P_TLS = 448
36
36
P_SNI = 449
37
37
P_NOISE = 454
38
38
P_WS = 477
39
39
P_WSS = 478 // deprecated alias for /tls/ws
40
40
P_PLAINTEXTV2 = 7367777
41
- P_WEBRTC = 280
41
+ P_WEBRTC_DIRECT = 280
42
+ P_WEBRTC = 281
42
43
)
43
44
44
45
var (
@@ -262,6 +263,11 @@ var (
262
263
Code : P_WSS ,
263
264
VCode : CodeToVarint (P_WSS ),
264
265
}
266
+ protoWebRTCDirect = Protocol {
267
+ Name : "webrtc-direct" ,
268
+ Code : P_WEBRTC_DIRECT ,
269
+ VCode : CodeToVarint (P_WEBRTC_DIRECT ),
270
+ }
265
271
protoWebRTC = Protocol {
266
272
Name : "webrtc" ,
267
273
Code : P_WEBRTC ,
@@ -305,6 +311,7 @@ func init() {
305
311
protoWS ,
306
312
protoWSS ,
307
313
protoPlaintextV2 ,
314
+ protoWebRTCDirect ,
308
315
protoWebRTC ,
309
316
} {
310
317
if err := AddProtocol (p ); err != nil {
You can’t perform that action at this time.
0 commit comments