bittorrent

How does the Bittorrent protocol handle the data chunks?

痴心易碎 提交于 2019-12-07 12:06:43
问题 How are the data chunks handled within the bittorrent protocol? When a client wants to download e.g. a linux distribution does the tracker return a list of peers which a client then connects to and requests chunks from each peer or does the tracker return a list of peers and info of which peer has what data? Where is the data chunks managed or handled e.g. I need chunk 5 , 6, 10 and peer 2 has chunk 5, 7, 8. where is the data controlled or managed? Does the client request chunks from the

How do BitTorrents connect with eachother?

回眸只為那壹抹淺笑 提交于 2019-12-07 09:30:41
问题 I was just downloading a new distro of linux using uTorrent, and started to wonder how uTorrent (and other bittorrents) send files to eachother through NAT routers? They obviously use the trackers to get introduced, but how do they pass info to eachother? Is there a whitepaper on this? I couldn't find one :/ Thanks 回答1: Most of the time, they don't. I have a restricted network, and every time I run my torrent program it warns me that some of the ports/functionality required is not available

Connecting to torrent trackers / peers

不打扰是莪最后的温柔 提交于 2019-12-06 16:29:38
I'm currently trying to implement a minimal torrent client, in nodeJS. I'm reading through this specification: https://wiki.theory.org/index.php/BitTorrentSpecification I've got 2 magnet URIs: magnet:?xt=urn:btih:633ab5b0cc27218bca2f9fec9b68ae4f7cbf0c5f&dn=dmb2017-05-31.dpa4021.flac16 xt=urn:btih:633ab5b0cc27218bca2f9fec9b68ae4f7cbf0c5f dn=dmb2017-05-31.dpa4021.flac16 magnet:?xt=urn:btih:9f9165d9a281a9b8e782cd5176bbcc8256fd1871&dn=Ubuntu+16.04.1+LTS+Desktop+64-bit&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Fzer0day.ch%3A1337&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp

BitTorrent Sync使用方法

心已入冬 提交于 2019-12-06 15:39:44
BitTorrent Sync是一个简单的文件传输工具,他使用p2p协议传输文件,以最大的安全度、网络带宽、存储能力传输文件。文件通过p2p协议传输,因此每一个链接上的电脑都同时是客户端和服务端。设备在同步时是直接相连的,你可以通过udp、nat转换、upnp端口映射、中继服务器等建立链接。如果你的网络是本地网络,BitTorrent Sync在同步时不会使用外部网络。所有在设备之间的传输都是经过AES加密的。 BitTorrent Sync可以在windows、mac、linux上使用,本文主要是在linux上使用,在linux平台上BitTorrent Sync是很好安装的,从官方根据平台类型下载好你需要的tar包之后,在linux服务器上解压即可看到一个btsync二进制文件,执行./btsync即可运行。BitTorrent Sync自带了一个WEB UI界面,你可以通过你本机的ip:8888/gui来访问,端口都是可以修改的,在第一次访问UI界面时是不需要认证的,不过还是建议设置密码认证。不过我还是喜欢CLI的管理方式。执行./btsync --help即可看到CLI的使用方式。 BitTorrent Sync还有一个用户借口,通过它你可以知道链接了哪些设备、那个目录在同步、传输速度、上传/下载历史、性能等等。这些数据在WEB UI都有直观的显示

How to calculate the hash value of a torrent using Java

我的未来我决定 提交于 2019-12-06 15:31:15
问题 How can I calculate the hash value of a torrent file using Java? Can I calculate it using bencode? 回答1: Torrent files are hashed using SHA-1. You can use MessageDigest to get a SHA-1 instance. You need to read until 4:info is reached and then gather the bytes for the digest until remaining length minus one. Note : This implementation works for most torrents, but the .torrent file is not guaranteed to end with the info key. File file = new File("/file.torrent"); MessageDigest sha1 =

How does a peer know another peer is a seed?

此生再无相见时 提交于 2019-12-06 05:50:12
问题 When a peer connects to another peer that has all the pieces, how does the connecting peer know that what it connects to is actually a seed (and has all of the pieces)? Are there messages sent between them? In clients like uTorrent, the peer seems to be aware of the download progress of each peer it has connected to as well. How does it know all that? Does a peer derive that another peer is a seed if progress is 100% or are there actually specific messages for that? Which parts of the

The torrent info_hash parameter

点点圈 提交于 2019-12-06 04:42:04
问题 How does one calculate the info_hash parameter ? Aka the hash corresponding to the info dictionar?? From official specs: info_hash The 20 byte sha1 hash of the bencoded form of the info value from the metainfo file. Note that this is a substring of the metainfo file. This value will almost certainly have to be escaped. Does this mean simply get the substring from the meta-info file and do a sha-1 hash on the reprezentative bytes?? .... because this is how i tried 12 times but without succes

Bittorrent Extension Protocol

倖福魔咒の 提交于 2019-12-06 04:33:43
I am trying to write my own bittorrent client in java, it is a make work project to refresh my java skills. I have been stuck at a certain point in development and although there are forums out there for bittorrent development they don't appear to be very active. So far I can do the following: Get a list of peers from Tracker sites Connect to a peer Send the 'Handshake' message Receive the 'Handshake' message back Send the 'Interested' message. Receive the 'Unchoke' message back. The problem I am having is if I try sending extended data ( http://www.bittorrent.org/beps/bep_0010.html ) to the

Using the bittorrent protocol to distribute nightly and CI builds

拜拜、爱过 提交于 2019-12-06 01:19:32
问题 This questions continues from what I learnt from my question yesterday titled using git to distribute nightly builds. In the answers to the above questions it was clear that git would not suit my needs and was encouraged to re-examine using BitTorrent. Short Version Need to distribute nightly builds to 70+ people each morning, would like to use git BitTorrent to load balance the transfer. Long Version NB. You can skip the below paragraph if you have read my previous question. Each morning we