Skip to content

Commit e0eb8cd

Browse files
add support for WebTransport
1 parent f5adc3b commit e0eb8cd

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

multiaddr_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ func TestConstructSucceeds(t *testing.T) {
157157
"/ip4/127.0.0.1/tcp/1234",
158158
"/ip4/127.0.0.1/tcp/1234/",
159159
"/ip4/127.0.0.1/udp/1234/quic",
160+
"/ip4/127.0.0.1/udp/1234/quic/webtransport",
160161
"/ip4/127.0.0.1/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC",
161162
"/ip4/127.0.0.1/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC/tcp/1234",
162163
"/ip4/127.0.0.1/ipfs/k2k4r8oqamigqdo6o7hsbfwd45y70oyynp98usk7zmyfrzpqxh1pohl7",

protocols.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const (
1515
P_IP6ZONE = 0x002A
1616
P_IPCIDR = 0x002B
1717
P_QUIC = 0x01CC
18+
P_WEBTRANSPORT = 0x01D1
1819
P_SCTP = 0x0084
1920
P_CIRCUIT = 0x0122
2021
P_UDT = 0x012D
@@ -178,6 +179,11 @@ var (
178179
Code: P_QUIC,
179180
VCode: CodeToVarint(P_QUIC),
180181
}
182+
protoWEBTRANSPORT = Protocol{
183+
Name: "webtransport",
184+
Code: P_WEBTRANSPORT,
185+
VCode: CodeToVarint(P_WEBTRANSPORT),
186+
}
181187
protoHTTP = Protocol{
182188
Name: "http",
183189
Code: P_HTTP,
@@ -257,6 +263,7 @@ func init() {
257263
protoUTP,
258264
protoUDT,
259265
protoQUIC,
266+
protoWEBTRANSPORT,
260267
protoHTTP,
261268
protoHTTPS,
262269
protoP2P,

0 commit comments

Comments
 (0)