June 8th, 2006

You’ve probably seen a lot of references to ADC in the changelog for DC++, in the forum (people saying “no, this won’t come in NMDC, but in ADC” etc), the bugzilla, here and on the public DC developers hub.

What is ADC exactly then? It’s basically a way of defining how two clients (or client and server [hub]) communicate over the Internet. ADC is a protocol, just like HTTP (which you’ve probably noticed when you’re viewing web sites), FTP, IRC or NMDC. Think of this communication, the protocol, as two people in real life talking to each other. They both need to understand each other, otherwise they are just making noise with their mouths. Think of protocols as natural languages; English, French, Italian or Swedish.

ADC is not complete, but the current draft is what (basically) is going to be the final version.

What does this mean then? Well, it means different things, depending on who you are and what you want do.

For the common man, this is what ADC will bring (though, not necessarily will be in DC++);

  • Secure overall communication. This means the use of SSL (secure socket layer).
  • Secure password. This means it is impossible(1) for other people to find out what your password is when you’re logging into a hub. (Not depending on above.)
  • When searching, you can use regular expressions to accurately find what you are looking for
  • You can change nick when you are still connected to the hub (provided the hub allow you to).
  • Due to the identification scheme in ADC, different shares in hubs is possible.
  • Using partial file listing.
  • All text (between you and other users) are in UTF-8. This means that Chinese people can write characters and everyone sees them properly. Basically, any type of letter/symbol in any language will be viewable.
  • A native support for hashes (every client has to serve hashes).
  • If the hub chooses to, it can avoid sending main chat messages if you don’t want them.
  • Native support for “/me” (”* ullner is now away”). (That is, speaking in third person.)
  • Responses to searches can now be directed properly.

Wow. That’s a lot, ain’t it? And this is only what I can think of now. Think about when the protocol is finished!

So, what does ADC mean for developers?

  • A clear structure over what and when to send things. (There is no “spec” on how or when to send things in NMDC, only an semi-accurate order.)
  • We don’t need to have commands that are badly spelled ($LogedIn etc).
  • $ and | etc isn’t forbidden in commands.
  • Hub developers don’t need to depend on client developers to implement something for clients to safely log in.
  • One can change state and add features while connected.
  • Information about the client is now incremental, meaning you only send those parts that are changed.
  • Clients now don’t have to “guess” if two users in two hubs are the same.

So, I hope you have a better picture of what ADC is and what it can potentially bring.
(1) Unless the Tiger algorithm is broken, which is not likely in the next years.

Filtering Redux

June 4th, 2006

In a past entry, Fredrik explained what caused the “Filtered” count in the Search Window. What is more interesting to me is the why. Why do all the search windows have to get all of the search results? It has to do with the design of the NMDC protocol by Jon Hess. The $Search sends out the essential information: search terms, size limitations, and search type. The $SR (search result) likewise sends the essential information: result type, directory name, file name, size. What is missing is a way to link a given $SR to the $Search that spawned it.

So, what happens when a user does two searches? The original NMDC client would not let the user do this. It didn’t have the ability to support more than one source for a given queued download, so there were no background searches for alternates. It also did not let the user open more than one window. DC++ does both, so it can have multiple searches happening simultaneously. To make sure each place gets its search results, it broadcasts them to all open search windows as well as the download queue. The windows then display the results that match their search criteria. This is the reason that ADC’s search mechanism has a token associated with it. Each search will have a different token, and each window will pick the results matching that token, with no guessing involved.

The limitations on the NMDC search also extend to other DC clients. Clients wishing to return hits based on the contents of the files will be filtered by DC++, since its search windows expect matches in the file or directory names.

0.691 and Welcome

June 3rd, 2006

DC++ 0.691 is out, so please download and use it. It features a couple of feature contributions from Trem, author of fulDC, as well as some bug fixes. Only through your use and your reporting of bugs and crashes can DC++ be given enough testing to qualify as stable and replace 0.674.

Also, welcome to our blog. The content is graciously provided by Ullner. He will continue contribute to it, but will be joined by (perhaps) BSOD2600, TheParanoidOne, and myself.

New ADC draft

June 3rd, 2006

The latest ADC is as of now out, version 0.11. Take a look here (.html) or here (.odt).

PAS has been changed so you might want to take a look at that. I see otherwise no apparant change, but I’m sure there are.

Port forwarding on OpenBSD

May 29th, 2006

I’ve never used OpenBSD, but I’ve heard that the BSD-flavours are great for routing (using a physical box).

Since the support subforum is purged after two weeks, I thought a nice “guide” to do port forwarding on a OpenBSD box was in place.

Disclaimer: I have no tried this but considering ‘Slycer’ did it (and assuming he/she didn’t leave anything out), I have no reason to doubt.

(The code is a copy-paste from Slycer’s configure file.)

# cat /etc/pf.conf
# $OpenBSD: pf.conf,v 1.31 2006/01/30 12:20:31 camield Exp $
# See pf.conf(5) and /usr/share/pf for syntax and examples.
# Remember to set net.inet.ip.forwarding=1 and/or net.inet6.ip6.forwarding=1
# in /etc/sysctl.conf if packets are to be forwarded between interfaces.

# — MACRO section
# — Change ext_ip to your external IP ( eg)
ext_if = rl0
int_if = rl1
ext_ip = “″

# — Write here the internal IP the box you want to forward the port to
Dc = “″

# — Write here which ports you wish to forward
DcUDP = “1111″
DcTCP = “2222″

# — OPTIONS section
set skip on lo0
set skip on $int_if

nat pass on $ext_if inet from any -> $ext_if

rdr pass on $ext_if proto { tcp, udp } from any to any port { $DcTCP, $DcUDP } -> { $Dc }

# — FILTER section

# — default policy
block log all

pass out quick on $ext_if inet all keep state

You should then input your external IP in DC++ and then input the DcUDP/DcTCP ports in DC++.

Money and DC++

May 24th, 2006

While going through the forum, looking for interesting things to blog about, I noticed a thread by Ali;

If you had to pay for DC++, how much would you be willing to pay? A slightly
different angle: How much do you think it is *worth*?

The thread was started 2003-06-23, and I probably wouldn’t have paid for it back then. But now… If I were forced, I probably would.

A question that arose from the thread was; Who should get the money? A lot of people have been a part of the DC++ project; patching, supporting and general assistance. Is it “fair” that Sieka recieves money for things that a lot of other people have helped put together? Is it “fair” because he did the initial framework and everyone else “just got on the wagon”? I’m not sure if I would feel comfortable if I were to recieve money all of a sudden. Don’t get me wrong, I like money, but getting money for something that I enjoy doing… Wouldn’t that make me a whore? I know Pederzani has said he wouldn’t accept money “to do features” and I don’t think I would either.

What do you think? Is DC++ worth any money by today’s standards? If so - Who do you think should get them?

Ports in ADC and NMDC C-C

May 23rd, 2006

If you’ve checked your netstat lately, you will notice a port that is opened that you haven’t explicitly specified. But if you look closely, it is the port you’ve specified under Connection settings+1. (That is, you’ve entered 9999 in Settings, port 9999 and 10000 will be opened and ready for listening.)

I don’t want you to get alarmed here now, because this has nothing to do with “sending information about you and your computer” (aka spyware).

The port you have specified in Settings is the port that will be used in NMDC client-to-client connections. The “port+1″ port, will be used in ADC client-to-client connections.

Why can’t they use the same port? Well, the answer came from the master; The idea of using the same port in both protocols is of course great, the problem is the implementation of said idea. The implementation is basically just so difficult that there is little to gain.

I was poking around in the source code and I think I found the lines where “port+1″ is executed; Line 69 in ConnectionManager.cpp: lastPort++; firstPort = lastPort; Set here firstPort to something else than lastPort.

0.69 is out!

May 22nd, 2006

0.69 is out! I urge people to upgrade. The version contain three security fixes, two of which I know have been exploited in the wild.

Installer, .zip and source.

Notice; * Removed support for generating NMDC-style file lists (old clients won’t be able to download from you)
This means that people that are using 0.306 and earlier versions will not be able to download from you and you will not be able to download from them. Convince them to upgrade their version if you come across someone using those versions.

The ‘Added option for masked password prompt’ that I added, will not actually mask the password when you send over the network. Atleast not in NMDC hubs. That is, it’s perfectly visible if someone else is using eg Ethereal. On ADC is this not possible because of the nature of ADC. In ADC, data is sent from the hub to the user, the user then uses the Tiger algorithm to encode the CID (of the user), followed by the password and then the data. And until the Tiger algorithm is broken, it is not possible to reverse engineer the password.

File lists getting keyboarded!

May 21st, 2006

Version 0.688 of DC++ included a nifty feature; back/forward mouse/keyboard navigation to directory listing frame.

I assume everyone got it with the mouse (it’s quite obvious which buttons are for what if you have a mouse with more than two buttons). But did a lot of people actually get it with the keyboard? I sure didn’t. I’m suprised as to not having seen this question on the forum… But oh, well…

The first thing I tried was backspace. Well, that does something but it sure ain’t back or forward. The backspace will make you go up one directory. Until you hit the root directory of course. Then, it’ll do nothing.

After having tried every possibly other way with backspace, I decided to look in the code. Well, before I go on, I feel I need to say the other two keyboard commands that aren’t linked to back/forward navigation. Tab, will make DC++ go from one of the views to the other. And return will download the selected directory(-ies) or file(s).

Now, how to back and forward navigate? Hold down Alt and press the ‘Left’ key to go back. Hold down Alt and press the ‘Right’ key to go forward.

Moving toward ADC

May 14th, 2006

The public development hub has now changed address. It is now adc:// This means that you need to run a client that support ADC.

The following clients support (atleast partly) ADC;
DC++ -
Elise -

It will not be a NMDC hub ever again. It is time we move forward.