{"id":37115994,"url":"https://github.com/winpooh32/peerstohttp","last_synced_at":"2026-01-14T13:36:54.449Z","repository":{"id":35000657,"uuid":"158644625","full_name":"WinPooh32/peerstohttp","owner":"WinPooh32","description":"Simple torrent proxy to http stream controlled over REST-like api","archived":false,"fork":false,"pushed_at":"2023-02-25T01:19:49.000Z","size":41516,"stargazers_count":44,"open_issues_count":17,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T05:13:53.695Z","etag":null,"topics":["dht","downloader","go-torrent","http","http-api","http-streaming","kademlia","kademlia-dht","m3u","magnet","music","playlist","streaming-audio","streaming-video","torrent","torrent-stream","torrent-streamer","video"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WinPooh32.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-22T05:02:24.000Z","updated_at":"2024-05-31T14:00:01.000Z","dependencies_parsed_at":"2024-06-18T23:59:52.693Z","dependency_job_id":"eb1f1134-04d9-4277-9fa4-a234ad82a3e6","html_url":"https://github.com/WinPooh32/peerstohttp","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/WinPooh32/peerstohttp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WinPooh32%2Fpeerstohttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WinPooh32%2Fpeerstohttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WinPooh32%2Fpeerstohttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WinPooh32%2Fpeerstohttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WinPooh32","download_url":"https://codeload.github.com/WinPooh32/peerstohttp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WinPooh32%2Fpeerstohttp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28421362,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dht","downloader","go-torrent","http","http-api","http-streaming","kademlia","kademlia-dht","m3u","magnet","music","playlist","streaming-audio","streaming-video","torrent","torrent-stream","torrent-streamer","video"],"created_at":"2026-01-14T13:36:53.612Z","updated_at":"2026-01-14T13:36:54.442Z","avatar_url":"https://github.com/WinPooh32.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# peerstohttp\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FWinPooh32%2Fpeerstohttp.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FWinPooh32%2Fpeerstohttp?ref=badge_shield)\n[![Go Report Card](https://goreportcard.com/badge/github.com/WinPooh32/peerstohttp)](https://goreportcard.com/report/github.com/WinPooh32/peerstohttp)\n\nSimple torrent proxy to http stream controlled over REST-like api\n\nBuilt top on [anacrolix/torrent](https://github.com/anacrolix/torrent) lib.\n\n## HTTP API\n\n##### URL Parameters\n\n* **playlist** - output file format, one of these values: `m3u`,`html`,`json`\n* **hash** - torrent info hash. Example: `08ada5a7a6183aae1e09d831df6748d566095a10`\n* **extsWhitelist** - list of whitelisted file extensions. Possible values: \"-\" (any) or list extension names divided by comma. Examples: \"`-`\", \"`mp3,mp4a`\"\n* **tagsBlacklist** - list of blacklisted tags, extracted from file names. Possible values: \"-\" (no filter) or list tags divided by comma. See /playlist/tags.go for full list of possible tags. Examples: \"`-`\", \"`remix,interview`\"\n\nGet list of files by magnet uri:\n\n```\nGET http://localhost/list/{playlist}/{extsWhitelist}/{tagsBlacklist}/magnet/{magnetURI}\n```\n\nGet list of files by info hash:\n\n```\nGET http://localhost/list/{playlist}/{extsWhitelist}/{tagsBlacklist}/hash/{hash}\n```\n\nDownload file:\n\n```\nGET http://localhost/content/{hash}/{filePath}\n```\n\n## Examples\n\nGet HTML links list for Sintel by torrent hash:\n\n```\nhttp://localhost/list/html/mp4/-/hash/08ada5a7a6183aae1e09d831df6748d566095a10\n```\n\nor by magnet URI:\n\n```\nhttp://localhost/list/html/mp4/-/magnet/magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10\u0026dn=Sintel\u0026tr=udp%3A%2F%2Fexplodie.org%3A6969\u0026tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969\u0026tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337\u0026tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969\u0026tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337\u0026tr=wss%3A%2F%2Ftracker.btorrent.xyz\u0026tr=wss%3A%2F%2Ftracker.fastcast.nz\u0026tr=wss%3A%2F%2Ftracker.openwebtorrent.com\u0026ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F\u0026xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrent\n```\n\nThen watch Sintel.mp4 using VLC video player:\n\n```\nvlc http://localhost/content/08ada5a7a6183aae1e09d831df6748d566095a10/Sintel/Sintel.mp4\n```\n\nOr open m3u playlist in VLC video player:\n\n```\nvlc http://localhost/list/m3u/mp4/-/hash/08ada5a7a6183aae1e09d831df6748d566095a10\n```\n\nGenerate **m3u** files from list of magnets using wget and bash script:\n\u003cdetails\u003e\n  \u003csummary\u003emakelist.sh\u003c/summary\u003e\n\n```bash\n#!/bin/bash\n\nmagnets=\"magnets.txt\"\nplaylist_dir=\"playlists\" \n\nhost=\"localhost\"\nport=\"8484\"\n\nexts=\"mp3,mp4,m4a,m4,flac\"\nexclude_tags=\"live,interlude,demo,orchestral,orch,remix,mix,acoustic,instr,instrumental,synthesis,bonus,heavy\"\n\nrm -f $playlist_dir/*m3u*\n\nwhile read line; do\n     wget --content-disposition --directory-prefix=$playlist_dir --tries=3 \"http://$host:$port/list/m3u/$exts/$exclude_tags/magnet/$line\"\ndone \u003c $magnets\n```\n\n\u003c/details\u003e\n\u003cbr\u003e\n\n## Docker\n\nRun container with exposed 8484 http port:\n\n```\ndocker run --volume downloads:/downloads -it -p 8484:80 winpooh32/peerstohttp:latest -dir=/downloads\n```\n\n## Build steps\n\nutp dependency requires C compiler, then install it:  \n\n* Windows: download and install \u003chttps://jmeubank.github.io/tdm-gcc/download/\u003e\n* Ubuntu linux: `apt install build-essential`\n\nDownload:\n\n```\ngo get -v -u github.com/WinPooh32/peerstohttp\n```\n\nBuild in vendor mode:\n\n```\ngo build -mod=vendor -o peerstohttp\n```\n\nInstall:\n\n```\ngo install -i github.com/WinPooh32/peerstohttp/cmd\n```\n\nRun:\n\n```\ngo run github.com/WinPooh32/peerstohttp/cmd -port=8484 -dir=\"/path/to/download\"\n```\n\n* Usually, $GOPATH is \"~/go\";\n* Default `dir` value is system tmp folder, for listing all possible options run `$ ./peerstohttp -help`.\n\n## License\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FWinPooh32%2Fpeerstohttp.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FWinPooh32%2Fpeerstohttp?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinpooh32%2Fpeerstohttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinpooh32%2Fpeerstohttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinpooh32%2Fpeerstohttp/lists"}