Repository navigation
v0.3.0
What's New
P2P File Transfer with E2E Encryption
Pure peer-to-peer large file transfer over WebRTC DataChannels — zero server dependency in the data path.
- Binary frame protocol —
[seq|length|flags|encrypted_chunk]with 64KB default chunk size - Mutual authentication — 3-step Ed25519 challenge-response handshake before any data flows
- Per-chunk encryption — XChaCha20-Poly1305 with AAD =
file_id|seqpreventing reorder attacks - Pipeline push + backpressure — Near line-speed transfer (1MB high-water, 256KB low-water)
- Resume support — Persisted last-confirmed sequence, reconnect picks up where it left off
- Nostr fallback — When WebRTC NAT traversal fails, chunks sent as encrypted Nostr events
- Mailbox wakeup — Immediate inbox sync on file offer instead of waiting for poll interval
New Public API
fileID, err := agent.SendFile(ctx, peerID, "/path/to/file")
transfers := agent.ListTransfers()
info, ok := agent.GetTransfer(fileID)
agent.CancelTransfer(fileID)New Options
FileTransferDir— Directory for received filesResumeStatePath— Path to persist resume state
Transport Enhancements
CreateDataChannel()andRegisterDataChannelHandler()on WebRTC transport- Backpressure control in
Send() TriggerSync()on mailbox transport for wakeup signals
Other Changes
- License changed from MIT to Apache 2.0
- peerclaw-core bumped to v0.5.0