{"id":30788605,"url":"https://github.com/samuelfisher/torrentcore","last_synced_at":"2025-09-05T13:18:11.250Z","repository":{"id":14261051,"uuid":"76181771","full_name":"SamuelFisher/torrentcore","owner":"SamuelFisher","description":"BitTorrent for .NET Core","archived":false,"fork":false,"pushed_at":"2022-07-07T23:11:15.000Z","size":568,"stargazers_count":112,"open_issues_count":9,"forks_count":21,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-08-01T06:23:15.803Z","etag":null,"topics":["bittorrent","csharp","dotnet"],"latest_commit_sha":null,"homepage":"https://torrentcore.org","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamuelFisher.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":null,"support":null}},"created_at":"2016-12-11T15:10:56.000Z","updated_at":"2025-04-10T13:56:00.000Z","dependencies_parsed_at":"2022-08-07T07:16:27.503Z","dependency_job_id":null,"html_url":"https://github.com/SamuelFisher/torrentcore","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SamuelFisher/torrentcore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelFisher%2Ftorrentcore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelFisher%2Ftorrentcore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelFisher%2Ftorrentcore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelFisher%2Ftorrentcore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamuelFisher","download_url":"https://codeload.github.com/SamuelFisher/torrentcore/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamuelFisher%2Ftorrentcore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273761877,"owners_count":25163362,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","csharp","dotnet"],"created_at":"2025-09-05T13:18:09.704Z","updated_at":"2025-09-05T13:18:11.240Z","avatar_url":"https://github.com/SamuelFisher.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TorrentCore\n\n[![Build Status](https://travis-ci.org/SamuelFisher/torrentcore.svg?branch=master)](https://travis-ci.org/SamuelFisher/torrentcore)\n[![Build status](https://ci.appveyor.com/api/projects/status/p1kf1e1upjsiw60n/branch/master?svg=true)](https://ci.appveyor.com/project/SamuelFisher/torrentcore/branch/master)\n[![NuGet](https://img.shields.io/nuget/vpre/TorrentCore.svg)](https://www.nuget.org/packages/TorrentCore)\n\nA BitTorrent library that runs on all platforms supporting .NET Standard 2.0.\n\n## Feature Progress\n\nThis project is currently work-in-progress and there are likely to be bugs and\nmissing features.\n\n- [x] Open .torrent files\n- [x] Upload/download torrents\n- [x] Contact HTTP trackers\n- [x] Compact peer lists [BEP 23](http://www.bittorrent.org/beps/bep_0023.html)\n- [x] UDP trackers [BEP 15](http://www.bittorrent.org/beps/bep_0015.html)\n- [x] Peer ID conventions [BEP 20](http://bittorrent.org/beps/bep_0020.html)\n- [x] Multitracker metadata extension [BEP 12](http://bittorrent.org/beps/bep_0012.html)\n- [x] Extension protocol [BEP 10](http://www.bittorrent.org/beps/bep_0010.html)\n- [ ] Peer exchange [BEP 11](http://www.bittorrent.org/beps/bep_0011.html)\n- [ ] Extension for Peers to Send Metadata Files [BEP 9](http://bittorrent.org/beps/bep_0009.html)\n- [ ] UPnP port forwarding\n- [ ] IPv6 trackers [BEP 7](http://www.bittorrent.org/beps/bep_0007.html)\n- [ ] DHT for trackerless torrents [BEP 5](http://www.bittorrent.org/beps/bep_0005.html)\n- [ ] uTorrent Transport Protocol [BEP 29](http://www.bittorrent.org/beps/bep_0029.html)\n\n## Usage\n\nTorrentCore is designed to be easy to use, while supporting more advanced\nfeatures if required.\n\nThere are no stable releases yet, but you can reference `TorrentCore` from\n[NuGet](https://www.nuget.org/packages/TorrentCore/), or directly from AppVeyor. For more\ninformation, see [getting started](https://torrentcore.org/getting-started/).\n\n```csharp\nvar client = TorrentClient.Create();\nvar download = client.Add(\"sintel.torrent\",\n                          @\"C:\\Downloads\\sintel\");\ndownload.Start();\nawait download.WaitForDownloadCompletionAsync();\n```\n\nFor more customisation of the `TorrentClient`, use `TorrentClientBuilder`:\n\n```csharp\nvar client = TorrentClientBuilder.CreateDefaultBuilder()\n    .UsePort(8000)\n    .Build();\n```\n\nSee the [examples](examples) directory for more in-depth examples.\n\n## Extensible and Modular\n\nTorrentCore is designed to allow custom extensions to be added and parts of the\nbuilt-in functionality to be swapped out. TorrentCore uses the same dependency\ninjection framework as ASP.NET Core to make this possible. Below are some examples of\nthe ways in which functionality can be added or changed.\n\nThe public interface for extensions is unstable and subject to change while\nTorrentCore is under pre-release development.\n\n### Custom Transport Protocol\n\nTorrentCore includes built-in support for communicating with peers over TCP. You\ncan add support for any custom communication protocol that is able to expose\nconnections to peers as a `System.IO.Stream`. (Of course, protocols other than\nTCP and uTP are incompatible with other BitTorrent clients.)\n\nFor more information, see [custom transport protocols](https://torrentcore.org/extend/transport-protocol/).\n\nThe [CustomTransportProtocol example](examples/CustomTransportProtocol) demonstrates a\ncustom transport protocol by sending data as files on disk without any use of TCP or\nsockets.\n\n### BitTorrent Extension Protocol\n\nCustom [BEP 10](http://www.bittorrent.org/beps/bep_0010.html) message handlers\ncan be provided by implementing an `IExtensionProtocolMessageHandler`. You can\nthen register your custom extension message handler to handle custom message\ntypes.\n\nFor more information, see [custom extension protocol messages](https://torrentcore.org/extend/extension-protocol/).\n\n### Modules\n\nModules are a general-purpose low-level mechanism to add functionality by hooking into\nevents. Examples of things that modules can do include:\n\n- Modify the connection handshake sent to peers\n- Add a new type of message\n- Send raw BitTorrent messages to peers\n- Override the behaviour of messages built into the BitTorrent protocol itself\n\nSome of the core functionality is implemented through modules, including\nthe core protocol messages and the BEP 10 extension protocol. For more\ninformation, see [custom modules](https://torrentcore.org/extend/modules/).\n\n### Pipeline Stages\n\nWhen a torrent is started, it is managed by a number of sequential stages in a\npipeline that take it from checking the existing downloaded data to seeding to\nother peers. New stages can be added to the pipeline and built-in stages can\nbe swapped for custom implementations.\n\nFor more information, see [pipeline stages](https://torrentcore.org/extend/pipeline/).\n\n### Data Storage\n\nThe file data for torrents is usually stored on disk. TorrentCore\nincludes mechanisms to store the data on disk and in-memory, but you can provide\ncustom storage mechanisms by implementing an `IFileHandler`.\n\nFor more information, see [data storage](https://torrentcore.org/extend/data-storage/).\n\n### Piece Picking Algorithms\n\nA custom algorithm for deciding which pieces to request from peers can be used\nby implementing an `IPiecePicker`.\n\nFor more information, see [piece picking](https://torrentcore.org/extend/piece-picking/).\n\n## Web UI\n\n*Web UI is work in progress. Package not currently published.*\n\nTorrentCore includes an optional web UI that can be used for detailed monitoring\nof Torrent downloads. It does not provide any functionality to control\ndownloads.\n\nIt can be enabled by referencing `TorrentCore.Web` and calling:\n\n```csharp\nclient.EnableWebUI();\n```\n\nThis starts a web interface on `http://localhost:5001/`.\n\n![/webui-screenshot.png](/webui-screenshot.png)\n\n## Command-Line Client\n\nIn addition to a library, TorrentCore provides a basic command-line client for\ndownloading torrents. Usage is as follows:\n\n```\ntorrentcorecli --help\n\nusage: torrentcorecli [-p \u003carg\u003e] [-o \u003carg\u003e] [-v] [--ui [arg]] [--]\n                      \u003cinput\u003e\n\n    -p, --port \u003carg\u003e      Port to listen for incoming connections on.\n    -o, --output \u003carg\u003e    Path to save downloaded files to.\n    -v, --verbose         Show detailed logging information.\n    --ui [arg]            Run a web UI, optionally specifying the port\n                          to listen on (default: 5001).\n    \u003cinput\u003e               Path of torrent file to download.\n```\n\n## Contributing\n\nContributions are welcome! Please submit a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelfisher%2Ftorrentcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelfisher%2Ftorrentcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelfisher%2Ftorrentcore/lists"}