Skip to content

Releases: libp2p/go-libp2p

v0.49.0

Choose a tag to compare

@github-actions github-actions released this 28 Jul 08:03

What's Changed

  • fix: relay candidate added into backoff list even if reservation on that relay candidate success by @chiragsoni81245 in #3482
  • feat: NonPublicAddrPublishing option by @lidel in #3489
  • fix(routing): prevent QueryEvent publish races by @lidel in #3490
  • fix(peer): drop empty addrs in peer records by @lidel in #3494
  • fix(peerstore): replace stale addrs on newer signed peer record by @lidel in #3487
  • feat(pstore): cap unconnected addrs per peer by @lidel in #3486
  • fix(config): emit fx DI registration events at debug level by @rvagg in #3498
  • Interrupt websocket reads during close by @MarcoPolo in #3496
  • fix(webrtc): cap remote addresses per ufrag by @lidel in #3500
  • Add ability to pass through TLS options to the QUIC transport. by @MarcoPolo in #3481
  • p2p/protocol/identify: bound the number of protocols accepted from peers by @Sahil-4555 in #3501
  • fix holepunch shutdown deadlock on canceled address discovery by @Sahil-4555 in #3504
  • refactor(swarm): move the connected / disconnected callbacks into the events emitter by @sukunrt in #3503
  • feat(autonatv2): expose AllowPrivateAddrs via an Option by @gmelodie in #3513
  • feat(websocket): share port with HTTP handler by @lidel in #3509
  • http/auth: close intermediate peer ID auth handshake responses by @Sahil-4555 in #3510
  • feat(webrtc): stable /certhash across restarts by @lidel in #3512
  • chore: update autotls example to p2p-forge v0.9.1 by @lidel in #3521
  • feat(webrtc): support webrtc-direct v2 by @lidel in #3520
  • fix: resolve concurrency bugs in eventbus and webtransport by @Sahil-4555 in #3518
  • fix(basichost): sort confirmed addrs by @lidel in #3526
  • fix(basichost): fix some bugs in addrs reachability manager by @sukunrt in #3528

New Contributors

Full Changelog: v0.48.0...v0.49.0

v0.48.0

Choose a tag to compare

@github-actions github-actions released this 17 Mar 21:59

A relatively minor update. Most changes were related to internal cleanup and getting the transport interop tests running again.

🔦 Highlights

  • When listening on 0.0.0.0, BasicHost.AllAddrs returns all the interface addrs of the machine. In v0.47 we'd unwittingly introduced this change, but on discussion decided to commit to it as returning all the addresses was correct. In the absence of this behaviour, there's no way for a user to get all the addrs the libp2p host is listening on. See #3460 for the discussion about this. #3468
  • Fix Deterministic WebTransport Key Generation for Go 1.26 #3320
  • Fix mocknet: make stream deadline methods noop instead of returning error

What's Changed

  • update go-netroute dependency by @MarcoPolo in #3421
  • add backwards compatibility for doctur with legacy behavior by @jpserrat in #3457
  • quicreuse: fix incorrect skip in TestReuseListenOnSpecificInterface by @MarcoPolo in #3417
  • Update to Go 1.25 by @MarcoPolo in #3462
  • refactor: apply go fix modernizers from Go 1.26 by @gammazero in #3463
  • webrtc: upgrade pion deps by @sukunrt in #3469
  • fix(mocknet): make stream deadline methods noop instead of returning error by @walldiss in #3471
  • basichost: advertise all interface addrs for unspecified listen addrs by @sukunrt in #3468
  • Bump transport interop Go toolchain by @MarcoPolo in #3477
  • ci: remove go-version parameter to default to go.mod version by @MarcoPolo in #3474
  • refactor(webtransport): Use keygen package for deterministic ecdsa key by @MarcoPolo in #3320
  • CI: Ignore known incompatibility with webtransport versions in interop test by @MarcoPolo in #3478

New Contributors

Full Changelog: v0.47.0...v0.48.0

v0.47.0

Choose a tag to compare

@github-actions github-actions released this 25 Jan 14:55
b93eda0

A relatively small release. The main changes are dependency updates and a couple of bug fixes. #3435 changes autonatv2 reachability logic, which should be a net win for most users.

Breaking Changes

  • A WebTransport Client in this version cannot dial older (pre v0.47.0) go-libp2p WebTransport servers. The reverse works. This is partly due to a handshake change in the latest draft RFC for WebTransport. WebTransport remains experimental while the RFC is in draft, but we expect no more breaking changes.
  • AllAddrs() Actually returns all interface addresses when listening on 0.0.0.0. See #3460 for more context. This changes an earlier intentional decision from #911.

What's Changed

New Contributors

Full Changelog: v0.46.0...v0.47.0

v0.46.0

Choose a tag to compare

@github-actions github-actions released this 13 Dec 09:43

What's Changed

  • fix(webrtc): use debug level for pion errors by @lidel in #3426
  • chore: update quic-go to v0.56.0 by @sukunrt in #3425
  • fix(mdns): filter addresses to reduce packet size by @lidel in #3434
  • chore: update quic-go to v0.57.1 by @sukunrt in #3439

Full Changelog: v0.45.0...v0.46.0

v0.45.0

Choose a tag to compare

@github-actions github-actions released this 06 Nov 04:06
d0ecbf9

A small release that adjust some noisy logging levels and adds a method for dynamically change the slog Handler for better integration with applications that use go-log.

What's Changed

  • fix(websocket): use debug level for operational noise errors by @lidel in #3413
  • chore: Update Drips ownedBy address in FUNDING.json by @p-shahi in #3422
  • feat(gologshim): Add SetDefaultHandler by @lidel in #3418

Full Changelog: v0.44.0...v0.45.0

v0.44.0

Choose a tag to compare

@github-actions github-actions released this 07 Oct 20:15

Highlights

Address Pipeline:

  • Observed Address Manager has been moved out of identify to its own package, github.com/libp2p/go-libp2p/p2p/host/obsaddrs
  • ⚠️ Identify Service doesn't support the DisableObservedAddrManager Option. The top level libp2p option DisableIdentifyAddressDiscovery works as it used to.

What's Changed

New Contributors

Full Changelog: v0.43.0...v0.44.0

v0.43.0

Choose a tag to compare

@github-actions github-actions released this 07 Aug 15:32
b75e678

Highlights

This is a small release to allow users to upgrade to the latest quic-go version as the quic-go API was changed heavily in quic-go v0.53

What's Changed

Full Changelog: v0.42.0...v0.43.0

v0.42.1

Choose a tag to compare

@github-actions github-actions released this 30 Jul 14:55

What's Changed

New Contributors

Full Changelog: v0.41.0...v0.42.1

v0.42.0

Choose a tag to compare

@github-actions github-actions released this 18 Jun 16:18
000582c

⚠ Breaking Changes

Added a new method, VerifySourceAddress(net.Addr) bool, to the Resource Manager interface.
For more details see the Source Address Verification section.

For custom implementation which want to opt out of Source Address Verification and keep the existing behavior, return false from the method.

🔦 Highlights

Per Address Reachability via AutoNAT v2

libp2p hosts can now determine reachability for individual addresses using AutoNATV2. To opt in to reachability checking use the EnableAutoNATV2 libp2p option. Using this nodes can now determine their IPv4, IPv6, and browser address reachability separately. In a future release, AutoRelay will use this information and make appropriate relay reservations accordingly. https://pkg.go.dev/github.com/libp2p/go-libp2p#EnableAutoNATv2

To query addresses by their reachability, ConfirmedAddrs() (reachable, unreachable, unknown []ma.Multiaddr) that provides Reachability information per host address. https://pkg.go.dev/github.com/libp2p/go-libp2p/p2p/host/basic#BasicHost.ConfirmedAddrs
For notifications, Subscribe to the event event.EvtHostReachableAddrsChanged https://pkg.go.dev/github.com/libp2p/go-libp2p/core/event#EvtHostReachableAddrsChanged

Rate Limiting

We've introduced the package github.com/libp2p/go-libp2p/x/rate for rate limiting. The struct rate.Limiter provides Global, Network Specific, and Subnet Specific rate limiting. The Subnet specific rate limits allows for better DoS Protection by rate limiting malicious IPs. https://pkg.go.dev/github.com/libp2p/go-libp2p/x/rate

Use Limit(f func(s network.Stream)) func(s network.Stream) on Limiter to limit specific stream handlers. For example, within libp2p, the Identify Service uses this as
ids.Host.SetStreamHandler(IDPush, ids.rateLimiter.Limit(ids.handlePush)) to rate limit the number of times peers can perform identify push.

For non Stream use cases use the Allow(ip) method on the limiter.

Connection Rate Limiting

New connection requests are now rate limited per IP. By default we allow 1 connection every 5 seconds from an IP address with a burst of 16 connections per IP. The burst is high enough that this should only block malicious peers.

To configure the connection rate limits, use the WithConnRateLimiters option on the Resource Manager. https://pkg.go.dev/github.com/libp2p/go-libp2p/p2p/host/resource-manager#WithConnRateLimiters

Source Address Verification for QUIC

This release introduces Source Address Verification for QUIC, preventing DoS attacks by spoofing IP addresses. See: https://www.rfc-editor.org/rfc/rfc9000.html#section-8 for details.

We are now gating incoming QUIC connections before the handshake is started. This further improves DoS protection by not wasting CPU on handshaking QUIC connections which would have been dropped by the Resource Manager.

Other changes

  • WebRTC Direct peers can now send messages of up to 256 kB (see spec: libp2p/specs#628)
  • Refactored the addressing code within BasicHost and moved it into Address Manager. In a future release, this will be exposed to users with an improved Address API for the libp2p Host.

What's Changed

New Contributors

Full Changelog: v0.41.0...v0.42.0

v0.41.1

Choose a tag to compare

@sukunrt sukunrt released this 24 Mar 18:51

What's Changed

7059eb5 conngater: fix incorrect err return value (#3219)
74c6860 fix(libp2phttp): bound NewStream timeout (#3225)
ccc4849 webrtc: fix memory leak with udpmux.muxedConnection context (#3243)
99a511f connmgr: fix transport association bug (#3221)
eb3ff9f autonatv2: fix server dial data request policy (#3247)
8ce45df Release v0.41.1

Full Changelog: v0.41.0...v0.41.1