$ godo /anacrolix/torrent/cmd/torrent-magnet < ubuntu-14.04. Note the extracted trackers, display name, and info hash. $ pv mnt/ubuntu-14.04.2-desktop-amd64.iso | md5sumĩ96MB 0:04:40 100%Ĭreates a magnet link from a torrent file. $ godo /anacrolix/torrent/cmd/torrentfs -mountDir mnt -torrentPath torrents & Data for read requests is fetched only as required from the torrent network, and stored at -downloadDir. The contents are the torrents described by the torrent files and magnet links at -torrentPath. Torrentfs mounts a FUSE filesystem at -mountDir. $ torrent 'magnet:?xt=urn:btih:KRWPCX3SJUM4IMM4YF5RPHL6ANPYTQPU' # Now 'torrent' should be in $GOPATH/bin, which should be in $PATH. torrentĭownloads torrents from the command-line. It's easier to use this convention than to spell out the install/invoke cycle for every single example. Note that the godo command which is invoked in the following examples builds and executes a Go import path, like go run. Here I'll describe what some of the provided commands in. Checkout the mobile branch, and bind as usual. It has some API changes as required by gomobile. There's a branch called mobile that supports binding to torrent with the gomobile tool. There is a small example in the package documentation. Install the library package with go get /anacrolix/torrent, or the provided cmds with go get /anacrolix/torrent/cmd/. Many of the sub-packages can be used for other purposes: bencode, and tracker, in particular. cmd, or use torrent as a library for your own applications. There are several data storage backends provided: blob, file, and mmap, and you can write your own, such as to store data on S3, or in a database. See the package documentation for a more complete list. There is support for protocol encryption, DHT, PEX, uTP, and various extensions. It's been used 24/7 in production by a downstream, private service since late 2014. The emphasis is on use as a library from other projects. This repository implements BitTorrent-related packages and command-line utilities in Go. (cl) AddTorrentInfoHashWithStorage(infoHash, specStorage)
0 Comments
Leave a Reply. |