Skip to content

Repository files navigation

LID - Linux ISO Downloader

LID is a BitTorrent client written in Go for downloading and sharing Linux images from a web interface or the command line. It combines direct transfers and SOCKS5-proxied transfers in a single dashboard.

LID web interface

Main features

  • Add .torrent files with the file picker or drag and drop.
  • Add one or multiple magnet links at once.
  • Keep direct and SOCKS5-proxied transfers in separate panels, with optional proxy authentication and connection testing.
  • Start, resume, pause, or delete one or multiple torrents.
  • Monitor progress, size, state, ratio, transfer rates, and peers in real time.
  • Inspect individual files and set Skip, Low, Mid, High, or Sequential priority.
  • Review the action log, tracker state, and bandwidth chart.
  • Persist sessions, transfer totals, and file priorities across restarts.
  • Discover peers through HTTP(S)/UDP trackers, DHT, LSD, and PEX when supported by the torrent.
  • Open the listening port automatically with UPnP, then fall back to NAT-PMP when available.
  • Use CLI commands to download or inspect a torrent, open a magnet link, and scrape trackers.

Requirements

  • Go 1.26.4 or newer.
  • A modern web browser for the dashboard.
  • Node.js 18 or newer and npm only when running the Playwright tests.

LID builds natively on macOS, Linux, and Windows. It has no external Go module or CGO dependency.

Build

git clone https://github.com/J4GL/LID.git
cd LID
go build -trimpath -o lid .

On Windows PowerShell, build lid.exe instead:

go build -trimpath -o lid.exe .

The generated binary is intentionally excluded from Git. Dashboard templates and static files are embedded, so the binary can be copied and run without the source tree.

Troubleshooting: garbage/binary content served at http://localhost:1234

If the dashboard shows binary content mentioning Mac OS X, ATTR, com.apple.provenance, or This resource fork intentionally left blank instead of the real page, the source tree used to build the binary picked up a macOS AppleDouble sidecar file (e.g. ._index.html) — typically from copying or archiving the project off a Mac without stripping resource forks (tar/zip without COPYFILE_DISABLE=1, a FAT/exFAT drive, or some cloud-sync folders). Clean the tree and rebuild:

find . -name '._*' -delete
find . -name '.DS_Store' -delete
go build -trimpath -o lid .

When archiving or copying the project from macOS in the future, set export COPYFILE_DISABLE=1 first so tar/cp/zip don't write these sidecar files at all.

Quick start

Start the web server on macOS or Linux:

./lid -p 1234 -o ./downloads -t ./state

Then open http://localhost:1234.

On Windows, use the same options with ./lid.exe in PowerShell.

Option Description Default
-p <port> Web interface port 1234
-o <directory> Downloaded files directory Current directory
-t <directory> Session and resume state directory Current directory
--debug Enable detailed diagnostic logs Disabled

Command-line usage

./lid download image.torrent -o ./downloads -t ./state
./lid info image.torrent
./lid magnet 'magnet:?xt=urn:btih:...'
./lid scrape image.torrent
./lid help

The corresponding short aliases are d, i, m, s, and h.

Tests

Run the Go test suite:

go test ./...

Run the web interface tests with Playwright:

cd tests/e2e
npm ci
npm run install:chromium
npm test

On a supported Debian/Ubuntu CI host that also needs Chromium system libraries, replace the browser installation command with npx playwright install --with-deps chromium.

Run the deterministic SOCKS5 routing test on its own:

cd tests/e2e
npm run install:chromium
npx playwright test proxy-routing-e2e.spec.ts --project=chromium

The SOCKS5 test uses loopback-only HTTP tracker, UDP tracker, peer, and proxy fixtures. Its structured traces prove that right-panel tracker and peer traffic is relayed through the configured proxy. The web suite uses DOM, style, geometry, accessibility, and behavior assertions instead of operating-system-specific screenshot baselines. Every interface interaction also produces visual feedback or a trace in the action log or browser console for diagnostics and automated verification.

License

LID is distributed under the MIT License. Copyright (c) 2026 J4.GL.

About

Torrent client in written go with a web UI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages