Hayate gives you two ways to transfer files across your local network. Pairing Mode is the default experience: a shared code phrase lets sender and receiver find each other automatically without exchanging IP addresses. Direct Mode skips discovery entirely and connects straight to a known address — useful when you already know where the receiver is, or when your network restricts multicast traffic. Both modes use the same QUIC transport and end-to-end AEAD encryption; they differ only in how the two peers find each other and how the session key is authenticated.
Pairing Mode
Pairing Mode is designed for everyday use. The sender broadcasts its presence over mDNS and UDP, and the receiver listens for an announcement that matches the shared code phrase. When a match is found, Hayate opens a QUIC connection and performs a cryptographic handshake — no IP address entry required.
The code phrase does more than help peers find each other. During key derivation, Hayate mixes the phrase bytes directly into the HKDF input keying material. This means only a peer that knows the exact phrase can derive the correct session key and decrypt your transfer.
If you omit --code on the sender, Hayate auto-generates a random 4-word phrase and prints it to the terminal for you to share verbally or via a side channel.
Pairing Mode works on macOS, Linux, Windows, and Android (Termux). The mDNS implementation is Bonjour-compatible on macOS and works out of the box on most home and office routers. On networks where multicast is unreliable, Hayate automatically falls back to a UDP broadcast path — discovery works either way.
Direct Mode
Direct Mode skips discovery entirely. You provide the receiver’s IP address and port as a host:port argument, and Hayate connects immediately. This is the right choice when you already know the receiver’s address, when you are scripting automated transfers, or when your network administrator has disabled multicast.
You can customise the bind address and port with --bind and --port. In Direct Mode there is no passphrase, so authentication relies on network locality — only a host that can actually reach the receiver’s address can initiate a transfer.
Choosing a Mode
Use Pairing Mode for ad-hoc transfers between laptops, phones, and servers where you don’t want to look up IP addresses. Use Direct Mode when you’re on a corporate network with multicast restrictions, when you’re scripting a pipeline, or when you already have the receiver’s address in a config file.