Skip to content

v0.8.1

Latest

Choose a tag to compare

@sumanjeet0012 sumanjeet0012 released this 22 Oct 19:42
· 11 commits to main since this release
v0.8.1
f1ec9c6

py-libp2p v0.8.1

Patch release with WebSocket transport fixes and a WebRTC-Direct improvement.

Breaking Changes

  • wss dials now verify the server certificate by default. When no explicit TLS client configuration is provided, the dial verifies against the system trust store and checks the hostname, matching go-libp2p and js-libp2p. Previously the default client context set verify_mode = CERT_NONE and check_hostname = False, so any certificate was accepted. Self-signed endpoints now need WebsocketConfig(insecure_skip_verify=True) or an explicit tls_client_config. (#1550)

Bugfixes

  • The WebSocket transport now dials /dns, /dns4 and /dns6 addresses by name, so the TLS server name and the Host header carry the name and peers behind a TLS-terminating proxy (CDN edge, tunnel) can be reached. Only /dnsaddr is resolved before dialing, and dns_resolution_timeout / dns_max_retries apply only to that resolution. (#1548)
  • A failed WebSocket dial now reports why it failed and closes its socket. The TLS handshake and WebSocket upgrade run in the dialing task instead of the Swarm background nursery, so a refused certificate raises OpenConnectionError naming the underlying ssl error instead of WebSocket handshake timeout after the full handshake_timeout; the TCP connection is now closed on every failure path rather than left open for the lifetime of the Swarm. (#1554)

Features

  • The WebRTC-Direct listener now acts as a true ICE-Lite agent: it answers the dialer's STUN connectivity checks but never initiates its own, matching the spec and go-libp2p / rust-libp2p. Since aioice has no local lite mode, the muxed listener connection's check_start is replaced with a respond-only version that completes ICE on the controlling dialer's nomination. (#1512)

Install

pip install --upgrade libp2p==0.8.1

Full changelog: v0.8.0...v0.8.1