Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mf
go-multiaddr
Commits
ccfa609d
Unverified
Commit
ccfa609d
authored
Mar 31, 2023
by
Marco Munizaga
Committed by
GitHub
Mar 31, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #195 from multiformats/marco/webrtc-proto-names
Update webrtc protocols after rename
parents
9bc13950
d94957f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
multiaddr_test.go
multiaddr_test.go
+2
-0
protocols.go
protocols.go
+9
-2
No files found.
multiaddr_test.go
View file @
ccfa609d
...
@@ -190,6 +190,8 @@ func TestConstructSucceeds(t *testing.T) {
...
@@ -190,6 +190,8 @@ func TestConstructSucceeds(t *testing.T) {
"/ip4/127.0.0.1/tcp/127/noise"
,
"/ip4/127.0.0.1/tcp/127/noise"
,
"/ip4/127.0.0.1/tcp/127/wss"
,
"/ip4/127.0.0.1/tcp/127/wss"
,
"/ip4/127.0.0.1/tcp/127/wss"
,
"/ip4/127.0.0.1/tcp/127/wss"
,
"/ip4/127.0.0.1/tcp/127/webrtc-direct"
,
"/ip4/127.0.0.1/tcp/127/webrtc"
,
}
}
for
_
,
a
:=
range
cases
{
for
_
,
a
:=
range
cases
{
...
...
protocols.go
View file @
ccfa609d
...
@@ -31,14 +31,15 @@ const (
...
@@ -31,14 +31,15 @@ const (
P_ONION3
=
445
P_ONION3
=
445
P_GARLIC64
=
446
P_GARLIC64
=
446
P_GARLIC32
=
447
P_GARLIC32
=
447
P_P2P_WEBRTC_DIRECT
=
276
P_P2P_WEBRTC_DIRECT
=
276
// Deprecated. use webrtc-direct instead
P_TLS
=
448
P_TLS
=
448
P_SNI
=
449
P_SNI
=
449
P_NOISE
=
454
P_NOISE
=
454
P_WS
=
477
P_WS
=
477
P_WSS
=
478
// deprecated alias for /tls/ws
P_WSS
=
478
// deprecated alias for /tls/ws
P_PLAINTEXTV2
=
7367777
P_PLAINTEXTV2
=
7367777
P_WEBRTC
=
280
P_WEBRTC_DIRECT
=
280
P_WEBRTC
=
281
)
)
var
(
var
(
...
@@ -262,6 +263,11 @@ var (
...
@@ -262,6 +263,11 @@ var (
Code
:
P_WSS
,
Code
:
P_WSS
,
VCode
:
CodeToVarint
(
P_WSS
),
VCode
:
CodeToVarint
(
P_WSS
),
}
}
protoWebRTCDirect
=
Protocol
{
Name
:
"webrtc-direct"
,
Code
:
P_WEBRTC_DIRECT
,
VCode
:
CodeToVarint
(
P_WEBRTC_DIRECT
),
}
protoWebRTC
=
Protocol
{
protoWebRTC
=
Protocol
{
Name
:
"webrtc"
,
Name
:
"webrtc"
,
Code
:
P_WEBRTC
,
Code
:
P_WEBRTC
,
...
@@ -305,6 +311,7 @@ func init() {
...
@@ -305,6 +311,7 @@ func init() {
protoWS
,
protoWS
,
protoWSS
,
protoWSS
,
protoPlaintextV2
,
protoPlaintextV2
,
protoWebRTCDirect
,
protoWebRTC
,
protoWebRTC
,
}
{
}
{
if
err
:=
AddProtocol
(
p
);
err
!=
nil
{
if
err
:=
AddProtocol
(
p
);
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment