localsend-go

command module
v0.0.0-...-fb5eead Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Localsend-Go

Language / 语言: English | 简体中文


Overview

This is a server-client implementation of the LocalSend Protocol written in Go.

This implementation provides a Go-based server and client that follows the LocalSend Protocol v2.1 specification.

Actually it used for decky-localsend

Project Structure
.
├── api/              # API server implementation
│   ├── controllers/  # Request handlers
│   ├── models/       # Data models
│   └── middlewares/  # HTTP middlewares
├── boardcast/        # Multicast discovery
├── transfer/         # File transfer logic
├── share/            # Shared utilities
├── tool/             # Helper tools
└── types/            # Type definitions
Command-Line Flags
Flag Type Default Description
-log string (empty) Log mode: dev or prod or none
-useMultcastAddress string (empty) Override the default multicast address
-useMultcastPort int 0 Override the default multicast port
-useConfigPath string (empty) Specify an alternative config file path
-useDefaultUploadFolder string (empty) Specify the default folder for uploads
-useLegacyMode bool false Use legacy HTTP mode to scan devices (scans every 30 seconds)
-useReferNetworkInterface string "*" Specify the network interface for use (e.g., "en0", "eth0", or "*" for all interfaces)
-usePin string (empty) Specify a PIN to require for uploads
-useAutoSave bool false If false, requires manual confirmation to receive files
-useAlias string (empty) Specify a Alias to shown in net.
-useHttps bool true If true, use https (encrypted); if false, use http (unencrypted). Alias for protocol config.
-useMixedScan bool false Use mixed scan mode (both UDP and HTTP for discovery)
-skipNotify bool false Skip notification mode
-scanTimeout int 500 Timeout for device scan, in seconds
-useAutoSaveFromFavorites bool false If true, automatically saves files from favorite devices without confirmation
-useDownload Boolean false if true,enable Download API(prepare-download、download、page)
-webOutPath string web/out Next.js static download out here

Most of cases, mixed mode works well for most cases, if you prefer to reduce the power cost for your machine, switching to (Normal Mode - UDP Detected.) ,it will not make scan to the whole net.

Sometimes Application cannot scan other localsend if the online too long time, consider trigger "scan" on other localsend.

TODO

None Currently.

Known BUGS
  • Cannot use web localsend (Due to localsend use v3 but not explained in protocol document.)
  • In some cases (e.g. localsend in backend too long time (I guess), being scanned machine cannot detected the service, restart service is helpful. )
Getting Started
# Build the project
go build -o localsend-server

# Run the server
./localsend-server
Configuration

The server can be configured through command-line flags or configuration files. See the code for available options.

License

This project implements the LocalSend Protocol. Please refer to the LocalSend Protocol repository for protocol specifications.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL