fix(installer): Windows service runs sync-only by default - #14
Open
thedancingdeveloper wants to merge 1 commit into
Open
thedancingdeveloper wants to merge 1 commit into
thedancingdeveloper wants to merge 1 commit into
Conversation
The Windows service was registered with `--all`, which starts the DHT crawler, resolver and announcer on the machine's real public address. The resolver announces every hash it resolves to trackers with port 6881, and the crawler/announcer do the same over DHT, so a desktop install seeds `<public-ip>:6881` into thousands of swarms and keeps receiving inbound peer connection attempts for days after it is stopped. Drop `--all` from the service command line and let the worker set come from `INDEXARR_WORKERS` in the generated `.env`, defaulting to `http_server,sync` (the same mode as docker-compose.sync.yml). Crawling stays available as a documented opt-in by editing `.env`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EJyS2g3x5AKm9nMXu2WH4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Windows service was registered as
indexarr.exe --service --all, which starts the DHT crawler, resolver and announcer directly on the host's public address.TrackerDiscovery(resolver) announces every resolved hash to trackers withannounce_port = INDEXARR_DHT_BASE_PORT(6881), and the crawler/announcer do the equivalent over DHT. A desktop install therefore seeds<public-ip>:6881(and the host's IPv6) into every swarm it touches; the inbound TCP/UDP flood to :6881 continues for days after the service is removed.This was traced on a real install (2026-07-20 → 2026-09-03) that left ~180 SYN/s to WAN:6881 from ~2,600 distinct peers per 2 min, still steady four days after uninstall.
Change
installer/windows.nsi: service command line is--service --port <port>(no--all) on both the create and upgrade (sc config) paths, so the worker set comes from.env.installer/setup.ps1: the generated.envsetsINDEXARR_WORKERS=http_server,sync— the same sync-only mode asdocker-compose.sync.yml— with a comment explaining how to opt into crawling (INDEXARR_WORKERS=http_server,dht_crawler,resolver,announcer,sync, behind a VPN).readme.md: documents the Windows default and the opt-in..envis rewritten on every install, so existing installs pick this up on upgrade; the shortcut/Explorer launch path reads the same.env, so both launch modes agree.Not verified
No Windows build was run for this PR (installer is built by the tag pipeline). The change is confined to the two command-line strings and the
.envtemplate;INDEXARR_WORKERSparsing (env_csv_or) is unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_016EJyS2g3x5AKm9nMXu2WH4