mirror of
https://github.com/logos-messaging/go-multiaddr.git
synced 2026-01-02 13:03:11 +00:00
commit
7debba7a9f
@ -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",
|
||||
|
||||
@ -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},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user