From ece93656ba52f8b68ae62da656e76f9afbfabae8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Nov 2022 11:12:33 +0000 Subject: [PATCH] Bump github.com/multiformats/go-multiaddr from 0.6.0 to 0.8.0 Bumps [github.com/multiformats/go-multiaddr](https://github.com/multiformats/go-multiaddr) from 0.6.0 to 0.8.0. - [Release notes](https://github.com/multiformats/go-multiaddr/releases) - [Commits](https://github.com/multiformats/go-multiaddr/compare/v0.6.0...v0.8.0) --- updated-dependencies: - dependency-name: github.com/multiformats/go-multiaddr dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 7 +- .../multiformats/go-multiaddr/doc.go | 41 +++++---- .../multiformats/go-multiaddr/filter.go | 5 +- .../multiformats/go-multiaddr/interface.go | 13 +-- .../multiformats/go-multiaddr/net/net.go | 16 ++-- .../multiformats/go-multiaddr/protocols.go | 89 ++++++++++++------- .../multiformats/go-multiaddr/version.json | 2 +- vendor/modules.txt | 4 +- 9 files changed, 101 insertions(+), 78 deletions(-) diff --git a/go.mod b/go.mod index 1071740d..bef2644e 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/libp2p/go-libp2p-pubsub v0.7.1 github.com/miekg/dns v1.1.49 // indirect github.com/multiformats/go-base32 v0.0.4 // indirect - github.com/multiformats/go-multiaddr v0.6.0 + github.com/multiformats/go-multiaddr v0.8.0 github.com/multiformats/go-multihash v0.1.0 // indirect github.com/onsi/ginkgo v1.16.5 // indirect github.com/prometheus/client_golang v1.13.0 diff --git a/go.sum b/go.sum index 3c06b7a5..4eb23380 100644 --- a/go.sum +++ b/go.sum @@ -71,8 +71,6 @@ filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7 git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw= git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9/go.mod h1:BVJwbDfVjCjoFiKrhkei6NdGcZYpkDkdyCdg1ukytRA= -github.com/0xPolygon/go-ibft v0.0.0-20220729102524-0f95a9c3a08c h1:y9Fw+byHhcrV8378z20d2WlyIoHOZiZbPIVAQ9VDuyw= -github.com/0xPolygon/go-ibft v0.0.0-20220729102524-0f95a9c3a08c/go.mod h1:pXhBaK+CcHr3eUAWynKyHGTxgDwpJ3O1tvbGthN+pN4= github.com/0xPolygon/go-ibft v0.0.0-20220810095021-e43142f8d267 h1:+mFLx9IKW16fOcTKjZjkom3TGnihOuPwYAz2c6+UUWQ= github.com/0xPolygon/go-ibft v0.0.0-20220810095021-e43142f8d267/go.mod h1:QPrugDXgsCFy2FeCJ0YokPrnyi1GoLhDj/PLO1dSoNY= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= @@ -661,6 +659,7 @@ github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -920,8 +919,8 @@ github.com/multiformats/go-multiaddr v0.3.3/go.mod h1:lCKNGP1EQ1eZ35Za2wlqnabm9x github.com/multiformats/go-multiaddr v0.4.0/go.mod h1:YcpyLH8ZPudLxQlemYBPhSm0/oCXAT8Z4mzFpyoPyRc= github.com/multiformats/go-multiaddr v0.4.1/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM= github.com/multiformats/go-multiaddr v0.5.0/go.mod h1:3KAxNkUqLTJ20AAwN4XVX4kZar+bR+gh4zgbfr3SNug= -github.com/multiformats/go-multiaddr v0.6.0 h1:qMnoOPj2s8xxPU5kZ57Cqdr0hHhARz7mFsPMIiYNqzg= -github.com/multiformats/go-multiaddr v0.6.0/go.mod h1:F4IpaKZuPP360tOMn2Tpyu0At8w23aRyVqeK0DbFeGM= +github.com/multiformats/go-multiaddr v0.8.0 h1:aqjksEcqK+iD/Foe1RRFsGZh8+XFiGo7FgUCZlpv3LU= +github.com/multiformats/go-multiaddr v0.8.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= github.com/multiformats/go-multiaddr-dns v0.3.1 h1:QgQgR+LQVt3NPTjbrLLpsaT2ufAA2y0Mkk+QRVJbW3A= github.com/multiformats/go-multiaddr-dns v0.3.1/go.mod h1:G/245BRQ6FJGmryJCrOuTdB37AMA5AMOVuO6NY3JwTk= github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= diff --git a/vendor/github.com/multiformats/go-multiaddr/doc.go b/vendor/github.com/multiformats/go-multiaddr/doc.go index d8c37b26..b80f3ab2 100644 --- a/vendor/github.com/multiformats/go-multiaddr/doc.go +++ b/vendor/github.com/multiformats/go-multiaddr/doc.go @@ -7,30 +7,29 @@ Learn more at https://github.com/multiformats/multiaddr Basic Use: - import ( - "bytes" - "strings" - ma "github.com/multiformats/go-multiaddr" - ) + import ( + "bytes" + "strings" + ma "github.com/multiformats/go-multiaddr" + ) - // construct from a string (err signals parse failure) - m1, err := ma.NewMultiaddr("/ip4/127.0.0.1/udp/1234") + // construct from a string (err signals parse failure) + m1, err := ma.NewMultiaddr("/ip4/127.0.0.1/udp/1234") - // construct from bytes (err signals parse failure) - m2, err := ma.NewMultiaddrBytes(m1.Bytes()) + // construct from bytes (err signals parse failure) + m2, err := ma.NewMultiaddrBytes(m1.Bytes()) - // true - strings.Equal(m1.String(), "/ip4/127.0.0.1/udp/1234") - strings.Equal(m1.String(), m2.String()) - bytes.Equal(m1.Bytes(), m2.Bytes()) - m1.Equal(m2) - m2.Equal(m1) - - // tunneling (en/decap) - printer, _ := ma.NewMultiaddr("/ip4/192.168.0.13/tcp/80") - proxy, _ := ma.NewMultiaddr("/ip4/10.20.30.40/tcp/443") - printerOverProxy := proxy.Encapsulate(printer) - proxyAgain := printerOverProxy.Decapsulate(printer) + // true + strings.Equal(m1.String(), "/ip4/127.0.0.1/udp/1234") + strings.Equal(m1.String(), m2.String()) + bytes.Equal(m1.Bytes(), m2.Bytes()) + m1.Equal(m2) + m2.Equal(m1) + // tunneling (en/decap) + printer, _ := ma.NewMultiaddr("/ip4/192.168.0.13/tcp/80") + proxy, _ := ma.NewMultiaddr("/ip4/10.20.30.40/tcp/443") + printerOverProxy := proxy.Encapsulate(printer) + proxyAgain := printerOverProxy.Decapsulate(printer) */ package multiaddr diff --git a/vendor/github.com/multiformats/go-multiaddr/filter.go b/vendor/github.com/multiformats/go-multiaddr/filter.go index cc13aeeb..ba915da0 100644 --- a/vendor/github.com/multiformats/go-multiaddr/filter.go +++ b/vendor/github.com/multiformats/go-multiaddr/filter.go @@ -85,8 +85,9 @@ func (fs *Filters) RemoveLiteral(ipnet net.IPNet) (removed bool) { // default is returned. // // TODO: currently, the last filter to match wins always, but it shouldn't be that way. -// Instead, the highest-specific last filter should win; that way more specific filters -// override more general ones. +// +// Instead, the highest-specific last filter should win; that way more specific filters +// override more general ones. func (fs *Filters) AddrBlocked(a Multiaddr) (deny bool) { var ( netip net.IP diff --git a/vendor/github.com/multiformats/go-multiaddr/interface.go b/vendor/github.com/multiformats/go-multiaddr/interface.go index 82cc7640..699c54d1 100644 --- a/vendor/github.com/multiformats/go-multiaddr/interface.go +++ b/vendor/github.com/multiformats/go-multiaddr/interface.go @@ -12,11 +12,10 @@ Learn more here: https://github.com/multiformats/multiaddr Multiaddrs have both a binary and string representation. - import ma "github.com/multiformats/go-multiaddr" - - addr, err := ma.NewMultiaddr("/ip4/1.2.3.4/tcp/80") - // err non-nil when parsing failed. + import ma "github.com/multiformats/go-multiaddr" + addr, err := ma.NewMultiaddr("/ip4/1.2.3.4/tcp/80") + // err non-nil when parsing failed. */ type Multiaddr interface { json.Marshaler @@ -48,9 +47,11 @@ type Multiaddr interface { // Encapsulate(Multiaddr) Multiaddr - // Decapsultate removes a Multiaddr wrapping. For example: + // Decapsulate removes a Multiaddr wrapping. For example: // - // /ip4/1.2.3.4/tcp/80 decapsulate /ip4/1.2.3.4 = /tcp/80 + // /ip4/1.2.3.4/tcp/80 decapsulate /tcp/80 = /ip4/1.2.3.4 + // /ip4/1.2.3.4/tcp/80 decapsulate /udp/80 = /ip4/1.2.3.4/tcp/80 + // /ip4/1.2.3.4/tcp/80 decapsulate /ip4/1.2.3.4 = nil // Decapsulate(Multiaddr) Multiaddr diff --git a/vendor/github.com/multiformats/go-multiaddr/net/net.go b/vendor/github.com/multiformats/go-multiaddr/net/net.go index 16f1bbc5..10fcff70 100644 --- a/vendor/github.com/multiformats/go-multiaddr/net/net.go +++ b/vendor/github.com/multiformats/go-multiaddr/net/net.go @@ -81,11 +81,11 @@ func wrap(nconn net.Conn, laddr, raddr ma.Multiaddr) Conn { // This function does it's best to avoid "hiding" methods exposed by the wrapped // type. Guarantees: // -// * If the wrapped connection exposes the "half-open" closer methods -// (CloseWrite, CloseRead), these will be available on the wrapped connection -// via type assertions. -// * If the wrapped connection is a UnixConn, IPConn, TCPConn, or UDPConn, all -// methods on these wrapped connections will be available via type assertions. +// - If the wrapped connection exposes the "half-open" closer methods +// (CloseWrite, CloseRead), these will be available on the wrapped connection +// via type assertions. +// - If the wrapped connection is a UnixConn, IPConn, TCPConn, or UDPConn, all +// methods on these wrapped connections will be available via type assertions. func WrapNetConn(nconn net.Conn) (Conn, error) { if nconn == nil { return nil, fmt.Errorf("failed to convert nconn.LocalAddr: nil") @@ -224,9 +224,9 @@ func (nla *netListenerAdapter) Accept() (net.Conn, error) { // NetListener turns this Listener into a net.Listener. // -// * Connections returned from Accept implement multiaddr/net Conn. -// * Calling WrapNetListener on the net.Listener returned by this function will -// return the original (underlying) multiaddr/net Listener. +// - Connections returned from Accept implement multiaddr/net Conn. +// - Calling WrapNetListener on the net.Listener returned by this function will +// return the original (underlying) multiaddr/net Listener. func NetListener(l Listener) net.Listener { return &netListenerAdapter{l} } diff --git a/vendor/github.com/multiformats/go-multiaddr/protocols.go b/vendor/github.com/multiformats/go-multiaddr/protocols.go index 28b39599..db0b1218 100644 --- a/vendor/github.com/multiformats/go-multiaddr/protocols.go +++ b/vendor/github.com/multiformats/go-multiaddr/protocols.go @@ -3,39 +3,42 @@ package multiaddr // You **MUST** register your multicodecs with // https://github.com/multiformats/multicodec before adding them here. const ( - P_IP4 = 0x0004 - P_TCP = 0x0006 - P_DNS = 0x0035 // 4 or 6 - P_DNS4 = 0x0036 - P_DNS6 = 0x0037 - P_DNSADDR = 0x0038 - P_UDP = 0x0111 - P_DCCP = 0x0021 - P_IP6 = 0x0029 - P_IP6ZONE = 0x002A - P_IPCIDR = 0x002B - P_QUIC = 0x01CC - P_WEBTRANSPORT = 0x01D1 - P_CERTHASH = 0x01D2 - P_SCTP = 0x0084 - P_CIRCUIT = 0x0122 - P_UDT = 0x012D - P_UTP = 0x012E - P_UNIX = 0x0190 - P_P2P = 0x01A5 - P_IPFS = 0x01A5 // alias for backwards compatibility - P_HTTP = 0x01E0 - P_HTTPS = 0x01BB // deprecated alias for /tls/http - P_ONION = 0x01BC // also for backwards compatibility - P_ONION3 = 0x01BD - P_GARLIC64 = 0x01BE - P_GARLIC32 = 0x01BF - P_P2P_WEBRTC_DIRECT = 0x0114 - P_TLS = 0x01c0 - P_NOISE = 0x01c6 - P_WS = 0x01DD - P_WSS = 0x01DE // deprecated alias for /tls/ws - P_PLAINTEXTV2 = 0x706c61 + P_IP4 = 4 + P_TCP = 6 + P_DNS = 53 // 4 or 6 + P_DNS4 = 54 + P_DNS6 = 55 + P_DNSADDR = 56 + P_UDP = 273 + P_DCCP = 33 + P_IP6 = 41 + P_IP6ZONE = 42 + P_IPCIDR = 43 + P_QUIC = 460 + P_QUIC_V1 = 461 + P_WEBTRANSPORT = 465 + P_CERTHASH = 466 + P_SCTP = 132 + P_CIRCUIT = 290 + P_UDT = 301 + P_UTP = 302 + P_UNIX = 400 + P_P2P = 421 + P_IPFS = P_P2P // alias for backwards compatibility + P_HTTP = 480 + P_HTTPS = 443 // deprecated alias for /tls/http + P_ONION = 444 // also for backwards compatibility + P_ONION3 = 445 + P_GARLIC64 = 446 + P_GARLIC32 = 447 + P_P2P_WEBRTC_DIRECT = 276 + P_TLS = 448 + P_SNI = 449 + P_NOISE = 454 + P_WS = 477 + P_WSS = 478 // deprecated alias for /tls/ws + P_PLAINTEXTV2 = 7367777 + P_WEBRTC = 280 ) var ( @@ -180,6 +183,11 @@ var ( Code: P_QUIC, VCode: CodeToVarint(P_QUIC), } + protoQUICV1 = Protocol{ + Name: "quic-v1", + Code: P_QUIC_V1, + VCode: CodeToVarint(P_QUIC_V1), + } protoWEBTRANSPORT = Protocol{ Name: "webtransport", Code: P_WEBTRANSPORT, @@ -227,6 +235,13 @@ var ( Code: P_TLS, VCode: CodeToVarint(P_TLS), } + protoSNI = Protocol{ + Name: "sni", + Size: LengthPrefixedVarSize, + Code: P_SNI, + VCode: CodeToVarint(P_SNI), + Transcoder: TranscoderDns, + } protoNOISE = Protocol{ Name: "noise", Code: P_NOISE, @@ -247,6 +262,11 @@ var ( Code: P_WSS, VCode: CodeToVarint(P_WSS), } + protoWebRTC = Protocol{ + Name: "webrtc", + Code: P_WEBRTC, + VCode: CodeToVarint(P_WEBRTC), + } ) func init() { @@ -271,6 +291,7 @@ func init() { protoUTP, protoUDT, protoQUIC, + protoQUICV1, protoWEBTRANSPORT, protoCERTHASH, protoHTTP, @@ -279,10 +300,12 @@ func init() { protoUNIX, protoP2P_WEBRTC_DIRECT, protoTLS, + protoSNI, protoNOISE, protoWS, protoWSS, protoPlaintextV2, + protoWebRTC, } { if err := AddProtocol(p); err != nil { panic(err) diff --git a/vendor/github.com/multiformats/go-multiaddr/version.json b/vendor/github.com/multiformats/go-multiaddr/version.json index 42c14d1b..0ad79e3b 100644 --- a/vendor/github.com/multiformats/go-multiaddr/version.json +++ b/vendor/github.com/multiformats/go-multiaddr/version.json @@ -1,3 +1,3 @@ { - "version": "v0.6.0" + "version": "v0.8.0" } diff --git a/vendor/modules.txt b/vendor/modules.txt index 59ac7b02..910b7fff 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -574,8 +574,8 @@ github.com/multiformats/go-base32 # github.com/multiformats/go-base36 v0.1.0 ## explicit; go 1.11 github.com/multiformats/go-base36 -# github.com/multiformats/go-multiaddr v0.6.0 -## explicit; go 1.17 +# github.com/multiformats/go-multiaddr v0.8.0 +## explicit; go 1.18 github.com/multiformats/go-multiaddr github.com/multiformats/go-multiaddr/net # github.com/multiformats/go-multiaddr-dns v0.3.1