Simple torrent proxy to http stream controlled over REST-like api
Built top on anacrolix/torrent lib.
m3u
,html
,json
08ada5a7a6183aae1e09d831df6748d566095a10
-
", "mp3,mp4a
"-
", "remix,interview
"Get list of files by magnet uri:
GET http://localhost/list/{playlist}/{extsWhitelist}/{tagsBlacklist}/magnet/{magnetURI}
Get list of files by info hash:
GET http://localhost/list/{playlist}/{extsWhitelist}/{tagsBlacklist}/hash/{hash}
Download file:
GET http://localhost/content/{hash}/{filePath}
Get HTML links list for Sintel by torrent hash:
http://localhost/list/html/mp4/-/hash/08ada5a7a6183aae1e09d831df6748d566095a10
or by magnet URI:
http://localhost/list/html/mp4/-/magnet/magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrent
Then watch Sintel.mp4 using VLC video player:
vlc http://localhost/content/08ada5a7a6183aae1e09d831df6748d566095a10/Sintel/Sintel.mp4
Or open m3u playlist in VLC video player:
vlc http://localhost/list/m3u/mp4/-/hash/08ada5a7a6183aae1e09d831df6748d566095a10
Generate m3u files from list of magnets using wget and bash script:
Run container with exposed 8484 http port:
docker run --volume downloads:/downloads -it -p 8484:80 winpooh32/peerstohttp:latest -dir=/downloads
utp dependency requires C compiler, then install it:
apt install build-essential
Download:
go get -v -u github.com/WinPooh32/peerstohttp
Build in vendor mode:
go build -mod=vendor -o peerstohttp
Install:
go install -i github.com/WinPooh32/peerstohttp/cmd
Run:
go run github.com/WinPooh32/peerstohttp/cmd -port=8484 -dir="/path/to/download"
dir
value is system tmp folder, for listing all possible options run $ ./peerstohttp -help
.