Repository navigation
py-libp2p v0.8.1
Patch release with WebSocket transport fixes and a WebRTC-Direct improvement.
Breaking Changes
wssdials 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 setverify_mode = CERT_NONEandcheck_hostname = False, so any certificate was accepted. Self-signed endpoints now needWebsocketConfig(insecure_skip_verify=True)or an explicittls_client_config. (#1550)
Bugfixes
- The WebSocket transport now dials
/dns,/dns4and/dns6addresses by name, so the TLS server name and theHostheader carry the name and peers behind a TLS-terminating proxy (CDN edge, tunnel) can be reached. Only/dnsaddris resolved before dialing, anddns_resolution_timeout/dns_max_retriesapply 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
OpenConnectionErrornaming the underlyingsslerror instead ofWebSocket handshake timeoutafter the fullhandshake_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
aioicehas no local lite mode, the muxed listener connection'scheck_startis replaced with a respond-only version that completes ICE on the controlling dialer's nomination. (#1512)
Install
pip install --upgrade libp2p==0.8.1Full changelog: v0.8.0...v0.8.1