Add BEP 19 web seed support (url-list) to torrent creation#9
Merged
Conversation
Emit a top-level `url-list` key when web seeds are provided, so a hybrid torrent can point at an existing HTTP origin (HF / Kaggle / GCS bucket) as a fallback source. This is the producer-side unlock for the dataset strategy: register artifacts that reference an origin instead of rehosting them, and let a swarm form without a persistent seeder. - torrent.CreateOptions gains WebSeeds []string; each is validated as an absolute http(s) URL at the boundary. - url-list is set on the OUTER metainfo dict, not the info dict, so the v1/v2 info hashes are unchanged (golden vectors still pass — asserted in test). - wl create gains a repeatable --webseed flag. Verified with Transmission 4.1.2: transmission-show lists both URLs under a WEBSEEDS section, and the v2 hash is byte-identical with and without the flag. Consumer side (wl get downloading from web seeds / streaming-hash create) is a separate follow-up; real clients (Transmission, libtorrent) already use the url-list we emit.
iksnerd
added a commit
that referenced
this pull request
Jun 21, 2026
Add BEP 19 web seed support (url-list) to torrent creation
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.
Producer-side web-seed support — the highest-leverage item from the dataset strategy (see the
weightless-dataset-strategyCouncil Hub room). Lets a hybrid torrent point at an existing HTTP origin (HF / Kaggle / GCS bucket) as a fallback source, so we can register artifacts that reference an origin instead of rehosting them, and a swarm can form without a persistent always-on seeder.Changes
torrent.CreateOptionsgainsWebSeeds []string; each entry is validated as an absolutehttp(s)URL at the boundary (rejects relative paths,ftp://, bare schemes).url-listkey is set on the outer metainfo dict, not the info dict — so the v1/v2 info hashes are unchanged. Verified in test (TestCreateWebSeedsasserts the hash matches the no-webseed build) and confirmsurl-listis absent when no seeds are given.wl creategains a repeatable--webseedflag (--webseed URL --webseed URL).Verification
go build/go vet/gofmtclean;go test ./...passes (newTestCreateWebSeeds, existingTestHybridGoldenVectorsstill green → info hash unaffected).transmission-showlists both URLs under aWEBSEEDSsection, and the v2 hash is byte-identical with and without--webseed.Scope / follow-up
This is the producer side — real clients (Transmission, libtorrent) already consume the
url-listwe emit. Thewl getconsumer side (downloading from web seeds) andwl create --stream <url>(hash a remote origin without persisting locally) are separate follow-ups tracked in the strategy room.🤖 Generated with Claude Code