bittorrent

How to create torrent file from magnet link using java?

荒凉一梦 提交于 2019-11-29 23:59:39
问题 So I wanted to work on a new Java project that converts magnet URIs into .torrent files, however I can't find a way to do that, basically I broke a magnet URI into pieces : The used URI : magnet:?xt=urn:btih:d2474e86c95b19b8bcfdb92bc12c9d44667cfa36&dn=Leaves+of+Grass+by+Walt+Whitman.epub&tr=udp%3A%2F%2Ftracker.example4.com%3A80&tr=udp%3A%2F%2Ftracker.example5.com%3A80&tr=udp%3A%2F%2Ftracker.example3.com%3A6969&tr=udp%3A%2F%2Ftracker.example2.com%3A80&tr=udp%3A%2F%2Ftracker.example1.com%3A1337

What is the best approach to handle large file uploads in a rails app?

允我心安 提交于 2019-11-29 20:36:58
I am interested in understanding the different approaches to handling large file uploads in a Rails application, 2-5Gb files. I understand that in order to transfer a file of this size it will need to be broken down into smaller parts, I have done some research and here is what I have so far. Server-side config will be required to accept large POST requests and probably a 64bit machine to handle anything over 4Gb . AWS supports multipart upload. HTML5 FileSystemAPI has a persistent uploader that uploads the file in chunks. A library for Bitorrent although this requires a transmission client

Extract the SHA1 hash from a torrent file

戏子无情 提交于 2019-11-29 19:45:50
I've had a look around for the answer to this, but I only seem to be able to find software that does it for you. Does anybody know how to go about doing this in python? I wrote a piece of python code that verifies the hashes of downloaded files against what's in a .torrent file . Assuming you want to check a download for corruption you may find this useful. You need the bencode package to use this. Bencode is the serialization format used in .torrent files. It can marshal lists, dictionaries, strings and numbers somewhat like JSON. The code takes the hashes contained in the info['pieces']

How to write a simple Bittorrent application?

送分小仙女□ 提交于 2019-11-29 18:43:55
How to write a simple bittorrent application. Something like a "hello world" using a bittorrent library, I mean a simplest of the application to understand the working of bittorrent. I would prefer a python or a C/C++ implementation, but it can be any language. Platform is not an issues either, but i would prefer Linux. Recommendations for the library to follow, I have downloaded the source code for one (i think official bittorrent) from - http://sourceforge.net/projects/bittorrent/develop . But, I see a lot of other libraries at http://en.wikipedia.org/wiki/Comparison_of_BitTorrent_clients

Magnet links library for PHP

☆樱花仙子☆ 提交于 2019-11-29 13:02:24
Does anyone here know of a magnet-URI -parser for PHP? To validate it, or maybe to extract some information from it? In case you're looking for something like this: Magnet URI: magnet:?xt=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C (valid) Display Name .... (dn): eXact Length .... (xl): eXact Topic ..... (xt): urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C Acceptable Source (as): eXact Source .... (xs): Keyword Topic ... (kt): Manifest Topic .. (mt): address TRacker . (tr): take a look at the Demo . Can't say if this matches your need, your question was sort of unspecific. So leave a comment. If you

Why does tracker server NOT understand my request? (Bittorrent protocol)

南笙酒味 提交于 2019-11-29 10:26:49
I'm trying to implement Bittorent in C. First of all, before writing a code snippet, I tried to used a web browser to send the following message(URL) to the tracker server. you may try this URL. http://torrent.ubuntu.com:6969/announce? info_hash=%9b%db%bbI%f0%85%a2%d1%5d%96%ac%fa%bf%f81%06%001O%e0 &peer_id=ABCDABCDABCDABCDABCD&port=6882&downloaded=0 &uploaded=0 &left=0 &event=started I have downloaded the torrent file from this link which is named dapper-dvd-i386.iso and has 9bdbbb49f085a2d15d96acfabff8310600314fe0 as SHA-1 value. However, after sending above request, I get your client is

Implementing find node on torrent kademlia routing table

ぐ巨炮叔叔 提交于 2019-11-29 07:25:34
I, already, reviewed a number of documents on this topic but there is something not exactly clear. For example bit torrent document ( http://www.bittorrent.org/beps/bep_0005.html ) states The routing table is subdivided into "buckets" that each cover a portion of the space. An empty table has one bucket with an ID space range of min=0, max=2^160. When a node with ID "N" is inserted into the table, it is placed within the bucket that has min <= N < max. An empty table has only one bucket so any node must fit within it. Each bucket can only hold K nodes, currently eight, before becoming "full."

Where to find BitTorrent source code? [closed]

妖精的绣舞 提交于 2019-11-29 03:33:20
I have looked and looked and cannot seem to find this source code anywhere. Every link I find points to the official BitTorrent page, which Slashdot says took the source code down in 2007. Am I to believe that this incredibly widespread, open-source technology is not to be found anywhere except in applications like uTorrent or Transmission? There has to be a place to download CURRENT source code for BitTorrent. Can anyone point me to that magical place? Mead FYI Archived version of the original Bittorrent application (also known as Mainline, particularly to those developing other bt clients)

How can I generate a .torrent in Java?

喜欢而已 提交于 2019-11-28 21:41:35
问题 I want to generate a .torrent file in Java, but I don't want a big API that does anything like scraping trackers, seeding, etc. This is just for a client that generates meta data. What lightweight solutions exist? I am only generating a .torrent of a single .zip file. Thanks! 回答1: I have put together this self-contained piece of Java code to prepare a .torrent file with a single file. The .torrent file is created by calling createTorrent() passing the name of the .torrent file, the name of

图解一致性hash算法和实现

限于喜欢 提交于 2019-11-28 21:40:40
更多内容,欢迎关注微信公众号:全菜工程师小辉。公众号回复关键词,领取免费学习资料。 一致性hash算法是什么? 一致性hash算法,是麻省理工学院1997年提出的一种算法,目前主要应用于分布式缓存当中。 一致性hash算法可以有效地解决分布式存储结构下动态增加和删除节点所带来的问题。 在Memcached、Key-Value Store、Bittorrent DHT、LVS中都采用了一致性hash算法,可以说一致性hash算法是分布式系统负载均衡的首选算法。 传统hash算法的弊端 常用的算法是对hash结果取余数 (hash() mod N):对机器编号从0到N-1,按照自定义的hash算法,对每个请求的hash值按N取模,得到余数i,然后将请求分发到编号为i的机器。但这样的算法方法存在致命问题,如果某一台机器宕机,那么应该落在该机器的请求就无法得到正确的处理,这时需要将宕掉的服务器使用算法去除,此时候会有(N-1)/N的服务器的缓存数据需要重新进行计算;如果新增一台机器,会有N /(N+1)的服务器的缓存数据需要进行重新计算。对于系统而言,这通常是不可接受的颠簸(因为这意味着大量缓存的失效或者数据需要转移)。 > 传统求余做负载均衡算法,缓存节点数由3个变成4个,缓存不命中率为75%。计算方法:穷举hash值为1-12的12个数字分别对3和4取模