How libinpr/drop---rust works
Drop is a LAN file-transfer application with device discovery, trusted-device pairing, encrypted transfer, and receiver-side checksum verification and file saving. The main workflow is sender discovery → secure connection → transfer header and file data → receiver validation and acknowledgement. Pairing establishes trust separately, while shared modules provide framing, cryptography, and trusted-device persistence. Some executable wiring is unsampled, so the graph omits links that cannot be tied to shown code or explicit documentation.
Main entry points: send.rs Send CLI · server.rs Receive server · secure_channel.rs Secure channel · trusted.rs Trusted devices
Components 13
Sending
- Send CLI
src/bin/send.rs - LAN discovery
src/discovery.rs - Discovery CLI
src/bin/discover.rs - Basic client
src/bin/client.rs
Receiving
- Receive server
src/bin/server.rs - Received files
src/bin/server.rs
Pairing and Trust
- Pair CLI
src/bin/pair.rs - Pairing exchange
src/pairing.rs - Trusted devices
src/trusted.rs
Shared Protocol and Security
- Transfer framing
src/protocol.rs - Secure channel
src/secure_channel.rs - Transfer authentication
src/transfer_auth.rs
Other components
- File sender
Connections 14
- File sender → Send CLI: selects file
src/bin/send.rs - Send CLI → Secure channel: establishes channel
src/bin/send.rs - Send CLI → Transfer framing: encodes header
src/bin/send.rs - Send CLI → Receive server: sends transfer
- Receive server → Secure channel: accepts connection
src/bin/server.rs - Receive server → Transfer framing: decodes header
src/bin/server.rs - Receive server → Received files: saves verified file
src/bin/server.rs - Pairing exchange → Trusted devices: adds trusted device
src/pairing.rs - Secure channel → Trusted devices: checks device trust
src/secure_channel.rs - Transfer authentication → Trusted devices: checks device trust
src/transfer_auth.rs - Basic client → Transfer framing: sends header
src/bin/client.rs - Discovery CLI → LAN discovery: uses discovery
- Send CLI → LAN discovery: discovers receiver
- Pair CLI → Pairing exchange: starts pairing