Skip to content

v0.6.5 - #28

Merged
bethropolis merged 14 commits into
mainfrom
dev
Jul 29, 2026
Merged

v0.6.5#28
bethropolis merged 14 commits into
mainfrom
dev

Conversation

@bethropolis

Copy link
Copy Markdown
Owner

v0.6.5

New Features

  • Tiered device discovery: cache probe, multicast bursts, TCP pre-filter, --quick flag
  • Web share landing page with QR code, download notifications, --once flag
  • Config UX: add/remove/open/unset subcommands, key validation, origin tracking
  • Protocol 2.1 with HTTPS fingerprint TOFU for --ip send, VerifyDeviceFingerprint export
  • Send PIN authentication (--pin flag)
  • Config wiring: BindAddress, FileConflictResolve (skip/overwrite/rename), StaticPeers, TrustedFingerprints

Fixes

  • Clipboard pipe hang: xclip/wl-copy daemon inherited stdout/stderr pipes from CombinedOutput(), causing clipboard.Write() to hang indefinitely. Fixed with CommandContext + /dev/null redirect + cmd.Run() — returns in <10ms.
  • Clipboard send 204 flow: write content immediately in prepare-upload, return 204 — no session creation, no upload handler, no double prompt
  • QR code rendering: GenerateHalfBlock helper
  • Config validation: "slice" type for static_peers/trusted_fingerprints
  • .gitignore config entry path
  • README clipboard env vars, send.go PIN URL

Changelog

12 commits since v0.6.4. Full diff: v0.6.4...dev

…ick flag

- PeerCache: LRU 50-entry cap, 14-day stale eviction, auto-cache on --ip
- SendDiscoveryAnnouncement: 3 UDP bursts 30ms apart to reduce Wi-Fi loss
- ScanNetwork: 150ms TCP pre-probe before HTTP register, semaphore 256
- SendFiles: cache probe (400ms) -> multicast (1.2s) -> subnet scan cascade
  with fast mode skipping the scan tier
- DiscoveryStrategy config field, --quick/-q flag on send command
- Root GET / handler with embedded HTML template fixes browser 404
- Terminal QR code generation via qrterminal for mobile scanning
- Download success notification printed to terminal
- --once flag stops server automatically after first download
- HTTPS default guidance notice for self-signed certs
…n tracking

- Known config key schema with type, range, and enum validation
- Typo detection with Levenshtein 'did you mean?' suggestions
- config unset removes a key from config file
- config open opens config in system editor (nvim)
- config add/remove for list-type config values
- config list shows origin tags [file]/[env]/[default]
- Shell completion helper
…gerprint

- ProtocolVersion bumped 2.0 -> 2.1
- send --ip now stores and verifies fingerprints via PeerCache for TOFU
- Exported VerifyDeviceFingerprint for use by CLI commands
- send --pin <code> adds PIN to prepare-upload and upload URLs
- Receiver already validates PIN on prepare-upload
- Works for both --ip and discovery-based send
- .gitignore: narrow 'config' to '/config' so pkg/config/ is not ignored
- README: add LOCALSEND_CLIPBOARD_READ/WRITE_CMD env vars
- send.go: add PIN query param to prepare-upload URL
- qrterminal.BLACK/WHITE are ANSI full-block sequences, not compatible
  with HalfBlocks mode
- Switched to GenerateHalfBlock() which sets correct unicode characters
- share: --once, --https, --once examples, --iface
- send: --quick/-q, --pin, mDNS --ip example, --iface
- config: subcommand listing (get/set/add/remove/list/unset/open/path)
- Main help: new examples for --quick, --ip, --once, config set/list
- Env vars: DISCOVERY_STRATEGY, FILE_CONFLICT_RESOLUTION, BIND_ADDRESS,
  CONCURRENCY, SHELL, CLIPBOARD_READ/WRITE_CMD, TLS_CERT/KEY, NOTIFICATION_CMD
…aticPeers, TrustedFingerprints)

- BindAddress: server.go binds to configured address instead of 0.0.0.0
- FileConflictResolve: receive_upload.go supports skip/overwrite/rename
- StaticPeers: Config field + viper load + Tier 1 probe in send.go (400ms per peer)
- TrustedFingerprints: Config field + viper load + bypass transfer prompt on match
- Fix duplicate sendpin check in cmd/send.go
- Extract web share code to webshare.go with green monospace theme
- Fix CSP to allow inline styles for web share page
- QR scheme follows actual http/https, HTTPS fingerprint shown in share output
- Add web share tests
The prepare-upload handler was short-circuiting clipboard messages with a
204 No Content response after writing to clipboard. The official LocalSend
mobile app does not handle 204 and remains in a waiting state.

Fix: remove the early return and let clipboard messages fall through to the
normal create-session + upload flow. The upload handler already writes to
clipboard or saves as file when it receives the text/plain upload.
Clipboard send was broken by two issues:
1. prepare-upload handler fell through to create-session + upload flow,
   causing the mobile app to wait for an upload that never came and a
   double-prompt on the receiver.
2. clipboard.Write() used CombinedOutput() which created stdout/stderr
   pipes. xclip/wl-copy fork a background daemon that inherits those
   pipes, causing Go's cmd.Wait() to hang forever. The 204 response was
   never sent until Ctrl+C killed the daemon.

Fix:
- Write clipboard content immediately in prepare-upload (after prompt
  acceptance), print confirmation to stderr, pause 1s for client timing,
  then return 204 No Content. The mobile app receives 204 and closes
  the session immediately. No session is created for clipboard messages.
- Replace CombinedOutput() with CommandContext(3s timeout) + /dev/null
  for stdout/stderr + Run(). The xclip daemon no longer inherits pipes,
  so clipboard.Write returns in <10ms.
- Same timeout guard applied to Read() for consistency.
go mod tidy moves github.com/mdp/qrterminal/v3 from // indirect to
direct dependency. Also fix protocol description in goreleaser.yaml
and README (v2.1 → v2 per spec).
- Expand CLI_REFERENCE.md with --quick, --pin, config add/remove/open/unset
- Add missing env vars to README.md and CONFIGURATION.md
- Fix --probe flag (no -p short flag, conflicts with --private)
- Fix config.go error message showing internal type instead of key name
- Add --no-color, --version to docs, --once/--range examples
@bethropolis
bethropolis merged commit 1a218f8 into main Jul 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant