LocalSend-compatible file-transfer TUI for headless Arch/Omarchy servers. - Pure-stdlib implementation of the LocalSend v2 protocol (discovery, HTTPS with matching cert fingerprint, send/receive, PIN). - Bubble Tea TUI: Devices, Transfers, Manage (received-file housekeeping) and Settings, theme-aware on Omarchy. - Dual-mode install.sh: curl-pipe download or build-from-clone. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
20 lines
645 B
Go
20 lines
645 B
Go
// Package protocol holds the LocalSend v2.1 wire types and constants. It
|
|
// performs no I/O so it can be unit-tested against captured payloads.
|
|
package protocol
|
|
|
|
// Network defaults from the LocalSend v2.1 spec.
|
|
const (
|
|
MulticastAddr = "224.0.0.167"
|
|
MulticastPort = 53317
|
|
DefaultPort = 53317
|
|
ProtocolVersion = "2.1"
|
|
)
|
|
|
|
// HTTP API paths, all served under the device's port.
|
|
const (
|
|
PathRegister = "/api/localsend/v2/register"
|
|
PathInfo = "/api/localsend/v2/info"
|
|
PathPrepareUpload = "/api/localsend/v2/prepare-upload"
|
|
PathUpload = "/api/localsend/v2/upload"
|
|
PathCancel = "/api/localsend/v2/cancel"
|
|
)
|