Tuesday, September 27, 2016

How DC (Direct Connect) Works?

In my previous post i introduced you to a new software called DC++ and now I will tell you How it works. Click here to read previous post.

DC++ stands for Direct Connect++
DC++ is open source peer to peer file sharing client based on Direct connect protocol.


Direct Connect (protocol):
Direct Connect protocol is text based peer-to-peer file sharing protocol for client-server network. Works Same as Torrent.

A DC++ HUB acts like a traffic cop. Except here, it is not managing just 2 or 3 crossroads, but 100's/1000's of crossroads (depends on number of users online) simultaneously. It is a central source of distribution of information. Note that the HUB-hosting computer itself does not (practically, cannot) contain the actual information that a user is searching for. Neither does it store the file-list of all the clients' shared data either. Nothing!

A user searching for something is simply "guided" by the HUB to the client who has that 'something' on his/her computer.

HUB: 
A "HUB" here is a piece of software that routes chat and search requests/results and facilitates clients(peers) to connect each other. It's not called a server because it doesn't share any files. All file transfers are being made directly between clients, not through the HUB (peer to peer, p2p).

After connecting to the HUB you will be able to view a list of users within the HUB and shared content. 

File Sharing: 
Once you choose the files which you want to share. The software starts hashing each file that you have shared. Hashing means converting a large variable sized amount of data (or even passwords) into a piece of data, usually alphanumeric codes. The are many well-known algorithms designed by software engineers which are widely employed in hashing.

The DC++ uses TIGER TREE Hashing(TTH) Tiger (cryptography) 

(Tiger Tree Hashing (TTH) is used to verify the integrity of large chunks of data. The data is split into small pieces which are individually hashed, then hashed together until one root hash is formed. A TTH looks something like: 4NIABZVGR4HOTNRPOMH2IRIJQSJYKFHEEIQUJWY)

That is why in DC you will see codes like A12SDFGH1GHJKT45. The DC++ assigns a Tiger Tree Hash to each file you share. (Even if you change the name of the file the code remains the same). This means there may be many duplicate files on the network but all have the same TTH.

This is the reason Once you have added some files to your share, you may notice an increase in the usage of system resources.

Some Interesting facts:
Files are broken into chunks that are downloaded one after the other.

One can use DC internationally once you know the IP address of the HUB you can join it and Domain Default page is a good tool when you want to send a file to your friend who is far away from you.

Now it is difficult to carry a TTH hash, so Dc++ supports "magnet URLS" which contain the desired lengthy hash, A magnet link is an open URL-scheme which are mainly used to reference resources available for download via peer-to-peer networks.

Magnet URL contains some hash and the algorithm used for encryption. Magnet URLS are widely used in other p2p network like Torrents.

This is what a magnet URL looks like: xt=urn:tree:tiger:[ TTH Hash (Base32) ]
If you are not satisfied with what you got from DC++ at your college
You just take the magnet URL and use any torrent application (which support TTH) find the file in the entire world wide web and DOWNLOAD.

No comments: