A Next.js application that converts, downloads, and streams torrents directly in the browser through a plain HTTP request.
{
"endpoint": "/torrents",
"method": "GET",
"description": "Returns the list of all torrents"
}{
"endpoint": "/torrents/{infoHash}",
"method": "GET",
"description": "Returns a single torrent"
}{
"endpoint": "/torrents/{infoHash}/stats",
"method": "GET",
"description": "Returns the torrent stats (speed, bandwidth, etc.)"
}{
"endpoint": "/torrents/{infoHash}/files",
"method": "GET",
"description": "Returns the M3U playlist"
}{
"endpoint": " /torrents/{infoHash}/files/{path}",
"method": "GET",
"description": "Starts streaming the file (honoring the \`Range\` header)"
}{
"endpoint": "/torrents/{infoHash}/pause",
"method": "POST",
"description": "Pauses/resumes the swarm and peer discovery"
}{
"endpoint": ["/torrents/{infoHash}/start", "/torrents/{infoHash}/stop"],
"method": "POST",
"description": "Starts/stops the download by selecting/deselecting all files"
}{
"endpoint": [
"/torrents/{infoHash}/start/{index}",
"/torrents/{infoHash}/stop/{index}"
],
"method": "POST",
"description": "Starts/stops downloading a particular file (by index)"
}{
"endpoint": "/torrents",
"method": "POST",
"description": "Adds a new torrent (\`{"link":"magnet link or URL"}\`)"
}{
"endpoint": " /upload",
"method": "POST",
"description": "Accepts a .torrent file as an attachment (\`file\` field in \`multipart/form-data\`)"
}{
"endpoint": "/torrents/{infoHash}",
"method": "DELETE",
"description": "Deletes the torrent"
}Feel free to use and contribute to this project! 🚀