Developing a new torrent client...

Discussion in 'QnA (read only)' started by Rollercoaster, Nov 7, 2006.

Thread Status:
Not open for further replies.
  1. Rollercoaster

    Rollercoaster -The BlacKCoaT Operative-

    Joined:
    Mar 10, 2005
    Messages:
    1,206
    Likes Received:
    17
    Trophy Points:
    0
    Location:
    Dehradun, India
    hi guys...

    i am so interested in p2p and specially the bittorrent networks..

    i was wondering how does one go abt developing a client for these networks

    Is there some standard(development website or something) and where do i get the necessary tools and protocol designs to make a new client by myself.....

    --Download---------------------------------------------------------------------------------------

    1. Torrent X-Ray v 0.0.2b.24017: RapidShare ~70kb (Req Dot.Net, view Post 15 of this thread)
    A lot of features are missing yet as i am working on it. please feel free to suggest some.
    [​IMG][​IMG][​IMG][​IMG]
    --Download---------------------------------------------------------------------------------------

    --EDIT--------------------------------------------------------------------------------------------
    I will be adding more resources as fast as it unravels in front of me... keep an eye on this section...

    General-
    1. Bittorrent Wiki(Protocol FAQ)
    2. Comparison of BitTorrent software
    3. The BitTorrent Effect - A Very nice article by WIRED mag on bittorrent and its history
    4. Port Assignments
    5. Windows Peer-to-Peer Networking
    6. Setting up your own tracker
    7. Brian's BitTorrent FAQ and Guide *thanks tech_your_future

    Discussions and blogs
    1. Bittorrent Client in C#
    2. David Smith on BitTorrent and IPv6 - (.NET ROCKS)
    3. Monotorrent - a Mono based cross platform client.
    4. Original mailing list by Bram Cohen, started Jun 28, 2001 closed Apr 11, 2005
    5. Present(i think) Bittorrent mailing list at ibiblio.org (though i dont see bram???)

    Relevent Dot.Net
    1. Writing Peer-to-Peer Networked Apps with the Microsoft .NET Framework
    2. Harness The Power Of P2P Communication In Windows Vista And WCF(Dot.net 3.0)

    Bittorrent Protocol Specifications-
    1. Protocol Outline(Original developer)
    2. Detailed specs v1.0

    Basic Clients/SDK(with Source)-
    1. rtorrent and libtorrent (*nix)
    2. libtorrent for C++ - SDK with examples :)
    3. Bittorrent/MainLine *for some reason the site is not working for me
    4. BitSharp(Tarball)- Bittorrent in C#

    Benconding-
    1. Bencoding WTF?
    2. Programming Comparisons: BEncoding

    UTF-8 (Torrent are written in UTF8 using bencoding)
    1. UTF-8
    2. Wiki UTF-8
    3. Unicode and .NET (C#)
    4. cant find a good one for vb.net

    SHA1 - Torrent file contains 20 bytes/piece SHA1 hash concatination of the data contained within each piece.
    1. Wiki
    2. W3C
    3. Hash examples c#/vb.net


    I am using this thread to collect resources and keep them organised. Please feel free to drop links relevent to the topic.
    --EDIT--------------------------------------------------------------------------------------------
     
    Last edited: Jan 24, 2007
  2. mehulved

    mehulved 18 Till I Die............

    Joined:
    Jul 15, 2004
    Messages:
    5,790
    Likes Received:
    44
    Trophy Points:
    0
    Location:
    India, Mumbai, Marine Lines
    Maybe this should help you http://www.bittorrent.org/. But why do you want to create a new client? For experimentation? If you are looking to make something that just leech's then forget it, your client will be banned from so many sites before you know of.
    Also, I am PM'ing you one more link. I can't post it here cos it does have some links that seem to lead to content not allowed here.
     
  3. OP
    OP
    Rollercoaster

    Rollercoaster -The BlacKCoaT Operative-

    Joined:
    Mar 10, 2005
    Messages:
    1,206
    Likes Received:
    17
    Trophy Points:
    0
    Location:
    Dehradun, India
    Jeez.. no man i am not a leecher.. i seed atleast uptill 0.5 or till i cant hold myself off from downloading something new.

    and yes i just want to learn more abt bittorrent p2p networking and hopefully someday add to the community :)
    __________
    btw what would be the point of just downloading.. what does one do with the left out upload bandwidth???
     
    Last edited: Nov 7, 2006
  4. Sourabh

    Sourabh Laptoping

    Joined:
    Aug 15, 2004
    Messages:
    2,206
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Mumbai
    Best of luck for your future developments. But I beg you to not make a torrent client better than utorrent. You see, I am in luv with it. I cannot tolerate it to be second to nothing. I hope you now realize where to draw the line :)
     
  5. OP
    OP
    Rollercoaster

    Rollercoaster -The BlacKCoaT Operative-

    Joined:
    Mar 10, 2005
    Messages:
    1,206
    Likes Received:
    17
    Trophy Points:
    0
    Location:
    Dehradun, India
    I am so glad we are not in love with the same thing...Otherwise it could have turned nasty.... and i am pretty good at getting what i love at all costs :)

    btw i love azureus
    __________
    and guys the information from the above link doesnt give me enough to start developing anything. can u please find some more information..

    i want to develop it using vb.net (framework 2.0)
    and i seriously dont have any knowlidge of network programming. That is the reason i choose to start developing a torrent client. the best and the neatest networking example.

    And my personal aim to add total anonymity features to the current protocol.
    I hope it is not too high :-D
     
    Last edited: Nov 7, 2006
  6. mehulved

    mehulved 18 Till I Die............

    Joined:
    Jul 15, 2004
    Messages:
    5,790
    Likes Received:
    44
    Trophy Points:
    0
    Location:
    India, Mumbai, Marine Lines
    At the end of the page in the link I PM'ed you, you will find the address of their mail groups and irc channels. That will help you out a lot and those people can provide you better resources then I can do since they work in that field.
     
  7. OP
    OP
    Rollercoaster

    Rollercoaster -The BlacKCoaT Operative-

    Joined:
    Mar 10, 2005
    Messages:
    1,206
    Likes Received:
    17
    Trophy Points:
    0
    Location:
    Dehradun, India
  8. mod-the-pc

    mod-the-pc Back to School Mr. Bean !

    Joined:
    Apr 1, 2004
    Messages:
    344
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Chennai
    What language are you going to code in?
     
  9. OP
    OP
    Rollercoaster

    Rollercoaster -The BlacKCoaT Operative-

    Joined:
    Mar 10, 2005
    Messages:
    1,206
    Likes Received:
    17
    Trophy Points:
    0
    Location:
    Dehradun, India
    i prefer vb.net 2.0
    tho it seems that there is some problem with the 2.0 framework regarding something high tech someone on some irc channel told me, something of overflows and leaks. i sincerely did not understand his guru-talk

    but i still want to do it in .net as it will be just education and experimentation.

    btw i can work with java/c#/vb.net
    __________
    a good core client rtorrent and libtorrent at http://libtorrent.rakshasa.no/
    __________
    can some one please shed some light on the following:
    "Bencoding - Bencoding is a way to specify and organize data in a terse format. It supports the following types: byte strings, integers, lists, and dictionaries."
     
    Last edited: Nov 7, 2006
  10. mod-the-pc

    mod-the-pc Back to School Mr. Bean !

    Joined:
    Apr 1, 2004
    Messages:
    344
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Chennai
    Do let me know if you code in Java. I can lend a hand then
     
  11. mehulved

    mehulved 18 Till I Die............

    Joined:
    Jul 15, 2004
    Messages:
    5,790
    Likes Received:
    44
    Trophy Points:
    0
    Location:
    India, Mumbai, Marine Lines
    Then maybe you'll can later on create some good add-ons to Azureus if you'll are going to work in java. And being a open source client, it would be easier to create add-ons for Azureus. Maybe you'll will be able to create something worthwhile who knows.
     
  12. OP
    OP
    Rollercoaster

    Rollercoaster -The BlacKCoaT Operative-

    Joined:
    Mar 10, 2005
    Messages:
    1,206
    Likes Received:
    17
    Trophy Points:
    0
    Location:
    Dehradun, India
    no after all the research i think i will be doing it in dot.net
    remember my goal is to learn.. :) and i want to learn dot.net

    c# or vb.net? not yet decided
    __________
    Ok i have started drawing the basic design of the client.
    i will just be exchanging a few requests with a peer of some torrent swarm.
    __________
    This hash thing has got me stuck.. can anyone please please tell me how to generate hash of a particular block of data so that it can be compared to the hash available in the torrent file.

    I have not worked with SHA1 or hashes earlier.
     
    Last edited: Nov 9, 2006
  13. Mutant_Fruit

    Mutant_Fruit New Member

    Joined:
    Nov 20, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Well, if you're going with .NET why not work on an existing .NET client and make it even better? Monotorrent is written in C#.

    As for the calculating of hashes isn't it as simple as reading block X of data from the file and then using the Sha1Managed class to hash it?
     
  14. OP
    OP
    Rollercoaster

    Rollercoaster -The BlacKCoaT Operative-

    Joined:
    Mar 10, 2005
    Messages:
    1,206
    Likes Received:
    17
    Trophy Points:
    0
    Location:
    Dehradun, India
    thanks for the tips...

    i have to admit i am not able to put in as much time i wanted too..

    anyways, i want to build up from scratch because i want to learn the basics of networking and it seems to be the best technology to learn advanced networking. i dont want to make a better client. rather i dont have enough time to put in to seriously build a client that could compete with the present contenders.
     
  15. OP
    OP
    Rollercoaster

    Rollercoaster -The BlacKCoaT Operative-

    Joined:
    Mar 10, 2005
    Messages:
    1,206
    Likes Received:
    17
    Trophy Points:
    0
    Location:
    Dehradun, India
    ================================ 21/12/06
    Hi Guys
    i have been aways form this small project for some time but have been working whenever i get free time. I have managed to build a creeky and horrific base for the core of my client :-D

    The client us far from being compeleted or even presentable. but Here is a small portion from the whole package. A torrent file decoder which i have nicknamed Torrent X-Ray. (do tell me if the name is already under use somewhere)

    Download it here: RapidShare ~70kb

    Please Provide ur feedback.. specially abt the user interface style (and bugs ofcourse) and keep in mind that i havent finished the UI yet. there is a lot of missing functionality. this is just a preview.

    [​IMG]
    __________
    ScreenShot
     
    Last edited: Dec 21, 2006
  16. XtraOrdinary

    XtraOrdinary New Member

    Joined:
    Aug 26, 2006
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    0
    Looks ggood
    but still lot of function missing.

    but very nice work
    lets see if u get near torrentspy :)
     
    Rollercoaster likes this.
  17. navjotjsingh

    navjotjsingh Active Member

    Joined:
    Feb 12, 2005
    Messages:
    1,924
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Delhi, India
    Yeah it seems it does not have the functionality to download via torrent...but till now it looks cool! Great Job!
     
  18. OP
    OP
    Rollercoaster

    Rollercoaster -The BlacKCoaT Operative-

    Joined:
    Mar 10, 2005
    Messages:
    1,206
    Likes Received:
    17
    Trophy Points:
    0
    Location:
    Dehradun, India
    hey thanks for the tips...

    @navjot: this is a utility to view torrent file information only not a client.. like (as mentioned) torrentspy. tho i am workin in a client as well :)


    I am thinkning of adding more functionality to it...guys tell me some features u think should be added.
    btw tracker status is already on the list :)
     
  19. Third Eye

    Third Eye gooby pls

    Joined:
    Apr 2, 2006
    Messages:
    4,293
    Likes Received:
    58
    Trophy Points:
    48
    Location:
    Not very far from you
    Good Work ! Rollercoaster

    Hope you will develop a complete torrent client in the near future. :)
     
Thread Status:
Not open for further replies.

Share This Page