Encryption matters

Now that DC++ by default encrypts ADC transfers, it’s worth noting that such capability is a useful hedge against mounting evidence that at least one major US ISP is interfering not only with BitTorrent traffic, but with Lotus Notes traffic.

I expect that the ability to encrypt (though, at the moment there’s no out-of-band key exchange to avoid man-in-the-middle attacks, that ought to change eventually) will become increasingly important for DC in the near future; university ResNet networks already tend to block or heavily throttle it.

Encryption matters.

DC++ 0.701 crashes on startup?

It may happen that your freshly installed/downloaded DC++ 0.701 crashes as soon as you start it (or die without any error message, just it simply doesn’t start). This is caused by an unhandled exception which is going to be handled in the upcoming releases. To workaround this problem, create a Certificates folder in your DC++ installation directory.

Note that this workaround also won’t let your System Stability Index to drop :P

Encrypting DC++ 0.701

Following the release of DC++ 0.700, comes 0.701.

Some release notes, where it’s noted that some errors from 0.700 has been corrected. Also, DC++ will now automatically generate the certifications for you, and all ADC transfers are encrypted by default.

0.700 from the users’ point-of-view

Want your System Stability Index to fall? Then start using DC++ 0.700 :)

First.. What System Stability Index (SSI) is?

Windows Vista includes a great tool called Reliability and Performance Monitor. This collects data and creates reports about your system. Also, it has a so-called System Stability Index which is a number between 1 and 10 to show your system stability. This index is based on software and hardware failures occurs during the run of the operating system.

How DC++ comes to SSI?

When DC++ 0.700 released, I thought I was going to test it then write some blog posts on some sites about it, but lately I discovered Reliability and Performance Monitor and I thought this was going to tell everything about the stability of release.

Just check this graph:

Reliability and Performance Monitor

The highlighted date (10. 11. 2007.) is the day I tested DC++ 0.700 for 20 minutes.

Hm?

I know most bugs are discovered when a lot of users testing the software, but it has so many that it’s even unusable for using it as a secondary, testing client and they could be discovered by trying it out by a very small group of users (rather developers/testers).

I also know that this post may irritate some other people, but I think when releasing a software, we must ensure a minimal usability, since something which is called a “release” is intended for the users, not for testers.

0.700

Ok, so 0.700 took a while longer than I had planned but well, here we are. It’s more of a preview of what’s to come, right now it’s pretty unstable (it’ll crash pretty often), I don’t trust the new queue code (so it might corrupt your downloads) and it’s compiled with a technology preview compiler (so it might actually be someone else’s fault that it crashes =)

Segmented downloads and multi-source

In the beginning there were only one part.

In the beginning there were only one source.

Then, after a while, clients started to include features called “segmented downloading” and “multi-source”. The former is required for the latter. So, what are these things?

A segmented download is exactly what it sounds like. When a client without segmented downloading request a file, it requests the file in its entirety. This scheme mean that a file can only be downloaded from one person at any given time. If the user goes offline or breaks the connection, the client will (given additional searching and queuing capabilities) try and continue the download from another user. With segmented downloading powers, the client will not consider a file as one thing; instead it will break the file up in parts (“segments”) and download them, and when they are all downloaded, the multiple parts are put together and you have your file. In the beginning when this feature made its way on DC, which I believe was pioneered by Valknut (then known as DCGUI), the clients would requests parts in an arbitrary position. This technique is quite unsafe, as you can’t verify that you have gotten everything; with TTHs, the parts are downloaded per TTH leaf (“sub TTH”) and can be computed, when they’re downloaded, to be accurate. (Today’s clients with segmented downloads use the TTH-approach, I believe, and the old way is discarded by virtually all clients.)

While the “multi-source” definition may be that a file can be queued from multiple people (the original NMDC client didn’t allow for this), it isn’t in this context. In this context, a multi-source download is a file that is being downloaded, in parts, from multiple users at the same time. The multi-source client can choose the segment randomly and assemble the file parts when the file is complete, or when a larger ‘section’ is complete.

You may have seen a segment capable client when a user has downloaded “the same file” over and over from you. It isn’t that their client like that file very much, it’s just that it’s requesting the file in segments.

Note that there’s not a set amount of leaves for all files, so it’s not “oh, I’ve downloaded three parts, and it’s only two left”. Instead, the amount of leaves are proportional against the size of the file; The larger the files, the more leaves.

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

Scripts For ADCH++

Please post links to the scripts you have made for ADCH++ here.

If you need hosting for them, I can quite happily do that for you. :)

ADC’s client-client handshake

I previously wrote about NMDC’s client-client handshake sequence, and today I thought I’d talk about ADC’s handshake sequence.

As with the previous post, there’s going to be a client and a server that speaks, where the ‘client’ is the one that want to download and ‘server’ that one that’s going to upload.

For starters, the required commands are “SUP”, “INF”, “GET” and “SND”. The INF is going to contain the users CID, but I’ll use the same CID for both for simplicitly sake. [The both CIDs will still be the same size…]

(Note that the ‘\n’ is one character.)

Server
CSUP ADBASE\n

Client
CSUP ADBASE\nCINF IDWTFUTQBI4NT6MKTRT2EHSMGZM5H2BVM5IZD65FA\n

Server
CINF IDWTFUTQBI4NT6MKTRT2EHSMGZM5H2BVM5IZD65FA TO123456789\n

Client
CGET file TTH/PPUROLR2WSYTGPLCM3KV4V6LJC36SCTFQJFDJKA 0 -1\n

Server
CSND file TTH/PPUROLR2WSYTGPLCM3KV4V6LJC36SCTFQJFDJKA 0 12345\n

At which point the server starts streaming the file to the client. (The client will of course stop listening for the file when 12345 bytes have been received, and disconnect or send another GET. )

The server has sent 133 characters, or bytes. The client has sent 120 characters, or bytes.

This is pretty much what a normal client to client handshake sequence looks like. Note that the token (after the TO) is completely arbitrary. Also, the INF may contain more information; This is just what is required. I don’t see a point at the moment to send more stuff, but oh well…

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

NMDC’s client-client handshake

As a continuation on the ADC vs NMDC posts, this post will discuss the client and client handshake under NMDC, and how DC++ has changed some parts of it.

First off, the following is taken from the old wiki, where the clients are using “RevConnect 0.668” (which I assume means that it’s based off of DC++’s 0.668 client part). Secondly, DC++ have deprecated the $Get and $Send commands in favor of $ADCGET and $ADCSND, which are ports from ADC.

There are two clients in this conversation. To simplify things, I’ll be referencing the clients as “client” and “server”, as ADC is using that, and I feel that that is more intuitive. I’ll be breaking things up in parts. The first part I’ll be listing what commands are needed to perform a proper C-C connection. The second part is “general” and apply to both ($Get/$Send and $ADCGET/$ADCSND), and I won’t repeat myself. The thid part will be a showdown with $Get and $Send versus $ADCGET and $ADCSND.

Okay. Let us give it a go. The commands that are required are;
“$Mynick user_nick”, “$Lock with_some_massive_block Pk=some_more_stuff”, “$Supports a_bunch_of_things”, “$Key some_nonsensical_thing”, “$Get filename_and_path$1”, “$Direction Download[/Upload] random_number”, “$Send” and “$FileLength the_file_length”. $ADCGET/SND comes in three flavors; (1) “$ADCGET file filelist 0 -1”, (2) “$ADCGET file TTH/root_tth_of_file 0 -1” and (3) “$ADCGET tthl TTH/root_tth_of_file 0 -1”, where the first gets the file list, the seocnd a file and the third the hash tree. Respectively; (1) “$ADCSND file TTH/root_tth_of_file 0 file_length”, (2) “$ADCSND file filelist 0 file_length” and (3) “$ADCSND tthl TTH/root_tth_of_file 0 amount_of_leaves”. (Note that the bunch of numbers you’re seeing are starting positions and stuff like that. Also, the “filelist” is shortened, because I didn’t feel like writing more here.) [Disclaimer; the $Key in the example will look like gibberish; I have no idea if it is. It’s what the wiki page says.]

Okay, now we know what we’re dealing with. Let us go through what we need to say to each other. The client is the one that want to download and the server is the one that’s going to upload.
Server
$MyNick server|$Lock EXTENDEDPROTOCOLABCABCABCABCABCABC Pk=DCPLUSPLUS0.668ABCABC|

Client
$MyNick client|$Lock EXTENDEDPROTOCOLABCABCABCABCABCABC Pk=DCPLUSPLUS0.668ABCABC|$Supports MiniSlots XmlBZList ADCGet TTHL TTHF GetZBlock ZLIG |$Direction Download 17762|$Key ……..A …..0.0. 0. 0. 0. 0. 0.|

Server
$Supports MiniSlots XmlBZList ADCGet TTHL TTHF GetZBlock ZLIG |$Direction Upload 6494|$Key ……..A …..0.0. 0. 0. 0. 0. 0.|

At which point both parties know that the client is the one that’s allowed to download since its $Direction random number is higher. At this point, the server has sent 208 characters, or bytes. The client has sent 210 characters, or bytes.

Moving on to the $Get and $Send part;
Client
$Get folder\filename$1|

Server
$FileLength 12345|

Client
$Send|

At which point the server starts streaming the file to the client. (The client will of course stop listening for the file when 12345 bytes have been received, and disconnect or send another $Get.)

The server has now sent 226 characters, or bytes. The client has now sent 239 characters, or bytes.

And now $ADCGET and $ADCSND;
Client
$ADCGET file TTH/PPUROLR2WSYTGPLCM3KV4V6LJC36SCTFQJFDJKA 0 -1|

Server
$ADCSND file TTH/PPUROLR2WSYTGPLCM3KV4V6LJC36SCTFQJFDJKA 0 12345|

At which point the server starts streaming the file to the client. (The client will of course stop listening for the file when 12345 bytes have been received, and disconnect or send another $ADCGET. )

The server has now send 273 characters, or bytes. The client has now sent 272 characters, or bytes.

Worth noting is that $ADCGET/SND will always have that 43 byte long TTH thing (except for file lists). On the other side, you might end up with a long path to the file you want, and $Get will get irritating. Also, $Get does not handle TTH leaves, so you’ll never be able to verify the data you’re downloading.

Don’t forget that you can make topic suggestions for blog posts in our “Blog Topic Suggestion Box!”

View as text file

One of the seldom used features of DC++, that’s still quite useful, is the ability to view any text file’s content, directly in DC++. You can enable it by selecting “View as text file”.

What this does is that the file is opened, DC++ creates a window for the file, and outputs the first 65536 characters. When I checked the changelog for references, the only entry for this feature was that the limit was “32k”. However, the number above is what’s in the current DC++ source code, with the Smartwin change. So, the number may be “32k” on older version of DC++; I haven’t checked.

Do note that this feature mean that DC++ is trying to open a text file, and display the content. If you select eg an audio file, you’ll get undefined results, and you’re on your own.

Design a site like this with WordPress.com
Get started