diff --git a/go.mod b/go.mod index be2219e..91a0c79 100644 --- a/go.mod +++ b/go.mod @@ -6,12 +6,12 @@ require ( github.com/golang/mock v1.6.0 github.com/ipfs/go-log v1.0.4 github.com/klauspost/compress v1.11.7 - github.com/libp2p/go-libp2p-core v0.10.0 - github.com/libp2p/go-libp2p-tls v0.3.0 + github.com/libp2p/go-libp2p-core v0.10.1-0.20210921170543-f829c09c1ca0 + github.com/libp2p/go-libp2p-tls v0.3.1-0.20210921173952-a113dc2e87ca github.com/libp2p/go-netroute v0.1.3 github.com/lucas-clemente/quic-go v0.23.0 github.com/minio/sha256-simd v0.1.1 - github.com/multiformats/go-multiaddr v0.3.1 + github.com/multiformats/go-multiaddr v0.4.1 github.com/multiformats/go-multiaddr-fmt v0.1.0 github.com/onsi/ginkgo v1.16.4 github.com/onsi/gomega v1.13.0 diff --git a/go.sum b/go.sum index b117d58..a7445fb 100644 --- a/go.sum +++ b/go.sum @@ -220,11 +220,10 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= -github.com/libp2p/go-libp2p-core v0.10.0 h1:jFy7v5Muq58GTeYkPhGzIH8Qq4BFfziqc0ixPd/pP9k= -github.com/libp2p/go-libp2p-core v0.10.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= -github.com/libp2p/go-libp2p-tls v0.3.0 h1:8BgvUJiOTcj0Gp6XvEicF0rL5aUtRg/UzEdeZDmDlC8= -github.com/libp2p/go-libp2p-tls v0.3.0/go.mod h1:fwF5X6PWGxm6IDRwF3V8AVCCj/hOd5oFlg+wo2FxJDY= -github.com/libp2p/go-maddr-filter v0.1.0/go.mod h1:VzZhTXkMucEGGEOSKddrwGiOv0tUhgnKqNEmIAz/bPU= +github.com/libp2p/go-libp2p-core v0.10.1-0.20210921170543-f829c09c1ca0 h1:W1EqIm0+QVnfQ2SV138//D9NyAhseDxqLMoWvvhYsQQ= +github.com/libp2p/go-libp2p-core v0.10.1-0.20210921170543-f829c09c1ca0/go.mod h1:KlkHsZ0nKerWsXLZJm3LfFQwusI5k3iN4BgtYTE4IYE= +github.com/libp2p/go-libp2p-tls v0.3.1-0.20210921173952-a113dc2e87ca h1:zWNuadGdVHCSc+Z+CwLc8UOTYPyn/lHFU8Gjc46Oobk= +github.com/libp2p/go-libp2p-tls v0.3.1-0.20210921173952-a113dc2e87ca/go.mod h1:XbkcVbneyNWj5lHFNNkj+ykZKqudvBX40pGE+rU3JaU= github.com/libp2p/go-msgio v0.0.6/go.mod h1:4ecVB6d9f4BDSL5fqvPiC4A3KivjWn+Venn/1ALLMWA= github.com/libp2p/go-netroute v0.1.3 h1:1ngWRx61us/EpaKkdqkMjKk/ufr/JlIFYQAxV2XX8Ig= github.com/libp2p/go-netroute v0.1.3/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= @@ -279,13 +278,10 @@ github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= github.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU55txyt0p4aiWVohjo= -github.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u0xW5UouOmQQrn6a3Y= -github.com/multiformats/go-multiaddr v0.3.0/go.mod h1:dF9kph9wfJ+3VLAaeBqo9Of8x4fJxp6ggJGteB8HQTI= -github.com/multiformats/go-multiaddr v0.3.1 h1:1bxa+W7j9wZKTZREySx1vPMs2TqrYWjVZ7zE6/XLG1I= -github.com/multiformats/go-multiaddr v0.3.1/go.mod h1:uPbspcUPd5AfaP6ql3ujFY+QWzmBD8uLLL4bXW0XfGc= +github.com/multiformats/go-multiaddr v0.4.1 h1:Pq37uLx3hsyNlTDir7FZyU8+cFCTqd5y1KiM2IzOutI= +github.com/multiformats/go-multiaddr v0.4.1/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM= github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= github.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo= -github.com/multiformats/go-multiaddr-net v0.2.0/go.mod h1:gGdH3UXny6U3cKKYCvpXI5rnK7YaOIEOPVDI9tsJbEA= github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk= github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= diff --git a/transport.go b/transport.go index 3f97ebb..c768893 100644 --- a/transport.go +++ b/transport.go @@ -345,9 +345,11 @@ func (t *transport) Proxy() bool { return false } +var protoQuic = ma.ProtocolWithCode(ma.P_QUIC) + // Protocols returns the set of protocols handled by this transport. -func (t *transport) Protocols() []int { - return []int{ma.P_QUIC} +func (t *transport) Protocols() []ma.Protocol { + return []ma.Protocol{protoQuic} } func (t *transport) String() string { diff --git a/transport_test.go b/transport_test.go index 5f52ce0..494e0b6 100644 --- a/transport_test.go +++ b/transport_test.go @@ -53,7 +53,7 @@ var _ = Describe("Transport", func() { It("supports the QUIC protocol", func() { protocols := t.Protocols() Expect(protocols).To(HaveLen(1)) - Expect(protocols[0]).To(Equal(ma.P_QUIC)) + Expect(protocols[0].Code).To(Equal(ma.P_QUIC)) }) It("uses a conn that can interface assert to a UDPConn for dialing", func() {