peeroxide-v1.2.0
·
9 commits
to main
since this release
Added
SwarmHandle::dht()— exposes the underlyingHyperDhtHandlefor low-level DHT operations such as mutable/immutable record storage and manual peer lookup.SwarmHandle::key_pair()— exposes the Ed25519 key pair identifying this swarm node, for use with DHT mutable records or other identity operations.- Re-exported
HyperDhtHandle,MutablePutResult,MutableGetResult, andImmutablePutResultfrom thepeeroxidecrate root, so callers no longer need to depend onpeeroxide-dhtdirectly for common DHT storage types.
Changed
- Swarm nodes now self-announce under
hash(publicKey)during each discovery refresh. This populatesForwardEntryrecords on the nodes closest to the peer's public key, enablingPEER_HANDSHAKErouting to work correctly — matching the behaviour of the Node.js reference implementation. - Server registrations are now cleaned up properly on
leave()(when the last server topic is left), ondestroy(), and when the swarm handle is dropped. Previously,ForwardEntryrecords for the local server could persist in the router until TTL expiry. - Incoming server connections now reuse the DHT's bound listen socket for the UDX stream, rather than creating a new socket. This ensures streams arrive on the same port that remote peers have on record, fixing connection establishment in NAT environments.
- Handshake replies no longer echo the client's address back in
peer_address; the field is now correctly set toNonein the reply, matching the wire protocol.