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
22c78388
Unverified
Commit
22c78388
authored
Mar 17, 2017
by
Marten Seemann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add QUIC
parent
5ea81f9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
multiaddr_test.go
multiaddr_test.go
+4
-0
protocols.go
protocols.go
+2
-0
No files found.
multiaddr_test.go
View file @
22c78388
...
...
@@ -28,6 +28,7 @@ func TestConstructFails(t *testing.T) {
"/sctp"
,
"/udp/65536"
,
"/tcp/65536"
,
"/quic/65536"
,
"/onion/9imaq4ygg2iegci7:80"
,
"/onion/aaimaq4ygg2iegci7:80"
,
"/onion/timaq4ygg2iegci7:0"
,
...
...
@@ -41,6 +42,7 @@ func TestConstructFails(t *testing.T) {
"/ip4/127.0.0.1/udp"
,
"/ip4/127.0.0.1/tcp/jfodsajfidosajfoidsa"
,
"/ip4/127.0.0.1/tcp"
,
"/ip4/127.0.0.1/quic/1234"
,
"/ip4/127.0.0.1/ipfs"
,
"/ip4/127.0.0.1/ipfs/tcp"
,
"/unix"
,
...
...
@@ -60,6 +62,7 @@ func TestConstructSucceeds(t *testing.T) {
"/ip4/0.0.0.0"
,
"/ip6/::1"
,
"/ip6/2601:9:4f81:9700:803e:ca65:66e8:c21"
,
"/ip6/2601:9:4f81:9700:803e:ca65:66e8:c21/udp/1234/quic"
,
"/onion/timaq4ygg2iegci7:1234"
,
"/onion/timaq4ygg2iegci7:80/http"
,
"/udp/0"
,
...
...
@@ -81,6 +84,7 @@ func TestConstructSucceeds(t *testing.T) {
"/ip4/127.0.0.1/udp/0"
,
"/ip4/127.0.0.1/tcp/1234"
,
"/ip4/127.0.0.1/tcp/1234/"
,
"/ip4/127.0.0.1/udp/1234/quic"
,
"/ip4/127.0.0.1/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC"
,
"/ip4/127.0.0.1/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC/tcp/1234"
,
"/unix/a/b/c/d/e"
,
...
...
protocols.go
View file @
22c78388
...
...
@@ -26,6 +26,7 @@ const (
P_UDP
=
17
P_DCCP
=
33
P_IP6
=
41
P_QUIC
=
81
P_SCTP
=
132
P_UTP
=
301
P_UDT
=
302
...
...
@@ -53,6 +54,7 @@ var Protocols = []Protocol{
Protocol
{
P_ONION
,
96
,
"onion"
,
CodeToVarint
(
P_ONION
),
false
,
TranscoderOnion
},
Protocol
{
P_UTP
,
0
,
"utp"
,
CodeToVarint
(
P_UTP
),
false
,
nil
},
Protocol
{
P_UDT
,
0
,
"udt"
,
CodeToVarint
(
P_UDT
),
false
,
nil
},
Protocol
{
P_QUIC
,
0
,
"quic"
,
CodeToVarint
(
P_QUIC
),
false
,
nil
},
Protocol
{
P_HTTP
,
0
,
"http"
,
CodeToVarint
(
P_HTTP
),
false
,
nil
},
Protocol
{
P_HTTPS
,
0
,
"https"
,
CodeToVarint
(
P_HTTPS
),
false
,
nil
},
Protocol
{
P_IPFS
,
LengthPrefixedVarSize
,
"ipfs"
,
CodeToVarint
(
P_IPFS
),
false
,
TranscoderIPFS
},
...
...
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