{"id":13412654,"url":"https://github.com/anacrolix/torrent","last_synced_at":"2025-06-14T14:08:42.505Z","repository":{"id":25553242,"uuid":"28986292","full_name":"anacrolix/torrent","owner":"anacrolix","description":"Full-featured BitTorrent client package and utilities","archived":false,"fork":false,"pushed_at":"2025-06-10T02:59:49.000Z","size":10121,"stargazers_count":5787,"open_issues_count":62,"forks_count":643,"subscribers_count":133,"default_branch":"master","last_synced_at":"2025-06-11T22:11:53.649Z","etag":null,"topics":["bittorrent","go","magnet-link","p2p","streaming","torrent","tracker"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anacrolix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"anacrolix","patreon":"anacrolix","issuehunt":"anacrolix"}},"created_at":"2015-01-08T21:10:42.000Z","updated_at":"2025-06-11T08:55:20.000Z","dependencies_parsed_at":"2023-12-23T12:34:58.196Z","dependency_job_id":"dfc7a626-8ad3-47e1-943e-e2c602f269c6","html_url":"https://github.com/anacrolix/torrent","commit_stats":{"total_commits":3603,"total_committers":95,"mean_commits":37.92631578947368,"dds":0.07549264501804054,"last_synced_commit":"22ca9c279780f9ad291571bcaf6828449e9daf3d"},"previous_names":[],"tags_count":114,"template":false,"template_full_name":null,"purl":"pkg:github/anacrolix/torrent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacrolix%2Ftorrent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacrolix%2Ftorrent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacrolix%2Ftorrent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacrolix%2Ftorrent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anacrolix","download_url":"https://codeload.github.com/anacrolix/torrent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anacrolix%2Ftorrent/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259827668,"owners_count":22917714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bittorrent","go","magnet-link","p2p","streaming","torrent","tracker"],"created_at":"2024-07-30T20:01:27.357Z","updated_at":"2025-06-14T14:08:42.482Z","avatar_url":"https://github.com/anacrolix.png","language":"Go","funding_links":["https://github.com/sponsors/anacrolix","https://patreon.com/anacrolix","https://issuehunt.io/r/anacrolix"],"categories":["Go","开源类库","Distributed Systems","分布式系统","Open source library","分佈式系統","Relational Databases","\u003cspan id=\"分布式系统-distributed-systems\"\u003e分布式系统 Distributed Systems\u003c/span\u003e","CLI Tools"],"sub_categories":["网络","Advanced Console UIs","高级控制台界面","Search and Analytic Databases","The Internet","检索及分析资料库","高級控制台界面","SQL 查询语句构建库","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","Upload Assistant"],"readme":"# torrent\n\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/anacrolix/torrent)](https://pkg.go.dev/github.com/anacrolix/torrent)\n\nThis repository implements BitTorrent-related packages and command-line utilities in Go. The emphasis is on use as a library from other projects. It's been used 24/7 in production by downstream services since late 2014. The implementation was specifically created to explore Go's concurrency capabilities, and to include the ability to stream data directly from the BitTorrent network. To this end it [supports seeking, readaheads and other features](https://godoc.org/github.com/anacrolix/torrent#Reader) exposing torrents and their files with the various Go idiomatic `io` package interfaces. This is also demonstrated through [torrentfs](#torrentfs).\n\nThere is [support for protocol encryption, DHT, PEX, uTP, and various extensions](https://godoc.org/github.com/anacrolix/torrent). There are [several data storage backends provided](https://godoc.org/github.com/anacrolix/torrent/storage): blob, file, bolt, mmap, and sqlite, to name a few. You can [write your own](https://godoc.org/github.com/anacrolix/torrent/storage#ClientImpl) to store data for example on S3, or in a database. \n\nSome noteworthy package dependencies that can be used for other purposes include:\n\n * [go-libutp](https://github.com/anacrolix/go-libutp)\n * [dht](https://github.com/anacrolix/dht)\n * [bencode](https://godoc.org/github.com/anacrolix/torrent/bencode)\n * [tracker](https://godoc.org/github.com/anacrolix/torrent/tracker)\n\n## Installation\n\nInstall the library package with `go get github.com/anacrolix/torrent`, or the provided cmds with `go install github.com/anacrolix/torrent/cmd/...@latest`.\n\n## Library examples\n\nThere are some small [examples](https://godoc.org/github.com/anacrolix/torrent#pkg-examples) in the package documentation.\n\n## Mentions\n\n * [@anacrolix](https://github.com/anacrolix) is interviewed about this repo in [Console 32](https://console.substack.com/p/console-32).\n\n### Downstream projects\n\nThere are several web-frontends, sites, Android clients, storage backends and supporting services among the known public projects:\n\n * [cove](https://coveapp.info): Personal torrent browser with streaming, DHT search, video transcoding and casting.\n * [confluence](https://github.com/anacrolix/confluence): torrent client as a HTTP service \u003c!-- Well of course I know him... He's me --\u003e\n * [Gopeed](https://github.com/GopeedLab/gopeed): Gopeed (full name Go Speed), a high-speed downloader developed by Golang + Flutter, supports (HTTP, BitTorrent, Magnet) protocol, and supports all platforms. \u003c!-- 7.7k stars --\u003e \n * [Erigon](https://github.com/ledgerwatch/erigon): an implementation of Ethereum (execution layer with embeddable consensus layer), on the efficiency frontier. \u003c!-- 2.7k stars --\u003e\n * [exatorrent](https://github.com/varbhat/exatorrent): Elegant self-hostable torrent client \u003c!-- 1.5k stars --\u003e\n * [bitmagnet](https://github.com/bitmagnet-io/bitmagnet): A self-hosted BitTorrent indexer, DHT crawler, content classifier and torrent search engine with web UI, GraphQL API and Servarr stack integration. \u003c!-- 1.1k stars --\u003e \n * [TorrServer](https://github.com/YouROK/TorrServer): Torrent streaming server over http \u003c!-- 984 stars --\u003e\n * [distribyted](https://github.com/distribyted/distribyted): Distribyted is an alternative torrent client. It can expose torrent files as a standard FUSE, webDAV or HTTP endpoint and download them on demand, allowing random reads using a fixed amount of disk space. \u003c!-- 982 stars --\u003e\n * [Mangayomi](https://github.com/kodjodevf/mangayomi): Cross-platform app that allows users to read manga and stream anime from a variety of sources including BitTorrent. \u003c!-- 940 stars --\u003e\n * [Simple Torrent](https://github.com/boypt/simple-torrent): self-hosted HTTP remote torrent client \u003c!-- 876 stars --\u003e\n * [autobrr](https://github.com/autobrr/autobrr): autobrr redefines download automation for torrents and Usenet, drawing inspiration from tools like trackarr, autodl-irssi, and flexget. \u003c!-- 855 stars --\u003e\n * [mabel](https://github.com/smmr-software/mabel): Fancy BitTorrent client for the terminal \u003c!-- 421 stars --\u003e\n * [Toru](https://github.com/sweetbbak/toru): Stream anime from the the terminal! \u003c!-- 216 stars --\u003e\n * [webtor.io](https://webtor.io/): free cloud BitTorrent-client \u003c!-- not exclusively anacrolix/torrent maybe? 40-200 stars? --\u003e\n * [Android Torrent Client](https://gitlab.com/axet/android-torrent-client): Android torrent client \u003c!-- 29 stars --\u003e\n * [libtorrent](https://gitlab.com/axet/libtorrent): gomobile wrapper \u003c!-- 15 stars --\u003e\n * [Go-PeersToHTTP](https://github.com/WinPooh32/peerstohttp): Simple torrent proxy to http stream controlled over REST-like api \u003c!-- 28 stars --\u003e\n * [CortexFoundation/torrentfs](https://github.com/CortexFoundation/torrentfs): Independent HTTP service for file seeding and P2P file system of cortex full node \u003c!-- 21 stars --\u003e\n * [Torrent WebDAV Client](https://github.com/Jipok/torrent-webdav): Automatic torrent download, streaming, WebDAV server and client. \u003c!-- 1 star, https://github.com/anacrolix/torrent/issues/917 --\u003e \n * [goTorrent](https://github.com/deranjer/goTorrent): torrenting server with a React web frontend \u003c!-- 156 stars, inactive since 2020 --\u003e\n * [Go Peerflix](https://github.com/Sioro-Neoku/go-peerflix): Start watching the movie while your torrent is still downloading! \u003c!-- 449 stars, inactive since 2019 --\u003e\n * [hTorrent](https://github.com/pojntfx/htorrent): HTTP to BitTorrent gateway with seeking support. \u003c!-- 102 stars --\u003e\n * [Remote-Torrent](https://github.com/BruceWangNo1/remote-torrent): Download Remotely and Retrieve Files Over HTTP \u003c!-- 57 stars, inactive since 2019 --\u003e\n * [Trickl](https://github.com/arranlomas/Trickl): torrent client for android \u003c!-- 48 stars, inactive since 2018 --\u003e\n * [ANT-Downloader](https://github.com/anatasluo/ant): ANT Downloader is a BitTorrent Client developed by golang, angular 7, and electron \u003c!-- archived --\u003e\n * [Elementum](http://elementum.surge.sh/) (up to version 0.0.71)\n\n## Help\n\nCommunication about the project is primarily through [Discussions](https://github.com/anacrolix/torrent/discussions) and the [issue tracker](https://github.com/anacrolix/torrent/issues).\n\n## Command packages\n\nHere I'll describe what some of the packages in `./cmd` do. See [installation](#installation) to make them available.\n\n### `torrent`\n\n#### `torrent download`\n\nDownloads torrents from the command-line.\n\n    $ torrent download 'magnet:?xt=urn:btih:KRWPCX3SJUM4IMM4YF5RPHL6ANPYTQPU'\n    ... lots of jibber jabber ...\n    downloading \"ubuntu-14.04.2-desktop-amd64.iso\": 1.0 GB/1.0 GB, 1989/1992 pieces completed (1 partial)\n    2015/04/01 02:08:20 main.go:137: downloaded ALL the torrents\n    $ md5sum ubuntu-14.04.2-desktop-amd64.iso\n    1b305d585b1918f297164add46784116  ubuntu-14.04.2-desktop-amd64.iso\n    $ echo such amaze\n    wow\n\n#### `torrent metainfo magnet`\n\nCreates a magnet link from a torrent file. Note the extracted trackers, display name, and info hash.\n\n    $ torrent metainfo testdata/debian-10.8.0-amd64-netinst.iso.torrent magnet\n    magnet:?xt=urn:btih:4090c3c2a394a49974dfbbf2ce7ad0db3cdeddd7\u0026dn=debian-10.8.0-amd64-netinst.iso\u0026tr=http%3A%2F%2Fbttracker.debian.org%3A6969%2Fannounce\n\nSee `torrent metainfo --help` for other metainfo related commands.\n\n### `torrentfs`\n\ntorrentfs mounts a FUSE filesystem at `-mountDir`. The contents are the torrents described by the torrent files and magnet links at `-metainfoDir`. Data for read requests is fetched only as required from the torrent network, and stored at `-downloadDir`.\n\n    $ mkdir mnt torrents\n    $ torrentfs -mountDir=mnt -metainfoDir=torrents \u0026\n    $ cd torrents\n    $ wget http://releases.ubuntu.com/14.04.2/ubuntu-14.04.2-desktop-amd64.iso.torrent\n    $ cd ..\n    $ ls mnt\n    ubuntu-14.04.2-desktop-amd64.iso\n    $ pv mnt/ubuntu-14.04.2-desktop-amd64.iso | md5sum\n    996MB 0:04:40 [3.55MB/s] [========================================\u003e] 100%\n    1b305d585b1918f297164add46784116  -\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanacrolix%2Ftorrent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanacrolix%2Ftorrent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanacrolix%2Ftorrent/lists"}