Jump to content

Direct Connect (protocol)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 203.112.90.136 (talk) at 09:17, 8 April 2010 (→‎See also). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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.

History

NeoModus was started as a company funded by the adware "Direct Connect" by Jonathan Hess in November, 1999 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 have 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.

Protocol

The Direct connect protocol is a text-based computer protocol, in which commands and their information are 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 has been forced to reverse engineer the information. As such, any protocol specification this article may reference is likely either inaccurate and/or incomplete.[citation needed]

The client-server (as well in client-client, where one acts 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 either of these ports is already in use, the next higher port is used. For example, if 411, 412 and 413 are 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 on where a user might be redirected to. If a user is kicked, the hub isn't required to give the user a specific reason. 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 are used 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 '+' indicates 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 on 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 comparison with 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 independently of their names.

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 exists. 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.

Hub software

Hexhub

HeXHub is an unsafe IOCP-based hub, written in Assembly, for Windows. Last Update: Jun 11 2009.

Open Direct Connect Hub

Open Direct Connect Hub is open source hub software for Unix/Linux. Last Update: May 19, 2009.

FlexHub

FlexHub is currently in the beta testing stages. It is written entirely in Lua scripting language.

DB HUB

DB HUB is a fork of OpenDCHub with many new commands, better performance and protocol compatibility. It works without sql database access, just on plain files. For Linux/Unix.

PtokaX

PtokaX is hub software for Linux/FreeBSD/Windows. Last Update: June 21, 2008.

py-dchub

py-dchub Easily extensible, cross-platform Direct Connect hub, written in Python. Last Update: Feb 13 2006.

VerliHub

Verlihub is an open source hub server that runs on Linux. Last Update: May 6, 2009.

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.

DConnect Daemon

DCD open source software that runs on Linux/ *BSD/ Solaris/ Mac OS X/ Windows(cygwin). Last Update: April 5, 2007.

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.

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 shares) was compressed using Huffman's compression algorithm. Newer clients (among them DC++) serve an XML-based list, compressed with bzip2.

DC++

DC++ is an open source alternative to NMDC written in C++ mainly for Windows, but cross-platform forks exist, such as LinuxDC++ primary focus for this client is the ADC protocol.

DC++ Forks

  • StrongDC++ - includes bandwidth limiting and other extra features.
  • ApexDC++ - A fork of StrongDC++ with additional features.

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.

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.

ShakesPeer

ShakesPeer is a peer to peer (P2P) file sharing program. It is a client for the Direct Connect protocol. The main goal of ShakesPeer is to create a fully featured client, compatible with DC++, that runs on Mac OS X with a native Aqua GUI. The program is released as Open Source under the GPL License. Written on C. Can be compiled on Linux without Aqua GUI.

ShakesPeer Website
ShakesPeer on GoogleCode

LinuxDC++

LinuxDC++ is a port of DC++ to Linux. It has the same core with a rewritten user interface.

jucy

jucy (previously UC) client for Linux, Mac OS X and Windows that's written in Java. Active project.

Valknut

Valknut is a C++ and Qt written client that is designed to run on Linux, FreeBSD and Mac OS X. Requires dclib.

DCTC

Direct Connect Text Client (DCTC) [1] [2] for Linux. DCTC is not supposed to be used by humans. It generates continuous stream of messages that quickly overflows the screen. It is supposed to be used in conjunction with a frontend or a script. There are several ones: dc_gui [3] [4] (GTK), DC-Qt [5] (Qt), dctcd [6] (a daemon); ldcc (Linux Direct Connect Client) [7], rccp (Red Connect Console Program) [8], dc plugin for WeeNet [9] (the latter three ones are console ones).

They also provide a hub program (dchub).

At the moment of writing (1st Feb 2010) DCTC is of little use because it doesn't support TTH. Most of DC++ clones refuse to download anything from DCTC. They even refuse to download a filelist.

DC#

DC# is a client primary for Linux that uses GTK+. It has as a goal to be as easy to use as possible.

LDCC

LDCC is a linux console, text-based client for Direct Connect (peer-to-peer) networks. This client uses a VGA-compatible linux console as an interface between DCTC and the user.

Frameworks

Frameworks provide core libraries from which clients, hubs or bots for Direct Connect networks can be built.

jDCBot

jDCBot is pure Java framework to build clients or bots (not hubs) for DC networks. 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 the Direct Connect protocol.

Net::DirectConnect

Net::DirectConnect is a pure Perl framework to build clients or bots or hubs for DC networks.

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.

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 is extremely lightweight and CPU-friendly, less than 1-2% CPU used even if you connect 25 hubs and tens of thousands of users

It is a standalone program that can be used with any client or server soft and doesn't need proprietary script in order to function (unlike DC Hub-Link which is also killing on CPU-usage)

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)

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.

MyIrcDcLinks

MyIrcDcLinks is a GNU/GPL application, written in Delphi 7 (for Windows), that is able to connect to multiple (NMDC) dc hubs (and multiple irc servers/channels) and transmit chat messages from each one to the others.

The software has been completed in just 4 days! Some of the features are: queued messages (to avoid floods), bad words filter, operator commands (if you are an operator in IRC channel or DC hub, just send ".help" private command to the bot, for the list of available commands).

Hublists

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 the hub software due to this exploit. Many hublists have started to block insecure hubs.

As of February 2009[9][10] [11][12], an extension for clients was proposed in order for the attacked party to find out the hub sending the connecting users.

External links

  1. ^ Annalee Newitz (2001). "Sharing the Data". Metro, Silicon Valley's Weekly Newspaper. Metro Publishing Inc. Retrieved 2006-10-16. {{cite web}}: Unknown parameter |month= ignored (help)
  2. ^ Fredrik Ullner (2007). "Command and bandwidth estimations in NMDC". DC++: Just These Guys, Ya Know?. Retrieved 2007-07-27. {{cite web}}: Unknown parameter |month= ignored (help)
  3. ^ cologic (2007). "CTM tokens in ADC (or why the NMDC protocol is terrible, part 2)". DC++: Just These Guys, Ya Know?. Retrieved 2007-10-07. {{cite web}}: Unknown parameter |month= ignored (help)
  4. ^ Todd Pederzani (2006). "Filtering Redux". DC++: Just These Guys, Ya Know?. Retrieved 2007-08-31. {{cite web}}: Unknown parameter |month= ignored (help)
  5. ^ Paul Sop (2007). "Prolexic Distributed Denial of Service Attack Alert". Prolexic Technologies Inc. Prolexic Technologies Inc. Retrieved 2007-08-22. {{cite web}}: Unknown parameter |month= ignored (help)
  6. ^ Robert Lemos (2007). "Peer-to-peer networks co-opted for DOS attacks". SecurityFocus. Retrieved 2007-08-22. {{cite web}}: Unknown parameter |month= ignored (help)
  7. ^ Fredrik Ullner (2007). "Denying distributed attacks". DC++: Just These Guys, Ya Know?. Retrieved 2007-08-22. {{cite web}}: Unknown parameter |month= ignored (help)
  8. ^ http://steelrats.net/forum/viewthread.php?forum_id=4&thread_id=297
  9. ^ Jan Vidar Krey (2009). "Referral extension". DC++ Launchpad Page. Retrieved 2009-02-11. {{cite web}}: Unknown parameter |month= ignored (help)
  10. ^ Jan Vidar Krey (2009). "Referral extension on ADCPortal wiki". ADCPortal.com. Retrieved 2009-02-11. {{cite web}}: Unknown parameter |month= ignored (help)
  11. ^ Eugen Hristev (2009). "DC++ pointing out the corrupted". DC++: Just These Guys, Ya Know?. Retrieved 2009-02-11. {{cite web}}: Unknown parameter |month= ignored (help)
  12. ^ Toast (2009). "CTM Review and the errors of past". ADCPortal. Retrieved 2009-01-27. {{cite web}}: Unknown parameter |month= ignored (help)