Direct Connect (file sharing)
From Wikipedia, the free encyclopedia
This article may require cleanup to meet Wikipedia's quality standards. Please improve this article if you can. (February 2008) |
Direct connect is a peer-to-peer file-sharing protocol. Direct connect clients connect to a central hub and can download files directly from one another.
Hubs feature a list of clients or users connected to them. Users can search for files and download them from other clients, as well as chat with other users.
Contents |
[edit] History
NeoModus was started by Jonathan Hess in November, 1999 as a company funded by the adware "Direct Connect" while he was in high school [1]. The first third-party client was called "DClite", which never fully supported the file sharing aspects of the protocol. Hess released a new version of Direct Connect, requiring a simple encryption key to initiate a connection, locking out third-party clients. The key was cracked, and the author of DClite released a new version of DClite compatible with the new software from NeoModus. Some time after, DClite was rewritten as Open Direct Connect with goals of having an MDI user interface and using plug-ins for file sharing protocols (similar to MLDonkey). Open Direct Connect also did not complete support for the full file sharing aspects of the protocol, but a port to Java did. Some time later, other clients such as DCTC (Direct Connect Text Client) and DC++ started popping up.
[edit] Protocol
The Direct connect protocol is a text-computer based protocol, where commands and their information is sent in clear text, without encryption. As clients connect to a central source of distribution (the hub) of information, the hub is required to have a substantial amount of upload bandwidth available. [2]
There is no official specification of the protocol. This means that every client and hub besides the original Neo-modus client and hub have been forced to reverse engineer the information. As such, any protocol specification this article may reference is likely either inaccurate and/or incomplete.
The client-server (as well in client-client, where one act as "server") aspect of the protocol stipulates that the server speak first when a connection has been made. For example, when a client connect to a hub's socket, the hub is first to talk to the client.
The protocol does not require a character encoding or font for clients or hubs.
Port 411 is the default port for hubs, and 412 for client-to-client connections. If any of these ports are already in use, the next port is used. For example, if 411, 412 and 413 is in use, then port 414 will be used.
Hub addresses are in the following form: dchub://example.com[:411], where 411 is an optional port.
There is no global identification scheme; users are identified with their nick-name on a hub-to-hub basis.
An incoming request for a client-client connection cannot be linked with an actual connection.[3]
A search result cannot be linked with a particular search.[4]
Supported by the protocol is the ability to kick or move (redirect) a user to another hub. There is no restriction where a user might be redirected to. If a user is kicked, the hub isn't required to tell the specific reason as to why the user was kicked. However, if another client in power instructs the hub to kick, that client may send out a notification message before doing so. Redirecting a user must be accompanied by a reason. There is no HTTP referer equivalent.
Hubs may send out user commands to clients. These commands are only raw protocol commands, and is mostly for making a particular task simpler. For example, the hub cannot send a user command that will trigger the default browser to visit a website. It can however add the command "+rules" (where '+' indicate to the hub that it's a command - this may vary) to display the hub's rules.
The peer-to-peer part of the protocol is based around a concept of "slots" (similar to number of open positions for a job). These slots denote the number of people that are allowed to download from a user at any one time. These slots are controlled by the client.
In client to client connections, the parties negotiate a random number to see who should be allowed to download first. The client with the highest number wins.
Downloads are transported using TCP. Active searches use UDP. The connection to the hub is with TCP.
There are two kinds of modes a user can be in, either "active" or "passive" mode. Clients using active mode can download from anyone else on the network. Clients using passive mode users can only download from active users. In NeoModus Direct Connect, passive mode users receive other passive mode users' search results, while the user will not be able to download anything. In DC++, users will not receive those search results. In NeoModus Direct Connect, all users will be sent at most five search results per query. If a user has searched, DC++ will respond with ten search results when the user is in active mode, or five, when the user is in passive mode. Passive clients will be sent search results through the hub, while active clients will receive the results directly.
Protocol delimiters are '$', '|' and ' ' (space). There is no escape sequence, so these characters can't be sent without possibly compromising the integrity of the message. However, a workaround was devised in DC++: send the HTML equivalent if these characters are to be viewed by the user.
Continued interest exists in features such as ratings and language packs. However, the authors of DC++ have been actively working on a complete replacement of the Direct connect protocol called Advanced Direct Connect.
One example of an added feature to the protocol, in compared to the original protocol, is the broadcasting of Tiger-Tree Hashing of shared files (TTH). The advantages of this include verifying that a file is downloaded correctly, and the ability to find files independent of their names.
[edit] Hubs
Direct connect hubs are central servers to which clients connect, thus the networks are not as de-centralised as Gnutella or FastTrack. Hubs provide information about the clients, as well as file searching and chat capabilities. File transfers are done directly between clients, in true peer-to-peer fashion.
Hubs often have special areas of interest. Many have requirements on the total size of the files that their members share (share size), and restrictions on the content and quality of shares. A hub can have any arbitrary rule. Hubs can allow users to register and provide user authentication. It should be noted that the authentication is also in clear text. The hub may choose certain individiuals as operators (similar to IRC operators) to enforce said rules if the hub itself cannot.
While not directly supported by the protocol, hub linking software exist. The software allow multiple hubs to be connected, allowing users to share and / or chat with people on the other linked hubs.
Direct connect hubs have difficulty scaling, due to the broadcast-centricity of the protocol.
[edit] Hub software
[edit] Hexhub
HeXHub is an IOCP-based hub, written in Assembly, for Windows. Last Update: Sep 01 2008.
[edit] Open Direct Connect Hub
Open Direct Connect Hub is open source hub software for Unix/Linux. Last Update: Mar 19 2006.
[edit] PtokaX
PtokaX is hub software for Linux/FreeBSD/Windows. Last Update: June 21 2008.
[edit] py-dchub
py-dchub Easily extensible, cross-platform Direct Connect hub, written in Python. Last Update: Feb 13 2006.
[edit] VerliHub
Verlihub is an open source hub server that runs on Linux. Last Update: September 14 2007.
[edit] YnHub
YnHub (Yoshi and Nev Hub) is hub software for Windows. It is the successor to YHub (Yoshi Hub) and the hubsoft is written in Delphi. Last Update: Mar 23 2008.
[edit] DConnect Daemon
DCD open source software that runs on Linux/ *BSD/ Solaris/ Mac OS X/ Windows(cygwin). Last Update: April 5 2007.
[edit] DDCH DevDirect Connect Hub
DDCH is open source hub software for Windows, written in VB6, DDCH support VBScript and JScript scripts. Last Update: April 15 2007.
[edit] Client software
While not mandated by the protocol, most clients send a "tag". This is part of the client's description and display information ranging from client name and version to number of total available slots to if the user is using a proxy server. It was originally added to DC++, due to its ability to be in multiple hubs with the same instance. The information is arbitrary.
The original client's file list (a comprehensive list of the files a user share) was compressed using Huffman's compression algorithm. Newer clients (among them DC++) serve an XML based list, compressed with bzip2.
[edit] DC++
DC++ is an open source alternative to NMDC written in C++ mainly for Windows, but cross platform forks exist like LinuxDC++.
[edit] MLDonkey
MLDonkey is an open source, free software multi-network peer-to-peer application. Originally a Linux client for the eDonkey protocol, it now runs on many flavors of Unix-like operating systems, Mac OS X, Windows and MorphOS and supports numerous peer-to-peer protocols.
[edit] NeoModus Direct connect
NeoModus Direct Connect (abbreviated to NMDC) was the original Direct connect client. It was written by Jonathan Hess at the company NeoModus. The first version was written in Visual Basic and released in November 1999. It only ran on Windows. The second version was written in C++ and C# and had Mac OS X support.
[edit] ShakesPeer
ShakesPeer is a client specifically written for Mac OS X.
[edit] Linux DC++
LinuxDC++ is a port of DC++ to Linux. It has the same core with a rewritten user interface.
[edit] jUCy
jUCy (previously UC) client for Linux, Mac OS X and Windows that's written in Java. Active project.
[edit] Valknut
Valknut is a C++ and Qt written client that is designed to run on Linux, FreeBSD and Mac OS X.
[edit] DCTC
Direct Connect Text Client (DCTC) [1] for Linux. They also provide a GUI (dc_gui) for the client and a hub program (dchub).
[edit] DC#
DC# is a client primary for Linux that uses GTK+. It has as a goal to be as easy to use as possible.
[edit] Frameworks
They provide core libraries using which clients, hubs or bots for Direct Connect network can be built.
[edit] jDCBot
jDCBot is pure Java framework to build clients or bots (not hubs) for DC network. It also implements the logic to hash files and prepare file-lists of the user. Its goal is to relieve the developers of clients and bots of the intricacies of Direct Connect protocol.
[edit] Net::DirectConnect
Net::DirectConnect is pure Perl framework to build clients or bots or hubs for DC network.
[edit] Hub linking software
Hub linking software links hubs' main chat, so that users can see and respond to chat that is in a hub they're not directly connected to.
Often used to draw in users to hubs, or make private or small hubs more widely known. Whereas advertising a hub is "frowned upon" and usually repercussioned with floods or (D)DoS, forming a more or less formal network by means of linking hub chat is a legitimate means for getting free publicity
Some Hub programs are able to support a more advanced form of linking which includes all the normal functions, chat, private messages, search and file transfers between users on different hubs can be supported through hub specific solutions or hubsoft neutral extensions using scripts/plug-ins.
[edit] DC Hub-Link
Hub-Link is open source software for Windows that links hubs using the NeoModus Direct Connect-protocol (NMDC). It is the only Hub-Linking solution that provides 100% support of all protocol commands on linked hubs using different hub programs. IRC-protocol is also support to add the users and chat from an IRC channel into the main chat of a set of linked hubs.
Using Hub-Link with supported hub software, hub owners can link multiple hubs into a larger virtual hub in a way that is virtually transparent to their users. For hubsofts without the ability to extend their functionality via scripting/plug-ins full chat linking and private message are still supported.
[edit] Direct Connect Hub link
DC-hublink is open source software for Windows that links hub chat, supporting all Direct Connect protocols.
It supports the NeoModus Direct Connect-protocol (NMDC), Advanced Direct Connect-protocol (ADC), as well as the IRC-protocol (for making a connection to servers via Internet Relay Chat)
It offers many features such as dynamically showing connected hubs and users, auto-reconnecting to hubs that are offline, antiflood protection (also available in antiflood-only mode, without the ability to link chat), autolock and -unlock mainchat (only for hubs that support this)
[edit] Hublists
- QSDCHublist.com NMDC hublist (11000+ hubs in database, Pinger with CTM Detection)
- Dchublist.com NMDC and ADC hublist (about 7000 hubs for NMDC hublist, 30 for ADC hublist)
- OpenHublist.org first mixed NMDC/ADC hublist with ~3000 hubs (new domain for hubtracker.com)
- publichublist.nl hublist with ~2200 hubs
- Russian DC++ Hublist hublist with ~ 650 hubs
- Hublist.nu .conf Hublist with ~ 500 hubs
[edit] Direct Connect used for DDoS attacks
As the protocol allow hubs to redirect users to another hub, malicious hubs have redirected users to other places than real Direct connect hubs, effectively causing a Distributed Denial of Service attack. As well, the hubs may alter the IP in client to client connections, pointing to a potential victim. [5] [6] [7]
The CTM Exploit made its presence known during 2006-2007 it made the developers take security issues more seriously since the whole direct connect network suffered from DDoS attacks from this exploit[8]. It's recommended for users to run later versions of hubsoft due to this exploit. Many Hublists have started to block insecure hubs, this message was posted by Dchublist.com
As of February 2009[9][10] [11], an extension for clients was proposed in order for the attacked party to find out the hub sending the connecting users.
Mon Apr 14, 2008 IMPORTANT MESSAGE: There are still many hubs that are effected by the well known CTM exploit. As of next month we, along with other hublists, will be disabling these hubs from our active client lists. Please update your hubsofts to the latest versions to avoid this. Effected hubsofts are as follows: Verlihub-0.9.8c, Verlihub-0.9.8d-rc1, ynhub < 1.0306 , ptokax < 0.3.5.2. We will be emailing all the effected hubs in our list over the next week to notify them of our intentions. We will include instructions on where to obtain the updated versions of their respective hubsofts.
[edit] See also
[edit] References
- ^ Annalee Newitz (July 2001). "Sharing the Data". Metro, Silicon Valley's Weekly Newspaper. Metro Publishing Inc. http://www.metroactive.com/papers/metro/07.12.01/work-0128.html. Retrieved on 2006-10-16.
- ^ Fredrik Ullner (April 2007). "Command and bandwidth estimations in NMDC". DC++: Just These Guys, Ya Know?. http://dcpp.wordpress.com/2007/04/23/command-and-bandwidth-estimations-in-nmdc/. Retrieved on 2007-07-27.
- ^ cologic (August 2007). "CTM tokens in ADC (or why the NMDC protocol is terrible, part 2)". DC++: Just These Guys, Ya Know?. http://dcpp.wordpress.com/2007/08/03/ctm-tokens-in-adc-or-why-the-nmdc-protocol-is-terrible-part-2/. Retrieved on 2007-10-07.
- ^ Todd Pederzani (June 2006). "Filtering Redux". DC++: Just These Guys, Ya Know?. http://dcpp.wordpress.com/2006/06/04/filtering-redux/. Retrieved on 2007-08-31.
- ^ Paul Sop (May 2007). "Prolexic Distributed Denial of Service Attack Alert". Prolexic Technologies Inc.. Prolexic Technologies Inc.. http://www.prolexic.com/news/20070514-alert.php. Retrieved on 2007-08-22.
- ^ Robert Lemos (May 2007). "Peer-to-peer networks co-opted for DOS attacks". SecurityFocus. http://www.securityfocus.com/news/11466. Retrieved on 2007-08-22.
- ^ Fredrik Ullner (May 2007). "Denying distributed attacks". DC++: Just These Guys, Ya Know?. http://dcpp.wordpress.com/2007/05/22/denying-distributed-attacks/. Retrieved on 2007-08-22.
- ^ http://steelrats.net/forum/viewthread.php?forum_id=4&thread_id=297
- ^ Jan Vidar Krey (February 2009). "Referral extension". DC++ Launchpad Page. https://bugs.launchpad.net/dcplusplus/+bug/316096. Retrieved on 2009-02-11.
- ^ Jan Vidar Krey (February 2009). "Referral extension on ADCPortal wiki". ADCPortal.com. http://www.adcportal.com/wiki/index.php/REF. Retrieved on 2009-02-11.
- ^ Eugen Hristev (February 2009). "DC++ pointing out the corrupted". DC++: Just These Guys, Ya Know?. http://dcpp.wordpress.com/2009/02/11/dc-pointing-out-the-corrupted/. Retrieved on 2009-02-11.
[edit] External links
- Direct Connect FAQ
- Protocol documentation (docman)
- ADC Specification
- Protocol Documentation Wiki mirror
- Help for DC (fr)
|