# &appname; Manual

Andrew
Greig
Hanspeter
Niederstrasser
Edward
Sheldrake
$Id: manual.xml,v 1.17 2005/02/13 19:15:43 mayhem Exp $
2003, 2004, 2005
Andrew Greig
2007
Andrew Greig, Hanspeter Niederstrasser
2008
Andrew Greig, Hanspeter Niederstrasser, Edward Sheldrake

You can redistribute and/or modify this document under the terms of the GNU General Public Licence as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

For the purpose of applying the GPL to this document, I consider "source code" to refer to the Docbook XML markup.

## Introduction

### About this manual

This manual began life when I was a new &appname; user, trying to fathom the multitudes of options the program had. As my experience and understanding grew, it dawned on me that I should attempt to write down what I had learned, so others could avoid having such a steep learning experience. I hoped it would also stop people repeatedly asking the same basic questions on the discussion board :)

As I'm still not an expert on &appname; this document is nowhere near complete, and is very much a work-in-progress. Your comments, suggestions and corrections are welcomed, please write to me at agreig at flashmail dot com.

It is intended that this manual will be kept up-to-date with the latest releases of &appname;. It is currently being updated for the 0.3.10 release. The XML source code of this document is under svn, which can be browsed at .

### About &appname;

&appname; is a program the uses the Direct Connect protocol. It is compatible with other DC clients, such as the original DC from Neomodus, DC++ and derivatives. &appname; also interoperates with all common DC hub software.

&appname; was written by Mathias Küster mathen at users dot berlios dot de and is licensed under the GNU GPL. It is written in C++ and uses the cross-platform Qt (TM) library for its GUI. &appname; compiles and runs on Linux, FreeBSD, Mac OS X and Windows.

Originally, &appname; was called DCGUI, which unfortunately was very similar to the name of another Linux DC client. It was then renamed to dcgui-qt to avoid confusion. However, trademark problems relating to the use of 'Qt' in the name forced another name change, to the rather unique &appname;. Most occurences of the old names have been replaced, but in some places, such as where it would cause too much disruption, the name hasn't been changed.

Official development of &appname; by Mathias Küster stopped after the release of version 0.3.7. At this time, there were several patches floating around in the forums. Edward Sheldrake organized them and put together the unofficial release for &appname; 0.3.8 under the project name wxdcgui. As of this writing, work is ongoing to release version 0.3.11 in the summer of 2007.

The original &appname; web site at ceased to resolve on April 1, 2007.

### Finding out more

- Homepage:

- Board/Forum:

### Contributors

The following people have helped make this manual possible, by providing information, text or corrections:

- Mathias Küster wrote the program up to and including version 0.3.7, and is the source of most facts about it.

- Edward Sheldrake took over the project from version 0.3.8 onward.

- Firechild wrote the original Bookmarks and Profiles sections.

- Jason Starr provided several corrections and explanations of program options.

- Stefan Huszics corrected my mis-capitalisation of kB, and provided bandwidth figures for some types of internet links.

- Hanspeter Niederstrasser rewrote the documentation for building on Mac OS X and updated the manual for releases after 0.3.7.

## Getting &appname;

### Precompiled Packages

Currently, for &appname; 0.3.8 and higher, only the Mac OS X version is available as a precompiled binary package. It can be downloaded from . If you know of other binary releases for current &appname; please post about it at the SourceForge forum: .

The official (Berlios hosted) &appname; 0.3.7 download page is now defunct. This was the best place to look for pre-packaged versions of &appname; for various operating systems.

Debian packages for 0.3.7 are included in the official 'sarge' stable release, and can be installed by running `apt-get install valknut`.

Gentoo users can do `emerge &binaryname;`.

Contributed binary packages were announced on the now defunct distribution forum.

### Source Code

Released versions of &appname; from 0.3.8 and higher are available at .

There are two parts you need, dclib and &binaryname;.

You must compile and install dclib first, otherwise &appname; will fail to compile.

If you really want to be on the bleeding edge you can get the latest SVN version with the following commands:

    svn co https://wxdcgui.svn.sourceforge.net/svnroot/wxdcgui/trunk/dclib dclib-svn
    svn co https://wxdcgui.svn.sourceforge.net/svnroot/wxdcgui/trunk/valknut valknut-qt3-svn
    svn co https://wxdcgui.svn.sourceforge.net/svnroot/wxdcgui/branches/valknut-qt4 valknut-qt4-svn

These commands checkout the latest versions of dclib, QT3 valknut and QT4 valknut.

## Compiling the source code

Feel free to skip this chapter if you have a precompiled version of &appname;. However, if you are interested in helping with development or tracking down bugs, read on.

### Compiling on Linux

#### Development libraries needed

- Qt - version 3.3 for the QT3 version or 4.3 or later for the QT4 version

- pthread

- libxml2

- bzip2

- zlib

- openssl - Optional for using valknut specific encrypted transfers and chat.

Debian users may want to do `apt-get install libqt3-mt-dev libxml2-dev libbz2-dev libssl-dev`.

Mandrake users would want to install libxml2-devel, libqt3 and libqt3-devel.

Fedora users may use `yum install libxml2-devel bzip2-devel zlib-devel openssl-devel` and either for QT3 `yum install qt3-devel` or for QT4 `yum install qt-devel`.

#### Compiling dclib

    autoreconf --verbose --install                    Only for code obtained via svn, not needed for released versions
    ./configure --enable-debug
    make
    make install                                      (you will probably want to run this command as root)

#### Compiling &appname;

    autoreconf --verbose --install                    For the QT4 version obtained via svn, not needed for released versions
    make -f admin/Makefile.common                     For the QT3 version obtained via svn, not needed for released versions
    ./configure --enable-debug PKG_CONFIG_PATH=/usr/local/lib/pkgconfig                         PKG_CONFIG_PATH must contain the folder where dclib.pc is installed
    make
    make install                                      (you will probably want to run this command as root)

If you get the following error:

    checking for Qt... configure: error: Qt (>= Qt 3.0) (headers and libraries) not found. Please check your installation!

you need to check you have the necessary Qt (TM) libraries installed. If you are certain you do, this command may work instead:

    ./configure --with-qt-includes=/usr/include/qt3 --with-libdc=/usr/local

If you don't have directories such as these you probably haven't installed the development libraries and headers.

Once &appname; has been successfully compiled and installed you can then run the program by typing `/usr/local/bin/&binaryname;`

### Compiling on Mac OS X

There are two ways of running &appname; on OS X: as a native application; or as an X11 application. The native version fits in more neatly with the standard Mac interface, wheras the X11 version requires you to run X as well. The X11 version may feel a bit strange to those with a Mac background, but will feel familiar to those with a UNIX background.

The instructions below are for Mac OS X 10.3 Panther and above and are derived from forum posts by drealynn42, Nyzeta, nieder, and others.

Users migrating from Linux will note that the build uses dynamic linking. Because Mac OS X binaries also link to system libraries, it is unwieldly to deal with static and dynamic libraries at the same time. Furthermore, the native &appname;.app bundles eliminate the need for static linking. For these reasons, these instructions use only dynamic linking when building &appname;.

#### Prerequisites

First, you have to decide whether you wish to use the X11 or the native Aqua version of &appname;. If building the X11 version, you have to install Apple's X11 and X11-SDK from the system install discs (X11User.pkg is on the System DVD, X11SDK.pkg is on the XCode DVD). Alternatively, you can also install an X11 system using Fink (see below).

Do not install both Apple's X11 and Fink's x11/xorg at the same time as this will cause serious issues. Read this FAQ entry for ways to troubleshoot your X11 installation if you accidentally installed both.

1. Install XCode Tools from the CD that came with the OS. If you don't have the disc, you can download XCode from Apple (free registration required). Make sure you choose to customize the install, and select all the SDK packages (EXCEPT X11-SDK IF YOU'RE NOT USING APPLE'S X11).

2. Install Fink and FinkCommander (FinkCommander is optional but provides a graphical interface to Fink). The official Fink website is . Follow the installation instructions at .

3. Run FinkCommander. Update the binary and rsync (preferred) or cvs descriptions, then find each of the packages listed below and install them.

   - bzip2

   - bzip2-dev

   - libpng3

   - libxml2

   - system-openssl

   - qt3 if building the X11 version

   - qt3-dev if building the X11 version

   - xorg if building the X11 &appname; version and not using Apple's X11 release

   - qt3mac if building the native Aqua &appname; version

   - qt3mac-dev if building the native Aqua &appname; version

4. Download the dclib and &appname; source code. Expand the files to somewhere convenient, for example your user directory.

5. Open /Applications/Utilities/Terminal.app to compile dclib and &appname;.

#### Setting up your system

To compile &appname; you need to set up your environment correctly so that the compiler can find all your files. Enter the following lines at the Terminal.app prompt:

    export PKG_CONFIG_PATH=/tmp/dcguibuild/lib/pkgconfig:$PKG_CONFIG_PATH
    export CFLAGS="-I/sw/lib/system-openssl/include -I/sw/include $CFLAGS "
    export LDFLAGS="-L/sw/lib/system-openssl/lib -L/sw/lib $LDFLAGS"

#### Compile dclib

`cd` to the dclib source folder. For example, if you put the `dclib-&currentversion;.tar.bz2` folder in your user directory, enter `cd `dclib-&currentversion;``. If the folder is within another folder, you will have to enter `cd that-folder/dclib-&currentversion;`. Then enter the following commands when prompted:

    ./configure --prefix=/tmp/dcguibuild
    make
    make install

This will finish installing dclib into a temporary directory. If you plan on using the X11 version of &appname;, it might be better to replace the value after --prefix to `/usr/local` or some other more permanent location.

#### Compile &appname;

##### Compile &appname; for X11

`cd` to the &appname; folder within the source folder. For example, enter `cd &binaryname;-&currentversion;`. Then enter the following commands:

    ./configure --with-ssl-dir=/sw/lib/system-openssl
    -- or if you get an error about qt3 --
    ./configure --with-ssl-dir=/sw/lib/system-openssl --with-extra-libs=/sw/lib --with-extra-includes=/sw/include --with-qt-dir=/sw --with-qt-includes=/sw/include/qt
    make
    make install

If you get

    checking for X... configure: error: Can't find X includes. Please check your installation and add the correct paths!

and you are using Apple's X11, the X11 SDK was probably not installed correctly. Use your XCode Install CD to install this package then try again.

The &appname; program is now installed in /usr/local/bin. Test tha the program compiled successfully by typing `/usr/local/bin/&binaryname;`. You may get some warnings, which you can ignore. The main thing is if the program starts up.

Keep in mind that this program will only run inside X11, so X11 must be running first. If you are using Fink's X11 (xorg or xfree86), you can also install the `applex11tools` package to make your X11 installation look nicer.

If you have previously used the native &appname; 0.2.19 version, you will find this version feels quite different since it is run in X11, but it basically operates the same. All of your files and settings will carry over, so don't worry about losing anything.

##### Compile the native Aqua &appname;

`cd` to the &appname; folder within the source folder. For example, enter `cd &binaryname;-&currentversion;`. Then enter the following:

    ./configure --with-ssl-dir=/sw/lib/system-openssl --enable-osx --enable-mac
    -- or if you get an error about qt3 --
    ./configure --with-ssl-dir=/sw/lib/system-openssl --enable-osx --enable-mac --with-extra-libs=/sw/lib --with-extra-includes=/sw/include/ --with-qt-dir=/sw/lib/qt3mac --with-qt-includes=/sw/lib/qt3mac/include
    make
    make install-osx-standalone-app

You will now have a directory called `&appname;.app` in the location where you are building. To copy it to your Desktop, enter the following command `cp -Rp &appname;.app ~/Desktop`. Once the &appname; application is copied there, you can move it to wherever you want on your computer (such as /Users/(YOURNAME)/Applications) or /Applications.

To run the native &appname;, simply double click the &appname; icon.

#### Troubleshooting

Upon ./configure, if you get:

    checking for xml2-config... /usr/bin/xml2-config
    checking for libxml - version >= 2.0.0... *** libxml header files (version 2.5.4) do not match
    *** xml2-config (version 2.6.7)
    no
    configure: error: libxml2 must be installed.

then there is a problem with the installed xml libraries. Make sure that `libxml2` and `libxml2-shlibs` are both installed with FinkCommander. Alternatively, add --disable-xmltest to the ./configure commands above (both for dclib and &appname;) to bypass the check for libxml.

##### Building a static application on Mac OS X

While not necessary, it is possible to build &appname; as a (partial) static application on Mac OS X. During the compilation of dclib, add the following parameters to the ./configure step: `--enable-static --disable-shared`. When compiling &appname;, add the following code to the ./configure step: `--enable-link-static`. This will create a &binaryname; executable with dclib built in. However, all the other required libraries will still be dynamically linked to the executable and will still need to be present when running &appname;.

#### Using a package manager to install &appname;

&appname; is also available as a package within the Fink distribution. As of this writing there are no precompiled binaries for &appname; 0.3.8 and higher, but if you wish to install from source, Fink takes care of downloading, building and installing all the necessary dependencies with a single command. To install the X11 version of &appname; install the package `&binaryname;-x11`. To install the native Aqua version, install the package `&binaryname;-aqua`.

Once everything is finished, the X11 version can be run from Terminal.app (or an xterm) with the command `/sw/bin/&binaryname;` (Notice that it is located in /sw and not /usr/local to avoid conflicts with anything you installed on your own). The native Aqua version installs an alias in `/Applications/Fink` that can be run by double-clicking it from within Finder.

### Compiling on OpenBSD

The following commands have been used to successfully build &appname; on OpenBSD 3.6.

#### Compiling dclib

    LDFLAGS="-L/usr/local/lib" CFLAGS="-I/usr/local/include" ./configure
    gmake
    gmake install

#### Compiling &appname;

    export PATH=$PATH:/usr/local/lib/qt3/bin-mt
    LDFLAGS="-L/usr/local/lib" CFLAGS="-I/usr/local/include" PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig" ./configure --with-qt-libraries=/usr/local/lib/qt3 --with-qt-includes=/usr/local/include/X11/qt3
    gmake
    gmake install

### Making a Debug build

If &appname; crashes unexpectedly, then you can help the developers work out why by running a debug build. The differences from a normal build are:

- Add `--enable-debug` to the ./configure line for dclib.

- Add `--enable-debug --enable-link-static` to the ./configure line for &appname;.

- Don't run "make install" in the &binaryname; directory, instead run the program from the compilation directory, e.g.

      cd &binaryname;; ./&binaryname;

If it crashes you can send the developers the backtrace output.

### Submitting a bug report

You need to supply the following information:

- Distribution

- Qt (TM) version

- &appname;/dclib version

- If it is a self compiled source or rpm (rpm distribution)

- Bug description

## Running &appname;

### Command-line options

Usually you can start &appname; without any command-line options and it will work fine. These options are mainly for testing and debugging use.

`--help`

  Show the list of command line options and brief help on what they do.

`--disable-splash`

  Startup splash screen is not shown.

`--disable-theme`

  Turns off theme support. Could be useful if buggy themes are making &appname; crash.

`--enable-tray`

  Turns on the tray icon, ignoring the saved setting from the options dialog.

`--disable-tray`

  Turns off the tray icon, ignoring the saved setting from the options dialog. Useful if your window manager doesn't support tray icons.

`--check-theme`

  Causes the program to display how many themes/styles are available then exit.

`--disable-backtrace`

  This option is only useful with debug versions of &appname;. It will cause &appname; to write a core file if it crashes, which can be used as part of a bug report.

`-c `<configpath>``

  Lets you specify the path where &appname; should find its configuration files. Useful if you want to have multiple configurations, e.g. for testing.

`-v`

  Enables verbose output, which shows all paths added on sharelist creation.

`-vv`

  Enables extra verbose output, which shows all files and paths added on sharelist creation.

`--trayicon`

  Starts the application in tray icon mode, meaning the main window will not be visible.

`--socketlog `<param>``

  Outputs a log of socket data to the file `dcsocket.log`. Valid values for `param` are `none`, `send`, `recv` or `both`.

### Environment Variables

http_proxy

  If set, the HTTP proxy server to use for downloading public hub lists. Needs to be in the form `http://<server>[:port]`

  A quick way to run &appname; with a proxy would be to type something like the following into a terminal:

      export http_proxy=http://192.168.0.1:8080
      &binaryname;

### Help! It won't run!

#### Mismatched Qt (TM) version

A common problem asked about on the &appname; board is an error on startup that looks like this:

    Checking Qt (TM) version ...
    Compiled for '3.0.5' using '3.1.2'
    Checking Qt (TM) privates ...
    &appname;: relocation error: &appname;: undefined symbol: _ZN19QSharedDoubleBufferC1EbbP7QPixmap

The second line gives a hint as to what is wrong: the version of Qt (TM) that &appname; was compiled for doesn't match the version that you have on your system. There are a few ways of correcting this:

- If you have installed a precompiled &appname; .rpm or .deb, you may need a different package. Try to find one that was compiled for the version of Qt (TM) you have.

- Alternatively you could install a different version of the Qt (TM) runtime libraries to match what &appname; is expecting.

- If you can't find a precompiled version that works on your system, try getting a source package (.src.rpm or deb-src) and compiling that.

- If you have compiled &appname; from source, make sure your development Qt (TM) libraries are the same version as your runtime libraries. It is possible to have multiple versions installed at once, so make sure the right one in being used.

#### Segmentation fault

If you get something like this:

    Checking Qt (TM) version ...
    Compiled for '3.0.5' using '3.0.5'
    Checking Qt (TM) privates ...
    private test ok !
    PARITY : 64 64
    Signal (11) received, stackdump follows; eax='00000000', ebx='00000000', ecx='00000000', edx='00000000', eip='00000000'
    --- retaddr=0x0, ebp=0x0

it could be a bug, or it could be your configuration files are corrupt. Try renaming your ~/.dc folder temporarily, then run &appname; again. If it works fine then it was a problem with the configuration files. However if it continues to crash, check the &appname; board for others having similar problems with that version. You may want to compile a debug build. This will provide more information on the crash, which can help the developers find the cause.

## Getting started

&appname; can be a bit bewildering the first time you use it, so here is a quick-start guide to get you on your way.

### Set necessary options

The very first time you run &appname; you will be presented with an options screen before the main program loads. You need to set a few things before continuing.

On the Identify tab, fill in the following fields:

- Nick: A nickname to identify yourself.

- Search Nick: A different nickname.

- Speed: Your internet connection speed.

On the Transfer tab:

- Download Folder: Where you want downloaded files to go.

- Share Folders: You need to make some of your files available for others. Click the "Add" button (the one that looks like a sheet of paper with a green plus symbol) and choose a folder to share.

- Click the blue icon with the swirly arrow to update your list of shared files, then click the "Save" button.

### Get a list of hubs and connect to one

Ok, &appname; is now open fully, but it isn't doing much yet.

- Click the "Action" menu, and choose "Hub List".

- Click the swirly arrow icon to get a list of hubs. This may take a minute, so be patient.

- The Hub List window should now be full of strangely-named hubs. Choose one that looks interesting, and has lots of users, and double-click its name.

- A new window will open up. Within a short time you should start seeing messages about connecting. If nothing happens, or you get disconnected, close the window and try again with another hub.

### Find and download files

If you've made it this far, you're nearly there. Its time to grab some files.

- Click the "Action" menu, and choose "Hub Search".

- In the space below the word "Search", type in a word or two, then click "Start".

- Click the "Results" tab, and see what turns up. It may take a minute or two before all the results are in.

- Double-click the name of one of the found files to tell &appname; you want to download it.

- You might get some messages about multi-download. Its ok to say Yes to these.

- Click the "Action" menu, and choose "Transfer List". This will show you the progress (if any) of your download.

## Options

### Identify

Nick

  The name you will be identified by in DC hubs.

Search Nick

  This is the name &appname; will use when it is searching multiple hubs, such as all Public hubs or Bookmarked hubs. The names of users in a hub must be unique, and since &appname; may search a hub you are already connected to, using a different nick here will avoid a name conflict.

Email

  Your email address, if you want others to know what it is. Can be blank.

Anti-spam

  If you have provided your email address in the option above, this setting modifies the way it is displayed. Instead of your address taking the form `yourname@yourisp.com`, it will appear as `yourname at yourisp dot com`. This is intended to make it difficult for spammers to 'harvest' your address with automated tools. Usually doesn't hurt to leave this enabled.

Photo

  Allows you to specify an image file as a photo of yourself.

Description

  Space for you to put a free-form comment. This is often used to tell others information about your share (e.g. lots of Anime) or your connection (e.g. 256kbit/s upstream). Make sure you replace the default description with something useful to your fellow users.

Add Description Tag

  When enabled a 'tag' containing system information will be added to your description. It is a good idea to turn this on, as it lets others see some basic info on your configuration, saving them from have to ask you for it. Many hubs require that tags be displayed.

  The tag will be in the format <DCGUI V:`version`,M:`mode`,H:`hubs`,S:`slots`,L:`limit`> where:

  - `version` is the version of &appname; you are running.

  - `mode` is A if you are in active mode, or P if you are in passive mode.

  - `hubs` is the number of hubs you are currently connected to.

  - `slots` is the number of public slots you have set.

  - `limit` is the per-transfer upload rate limit, in kB/s. This will only appear if an upload rate limit has been set.

Away Prefix

  This string will be put in front of your description and tag when you are in away mode.

Speed

  Lets you tell others what sort of internet connection you have, so they can estimate what sort of transfer speed they can get from you. Be honest, its easy to tell if someone is overstating their bandwidth, and is a kickable offense in many hubs.

Away Message

  If you are in away mode and someone tries to send you a Private Message, &appname; will automatically reply with this text. You could put a friendly message telling people that you are away and when you will be back.

### Transfer

#### Folder

Download Folder

  Files that are in the process of being download are placed in this folder. Its a good idea to have a specific directory for this purpose, so you don't clutter up other locations. It is also recommended that you NOT share this directory, as people don't want your incomplete files.

Move Finished Files to this Folder

  If you set this to a directory instead of leaving it blank, &appname; will move completely downloaded files from the Download folder to here. This is useful feature, as it saves you the task of identifying finished files yourself. You could share this directory if you wanted to quickly propogate you downloads to others.

Share Folders

  This is the list of folders that you are sharing to the world. You can share as many folders as you like with the Add button, or unshare a folder by selecting it and pressing Remove. By default shared folders are listed using their actual name. If you want to make things neater you can change the alias of a folder, by selecting the folder and clicking the edit button.

  Once you have set up your shares, make sure you press the Rebuild button. This generates a list of all your shared files for others to browse. Clicking on the Browse button will show you what this file list looks like. The Info button tells you the size of your share, and how big the file list is. The file list is stored in three compressed formats, text compressed with HE3, text compressed with Bzip2 and in XML format compressed with Bzip2. All modern clients use the XML format list and only old versions will use the text formats.

  To be a good DC citizen, keep your share tidy and organised as much as you can. Arrange files into subfolders so they are easier for others to find. Give files meaningful names so they are easy to identify. For example, if you have an English-subtitled first episode of the Anime "Now and Then, Here and There", a good filename would be: `Anime/Now and Then, Here and There (eng subbed)/Now and Then, Here and There - 01.avi`. A bad filename would be: `Stuff/nowandthen1.avi`

  The more you share the better DC is for everyone, so share as much as you can. However, make sure what you are sharing are things people will actually want. Don't share system files or incomplete downloads. Don't share your home directory or any directory containing personal information. Certain hubs have their own specific rules about what are 'useless' files, so make sure you read the rules and follow them. Many hubs have automated scripts that will kick you if they find files that are against their rules.

Check and recreate sharelist on startup

  It is good practice to rebuild your sharelist every time you change what files you are sharing. This option will help you out if you keep forgetting to refresh your share. It will do an automatic rebuild on startup if it detects there has been a change. Note that if you have been renaming files the rebuild might not be triggered, so you should do a manual rebuild, either by clicking the button above this option, or typing /refresh in the main chat window. Also note that if you have a big share you may find this causes slow startup times.

Disable hash list

  A hash is a way of uniquely identifying a file. By default &appname; will calculate a hash value for all of your files and include the info in your share list, which will help others identify your files. However this can be a CPU and disk intensive process that could take several hours, so this option allows you to disable this process.

  However if you disable this process then the vast majority of users running recent DC++ versions will not be able to download from you, and you will very likely be kicked from the hub. Valknut will add "NOTTH" to your tag if you disable the hash list.

Recreate every hour

  &appname; can automatically recreate your sharelist at a set interval. Select the number of hours to elapse between each refresh, or 0 to disable this feature.

#### Settings

Save queue in minutes

  The transfer queue is &appname;'s record of what files you are trying to download, and from where. This is constantly being updated while the program runs, but usually it is only written to disk when you exit the program. If you often run &appname; for long periods and are concerned about losing the state of your downloads, set this to a number greater than 0. This will indicate how often &appname; should save its transfer list to disk. Note you can also manually save the queue by choosing "Save Queue" after right-clicking in the Wait list.

Max Upload Slots

  Upload slots, often referred to as just 'slots', are how you control the number of people connected to you at one time. The more slots you have, the more people can download files from you (you are 'uploading' the files to them). However, each connected person gets a corresponding fraction of your bandwidth, so the more slots you have open, the slower each individual's download will proceed. It is therefore important to balance the number of slots with the speed of your internet link.

  This option sets the number of 'public' slots, that are available for anyone to use to download from you. In addition, you can grant individual users that are in addition to the public slots. So, for example, you could have four public slots, and grant three of your friends a slot, meaning up to seven people could download from you at once.

  There are also several other 'special' slots that are controlled by &appname;. There are:

  - Slots for admins to download your share list. Hub admins are the people who run the hubs your connect to. Most admins want to be able to check your share list to make sure you are following the rules of their hub. They can't download your other files this way, they can only get your share list. There are always three (3) of these slots.

  - Slots for others to get your share list. This lets others find what you are sharing even if all your normal slots are full. This is a helpful feature for other users, unfortunately not all DC clients currently provide this. There are three (3) of these slots.

  - Slots for files less that 16kb in size. Very small files don't take long to download, so slots are made available to make them easy to get. There are three (3) of these slots.

  For the sake of those downloading from you, try to set the number of slots so that transfers run at a decent rate. Keep in mind that if you grant lots of slots things will slow down for everyone.
Dynamic Upload Rate

  The max upload rate setting (below) puts a cap on how fast each upload can go. However, not all users may be able to upload from you at that rate, meaning some of your bandwidth is not being used. This feature lets those who are fast downloaders use the 'spare' left over from slow downloaders, while still keeping the overall upload rate within the limits set.

  An example: if you had 5 slots, limited to 10 kB/s each, and dynamic upload enabled. If no-one else was downloading from you, a single user could transfer at 50 kB/s. Without dynamic upload, they would be limited to 10 kB/s, leaving the other 40 kB/s unused.

Max upload rate

  This sets a limit (in kilobytes per second) on how fast each slot will be allowed to upload from you. You may want to do this to stop fast uploaders from taking more than a fair share of bandwidth, or to restrict your upstream rate generally. What you set this to will be shown in your description tag, and enabling it is frowned upon in many hubs.

Max download rate

  This setting helps &appname; make efficient use of your download bandwidth, but it is not a hard limit. It works quite differently from the upload rate setting above.

  A value entered here will prevent &appname; from starting more downloads if your overall download rate is already at or above this speed. This will tend to keep fewer, faster downloads running, instead of dozens of downloads crawling along.

Max uploads to user

  If this value is increased from its default of 1, users are permitted to download more than one file from you at a time. This also means they will be taking up extra slots. The default is recommended.

Resend Timeout

  After &appname; fails to connect to someone (e.g. if all their slots were full) it will wait this many seconds before it tries to connect again. Best not set this too low, or &appname; will be constantly trying to reconnect, 'hammering' the remote users. This is unfriendly and wastes computer and network resources.

Response Timeout

  If &appname; is trying to connect to a remote user, but doesn't get a response for this many seconds, it will give up and close the connection. This value needs to be high enough to allow slow or busy clients time to respond to you.

User quitting hub

  It is good manners, and often a hub rule, that you stay in a hub while you are downloading from others in the hub. These settings are typically used to disconnent people who start a download from you and then quit the hub.

Auto-search for new sources

  If you often leave &appname; running unattended, this setting will help you get your downloads finished. Under certain conditions, &appname; will automatically search for new download locations for files in your queue. If it finds any, they will be added to the transfer list. However, to prevent this putting excessive load on hubs, the following criteria must be met before an auto-search will happen:

  - the configured time has passed since the last auto-search

  - no downloads are currently running

  - you have a file with priority 0

  - a hash exists for that file

  - it is a multi download

  - only new sources, i.e. with a different nick, will be added

### Connection

#### Mode

##### Active or Passive Mode

Active mode should be used when other DC clients can connect directly to you from the internet. If you are not directly contactable, e.g. because of firewalls or NATs, you will need to use Passive mode instead. If you're not sure, start off in active mode, and if you can't seem to get any search results or file lists, switch to passive.

Active mode is preferable because it lets you search and download from every user in a hub. Passive mode limits you to only Active users, and multi-hub search isn't possible. If you have control over your firewall, see the firewall section for information on how you can set up active mode.

##### Active Mode Settings

IP or Hostname

  If you are behind a NAT and have forwarded the appropriate ports, enable this setting and enter the public IP address of your router in the space provided. The test button will confirm the program receives packets sent to that IP. The 'Get Internet IP' button will work out your public IP address automatically.

  If you have a dynamically assigned public IP, you may want to register a hostname with a dynamic DNS provider, then put this hostname here instead. This way you won't have to update this setting each time your ISP gives you a different public IP.

Network Interface

  If the computer running &appname; has a publicly accessible IP address, you'll want this option. Select the network interface that has the public IP by clicking on the 'Get Interface' button and choosing from the list. As an example, if you connect to the internet via a modem, and you also have a local ethernet network, then the interface you want would likely be ppp0.

Use IP address from the hub

  The box should usually be checked so that you will use the IP address that the hub detects you have and sends to you. Most hubs will not allow you to use any other IP address as a security measure.

TCP Listen Port

  This specifies the port number &appname; will listen on for TCP connections (e.g. for file transfers etc.). It defaults to 9176, and you can usually leave it at that. You need to make sure that incoming connections to this port can get through your firewall.

UDP Listen Port

  Search results will be sent directly to you on this UDP port. It defaults to 9176. Make sure your firewall allows through UDP packets destined to this port.

Listen on IP

  If you have multiple IP addresses on one interface, you may need to specify which IP you want &appname; to use here. Otherwise leave this blank.

##### Passive Mode Settings

Send warn message to remote user on active mode request.

  If you are in passive mode, and a remote user who is also in passive mode tries to download a file from you, the transfer won't work. Usually the attempt will fail silently, and many users don't realise why they can't get files from you. This option, if enabled, will send an automated private message to the remote user, telling them that you are in passive mode.

#### Settings

Reconnect Counter

  If a hub disconnects you, &appname; will try to automatically reconnect. This can be useful if a hub briefly goes down (e.g. its owner reboots their computer) as &appname; will reconnect and continue. This counter sets how many times it will try before it gives up. You can set it to 0 to turn it off, so that &appname; will only reconnect when told to manually. Don't set it too high, else if you are banned from a hub (it happens) &appname; will waste lots of time trying to reconnect over and over.

Reconnect Timeout

  How long &appname; will wait between attempts to reconnect to a hub. Don't set it too low or you will use up all your connection attempts before giving transient problems a chance to get sorted out.

Allow Force Move

  Many hubs will redirect you to another hub in some situations (e.g. if they are full). This is known as a force move. If you disable this option, a redirect will be treated as a failure to connect, so &appname; will try to connect to the hub again.

Ignore private address space connections

  Certain IP address are only intended for use on private networks, but not on the internet. Enabling this option will prevent people with private addresses (e.g. the people on your LAN) from connecting to you.

### GUI

#### General

Language File

  If English isn't your preferred language, you can have the text in &appname; translated. Use this option to choose the appropriate language file to use. You will need to restart &appname; for this to take effect.

Theme

  You can change the appearance of the buttons, dialogs and windows in &appname; all at once by choosing a different theme. Click the test button to see what a theme looks like.

Units

  Numeric values are used heavily in &appname;, for things like file sizes and transfer rates. When this setting is on Auto, these numbers will be shown in whatever unit is most appropriate. If you prefer to have all values in the same unit, choose that instead.

Application Font

  Lets you choose the font style and size that will be used. Uncheck the box to use your system's default font.

Data Folder

  Where &appname; should find other files it needs, such as emoticon images and language translation files.

Show Status Messages

  Status messages are short lines of information &appname; prints in chat windows, such as `<&appname;> Connected` when you connect to a hub, and in response to chat commands. Disabling this option will stop these messages from appearing.

Query on Exit

  When activated, &appname; will ask you to confirm you really want to quit when you try to close the program. Helps to stop you exiting unintentionally and stuffing up all your transfers.

Query on File Delete

  When enbaled, this option will make &appname; prompt you for confirmation whenever you delete a file from your queue.

#### Transfer

The transfer view can show up to eight pieces of information for each file being transferred. You will probably want display only some of this data, so you can see the state of your transfers without getting information overload.

Chunk Percent

  &appname; doesn't try and download a whole file in one piece, instead it downloads 'chunks' of about 1MB at a time. Enabling this option will display a percentage that indicates how much of the current chunk is complete. On fast connections this value tends to change rapidly, as chunks are completed and new ones started.

File Percent

  What percentage of the file has been downloaded.

Chunk Size

  Displays the position, in bytes, of the start of the chunk, the current position in the chunk, and the end of the chunk.

File Size

  Shows the number of bytes downloaded against the size of the whole file.

Download Rate Single

  How fast this individual transfer is progressing.

Remaining Time Single

  How long before this individual transfer will be completed at the current rate.

Download Rate Multi

  If you are using multi-downloads, the above 'single' options won't show realistic figures for the whole file. This option displays the overall download rate of all running sources for a file.

Remaining Time Multi

  Similarly, this shows the amount of time remaining to download the whole file at the combined multi-download rate.

#### Chat

Open Private Chat Window

Use tab for every chat window

Enable emoticons in chat

  When this option is enabled, certain combinations of characters will be replaced by emoticon images. For example :( will be replaced with a small picture of a sad face.

Show send button

  After typing in a message you can send it by pressing enter, or if this option is enabled there will be a button you can click to send the message.

Forward private to public chat

  When enabled, private chat text will also appear in main chat. No-one else can see it, it just saves you having to switch chat windows. It may make conversations hard to follow. Make sure you switch back to the private window before replying.

Show joins and parts

  When this option is on, notification messages will appear in main chat when users enter or leave the hub. Useful on quiet hubs, however can result in a constant flood of messages on large/busy hubs.

Ignore messages to offline users

  If you try and send a message to someone who has gone offline, and this option is enabled, &appname; will refuse to send the message and print a warning.

Ignore messages from offline users

  Sometimes you receive messages from users who aren't in the user list, e.g. hub security scripts or bots. Turning on this option will stop these messages being displayed.

Max paragraphs

Hide popups of more than x lines

Send message with

  The default key to send a chat message is the Enter key. You can start a new line in your chat without sending the message by pressing Ctrl+Enter. If you prefer different behaviour, this option will let you specify what key combination should be used to send a message.

Browser

  When you click on a URL that is displayed in a chat window, &appname; will attempt to open it in a web browser. You can specify the browser to use here. If the program is in your path you can just give its name e.g. `mozilla` or you can browse for the full path e.g. `/usr/bin/mozilla`

Color

  The text in the chat windows can be given different colours, based on the source of the message. You could make your messages stand out from other chat text, or use light coloured text so it is legible against a dark background. You can set the colour of a type of text by double-clicking on its name and choosing from the palette.

#### Client

Show client windows minimized

User-List right alignment

  When selected, the user list will appear on the right hand side of the hub window, with the chat on the left. Otherwise the chat will be on the right, and the userlist on the left. Note that this only takes effect when you connect to a hub, the windows for hubs you are already connected to don't change.

Auto Away Mode

  Will automatically put you into away mode if you are idle for more than the set number of seconds.

Columns

  Lets you select which information is shown in the user list. Does not affect already connected hub windows.

### Sound

You can choose to have sounds played when various events happen in &appname;. Sounds are disabled by default.

### Log

Logfile

  &appname; can write a log of its activity, such as files successfully downloaded. To enable logging, select this option and specify a file that &appname; should log information to. Useful for debugging.

Timestamp Private Chat

  If enabled, each message in private chat will have the time it was sent displayed beside it.

Timestamp Hub Chat

  If enabled, each message in the main hub chat will have a timestamp displayed beside it.

Chat Logging

  Various options to configure when and how &appname; logs chat conversations.

### Hub Lists

Store local

  Whether &appname; should keep a local copy of the hub list.

Reload every hour

  If this is set to a value greater that zero, then &appname; will automatically reload the hub list after that many hours have passed. This way your hublist will always be up-to-date. Only use this option when you really need to, as it will produce extra traffic on the servers providing the hub lists.

Source URLs

  These URLs are where &appname; gets its list of public hubs from. You can add and remove sources of hub lists, or un-tick a list to prevent it being used.

### Security

#### Flood Protection

These options are to protect you from antisocial people who like to fill the chat screen with the same message over and over, otherwise known as flooding.

Don't Display messages after X retry

  If the same message appears this many times, &appname; will automatically hide any more copies of it. This greatly reduces the impact of flooders.

Kick the user for flooding.

  If you are an operator, you have the ability to kick people off the hub. This option will automatically kick users who are flooding the chat.

Kick Message

  This is the reason that will be given if a person is kicked by &appname; for flooding the chat.

#### Transfer Cert/Key

These options are to do with SSL transfers [FIXME]

## Hub List

You can open the hub list window by clicking the toolbar icon, or by choosing Ctrl+U Action Hub List from the menu.

The first toolbar lets you reload or update the list of hubs, and apply filters. The second lets you enter the address of a hub manually. If you know the address of a hub enter it into the box and click the connect button .

### Getting a list of public hubs

Before you can do anything with DC you need to connect to at least one hub. This window will give you a list of public hubs for you to browse through. You can connect to a hub simply by double-clicking its name in the list.

However, when you first run &appname; there are no hubs listed here. You need to click on the Reload Public Hublist button to get the list. The list is obtained from special locations that provide this service, see for information about the source urls. A progress bar will appear at the right of the second toolbar while the reload is happening.

Public hubs are usually run by generous users on their personal computers, which tends to mean they come and go fairly frequently. If you find that hubs in your list no longer exist when you try to connect to them, its probably time to update your list. Clicking the Update Public Hublist button will do that.

### Using Filters

At the of writing there are over 3000 public DC hubs available. To make it easier for you to find hubs that are of interest to you, you can filter the list to only show certain hubs.

#### Creating a filter

If you were a fan of Anime (Japanese animation) you might want to only see hubs that are anime-related. You would do this as follows:

1. Click the Add Filter button

2. Enter a name for the filter in the Filter field.

3. Enter the word 'anime' in the Contains field.

4. Tick the box next to Description. You should now have a window that looks something like this:

5. Click the Save button.

6. From the Filter drop-down list. choose your new filter 'anime'

The hub list will now only show hubs that contain the word 'anime' in their description. The tab at the top of the window shows how many out of all the hubs are being displayed. In this case only 244 of 3247 public hubs matched the filter. You can browse through the list and double-click a hub to connect to it.

#### Editing a filter

Often, the best hubs are those that have the most people connected to them. We can refine our filter to only display hubs that have at least a minimum number of users. Click the edit filter button to display the settings of the filter. Set the value in the Min. User field to a decent number e.g. 200, then click Save. The hublist now displays only hubs with 200 or more users that have the word 'anime' in the description.

You can also modify a filter so it looks for matching words in the hub name or the hub address. If you tick more than one option, then the words can appear in any of the selected fields.

#### Deleting a filter

If you no longer need a particular filter you can delete it. Choose the filter you want to delete from the list of filters so it is the active filter. Then click the Delete Filter button

#### Viewing all public hubs

If you would like to revert back to viewing all the available public hubs, choose the 'Default' filter from the list. Note that you can't edit or delete the Default filter.

### Bookmarks

Bookmarks let you easily keep track of your favourite hubs. The public server list is not always reliable, so bookmarking hubs you find interesting is a good thing to do. To access your Bookmarks, open the Hub List window and click on the Bookmarks tab.

#### Creating a Bookmark

There are several ways to create a Bookmark:

- From the public hub list: Right-click the hub you want, and select "Add Bookmark".

- From a Hub Search: Right-click a search result, and select "Add Bookmark".

- From the bookmarked hubs list: Right-click anywhere on the Bookmarks list, and select "Add". With this method, you'll have to manually enter the hub name, host (server), and description.

- From within the hub: type /fav in the chat window.

#### Editing a Bookmark

You can change any Bookmark name, server, or description by right-clicking the Bookmark and selecting "Edit".

#### Deleting a Bookmark

You can delete a Bookmark by selecting it, right-clicking and selecting "Remove".

You can also delete multiple bookmarks by selecting more than one and removing in the same manner.

#### Connecting to a Bookmarked hub

You can connect to a Bookmark hub in the same manner as connecting to a server in the Public list. Simply double-click it, or right-click and select "Connect".

#### Updating Servers

If you find you cannot connect to a Bookmarked hub for an extended period (hubs are run on people's home computers usually and may have some down times by default), right-click the Bookmark and select "Update Server".

This is useful should the hub have changed their server name/location, as it will update your Bookmark to the new location.

You can also update all Bookmarked servers at once with right-click "Update All Servers".

### Profiles

You can specify certain options, such as your nickname and description, on a per-hub basis by using Profiles. Other possibilities include making certain hubs connect automatically when you start &appname;, and hubs requiring authentication be set up so you login automatically without having to enter your password each time.

Profile are managed in the Bookmarks tab in the Hub List window.

#### Creating a Profile

1. In the Bookmarks window, right click on the hub you want to set a profile for and select "Edit".

2. In the hub settings window, tick the "Profile" box then click the "Profile" button.

3. If you are going to use a nickname different from your default one on this hub, enter it in the space labelled "Nick"

4. If this profile is going to be used for a hub where a password is required, enter the password. Otherwise leave it blank.

5. Fill in the other options as required if your default settings aren't sufficient for this hub.

6. If you want the hub to open automatically when you start &appname;, mark the "Auto Connect" box.

7. You can specify that &appname; should use SSL when connecting to this hub by selecting the "Secure Socket Layer" option.

8. Click "OK" when finished.

#### Managing Hub Profiles

To check what profiles are set, right-click anywhere on the list of Bookmarks, and select "Profile editor". Select the hub from the drop-down list at the top, and the profile settings for that hub will be displayed for editing. Select "OK" when finished, and most settings will take effect immediately. You can also edit profile settings by following the instructions in "Creating a Profile" above.

## Transfer List

### Transfer

Shows transfers that are in progress.

### Wait

Lists the users you are waiting to get files from.

### Files

Lists the files you are waiting to download.

### Slots

Shows what download slots you have granted to other users.

### Log

Shows detailed information on the connection and transfer process.

## Hub Search

This is one of the most powerful parts of &appname; and you will spend a lot of time using it. To get the most out of the DC network you need to know how to search effectively.

### Mechanics of searching

When you open the Hub Search window, type in a query and click 'Search', the following happens:

- Your search query is sent to the hubs you are connected to.

- Each hub passes the query onto each client connected to it.

- If a client has files that match the query, they send a response:

  - If you are in active mode, the client sends the response directly to you.

  - If you are in passive mode, the client sends the response to the hub, which then passes it onto you.

- &appname; sorts out the responses and displays them.

If you are in passive mode you won't see search results from others in passive mode, as you won't be able to get their files anyway. You will find a lot more files if you are active!

By default &appname; stops waiting for responses after two minutes. This is usually heaps of time for all the results to trickle in. You can stop it sooner by clicking on the 'Stop' button.

Most clients have a maximum number of responses they will give to one query, commonly about 10. If you search for common words this prevents hundreds or thousands of matches coming back from each client.

Each search puts a load on the hubs and every client connected to it. Searches happen regardless of slots. The 'Spy' function shows the amount of searches you are seeing - its a lot! Searching can be abused, often called search-spam. Some hubs kick clients doing lots of rapid searches.

### Searching wisely

The words you search for have a huge impact on what results you will get. Similar files often have very different names, so your search string have to be generic enough to catch relevant files, while not including too many irrelevant ones.

#### Choosing search strings

- Try not to use too many common words. Searching for 'anime mp3' on an anime hub will give you ridiculous numbers of files of all sorts. You usually want to be more specific.

- Be careful about file extension that have differnt forms, e.g. mpg vs mpeg. If you put 'mpg' in your search string you may miss files with the alternate extension.

- Don't put leading zeroes e.g. searching for episode 01 wont find files called episode 1.

#### Limiting file sizes

Often there are multiple versions of popular media files, for example an episode of show that has been encoded into an avi of different quality. If you prefer only high-quality avis, you could set the search filter of files at least 200MB, for example.

#### Where to search

Selecting which hubs will give you the best search results the fastest.

Searching the public hubs will result in &appname; automatically entering and leaving each hub on your hublist, and is not recommended.

#### Finding extra sources

### Managing search results

sorting and grouping

filtering

browsing files of those that matched search

searching for clones

## Hub Windows

This is where you see the hub chat, and the list of users.

## Spy

When you enable the spy function, any search requests you receive will be displayed in this window. This can give you an idea of what other people are searching for. If you are on several large hubs you may be surprised by the sheer volume of search requests &appname; has to handle.

## Users

Also called Friends, if you mark a user as a friend they will appear here, along with an icon indicating if they are online.

## Menu Options

### File menu

#### Options

Opens the configuration window.

#### Quick Options

Choice of download mode: Ask, Single or Multi

Multi-download is where &appname; downloads portions of a single file from multiple people at the same time. This feature can greatly speed up the rate your downloads are completed. All you have to do is enable this option, and find more than one source for files. The 'search for clones' option makes this easy.

Note that files less than one megabyte in size are never downloaded this way. &appname; gets the first megabyte from each source and compares them to make sure the files are the same. If they are, a message 'hash ok' appears in the log window, and &appname; then reconnects and retrieves a chunk of the file that it doesn't have. Right-clicking on a file in the transfer window and selecting 'File Info' will show you which bits of the file have been received.

#### Filelist browser

Allows you to browse the downloaded filelists of others.

#### Filelist browser local

Displays your own shared files and directories.

#### Reload Plugins

Reloads any plugins &appname; is using.

#### Exit

Causes &appname; to close.

### View menu

#### Tabbar

The tab bar sits just below the menu, and lets you switch quickly between open hubs. This option toggles the display of the tab bar on and off.

#### Toolbar

Toggles display of the toolbar on and off. The toolbar provides shortcuts to the most-used parts of the program.

#### Statusbar

This option toggles the display of the status bar on and off. The status bar appears at the very bottom the main &appname; window. It lists summary information about your slots and transfers. From left to right the information listed is:

SL:

  Slots: <number used>/<number total> <used admin slots>/<used user slots>/<used special slots>. See for more info.

UL:

  Upload rate

DL:

  Download rate

RX:

  Bytes you have received with &appname; since its first run.

TX:

  Bytes you have sent with &appname; since its first run.

Available disk space

  How much space is available on the partition where downloaded files are being saved.

L: or S: or H:

  Share list creation status (only displayed during share list updates). L: shows what percentage of the share list is complete, S: shows what percentage of the search index is complete, H: shows what percentage of the hash calculation is complete.

#### Dock

Toggles dock mode on and off. Turning on dock mode shrinks &appname; down into an icon in the system tray or notification area of your window manager. Clicking the icon is another way of shrinking/unshrinking the program.

### Action menu

#### Away Mode

Choice of Normal or Away

## Plugins

### What are plugins?

A &appname; plugin is a small piece of code that adds some extra function to the program. This allows other developers to write programs that can access &appname;'s internal state, without them having to modify the &appname; source. Currently the only plugin is one which allows you to control &appname; over http.

### Getting and compiling plugins

Plugins aren't included in the core &appname;/dclib distribution, you have to get them seperately. You can obtain the source for the http plugin from svn:

    svn co https://wxdcgui.svn.sourceforge.net/svnroot/wxdcgui/trunk/plugin dclib-http-plugin-svn

As of July 2008, the http plugin requires the latest svn version of dclib, which requires you to run the latest svn version of valknut.

Compilation is similar to the rest of &appname;:

    autoreconf --verbose --install
    ./configure
    make
    make install    (as root)

### HTTP plugin

The http plugin allows you to control &appname; via a web browser. This could be really useful if you don't always have physical access to the machine running the client, and a graphical remote control method like VNC is not suitable.

Currently the http plugin allows you to see the current state of &appname;, display and cancel transfers and connect to hubs. There is no way at the moment to search or browse filelists, or add new downloads.

By default, the http plugin listens on port 1480 and only accepts connections from localhost. Connecting to will present you with a login prompt. The default username is "dcgui" and the password is "admin". Once you are logged in you can change the password and security settings. The configuration of the plugin is stored in `~/.dc/plugin/http.xml`

## Networking issues

### Why do my downloads slow to a crawl when I am uploading?

This is a common problem in the P2P community, and is not unique to &appname;. It is due to the behaviour of the TCP protocol on heavily loaded links. When you are downloading a file, your computer continuously sends 'acknowledgements' or ACKs to the source computer, telling it 'I got those last few bits, send some more'. When you are also uploading flat-out, the acknowledgements take longer to send because they have to queue up behind the data you are uploading. The slower the ACKs are sent, the slower your peers will send you data, thus the slower your download rate.

There are two ways of avoiding this problem. The first would be to set an upload rate limit in &appname; to just below your actual maximum upload speed. This will allow a bit of breathing space for those ACK packets to fit into. Unfortunately, most hub operators have an irrational fear of upload limiters, and will kick you from the hub if you use them.

The second method works the same way, by artificially limiting your upload speed, and giving priority to ACK packets. However this time it is done outside of &appname;, either by your operating system or an external program. In some ways this is better solution, as it is transparent to &appname;, and can let you manage your bandwidth across other network applications as well.

The Linux kernel comes with packet filtering and quality-of-service features. You can make it prioritise acknowledgement packets, letting them "jump the queue" so your downloads and uploads both run as fast as they can. See for full details, including the 'Wondershaper' script. An alternate script with a similar aim is at

OpenBSD users have the powerful `pf` utility. See for a guide to ACK prioritisation.

MacOS X users might find this article about `throttled` lets them do almost the same thing.

Windows users may want to try the shareware program Netlimiter, from

### What port(s) does &appname; use?

Unless you have an unusual situation, there is no need to change the port &appname; runs on away from the default 9172. Sure, DC++ and other clients use other ports, so what? It make no functional difference if you are on a different port, the programs tell each other what port they are on and it all works fine. In addition, you really shouldn't try to run &appname; on ports less than 1024, as this requires that you run the program as root, which is *never* a good idea.

### How do I configure my firewall so I can be in Active mode?

There is no one answer to this, as there as so many different types of firewall in use. The basic aim is to get TCP and UDP traffic for port 9172 (by default) to reach the computer running &appname;. If the firewall is on the machine running &appname; then you just need to permit that traffic. If the firewall is a separate device, and is doing NAT, the traffic needs to be forwarded to the &appname; machine.

Here are some suggested firewall rules for those with a Linux iptables-based firewall. There is NO GUARANTEE that these rules will work, or that they won't leave your systems wide open. Make sure you know what you are doing before playing with firewall rules, and test afterwards. Use these suggestions AT YOUR OWN RISK.

The following assumptions are made:

- your default INPUT and FORWARD policy is DENY, your default OUTPUT policy is ACCEPT

- $IPTABLES is the iptables command

- $PUBLICIP is your public IP address

- $PRIVATEIP is the internal IP of your firewall

- $EXTIF is your external network device, e.g. ppp0, eth1

- $INTIF is your the internal network device, e.g. eth0

- $MYPC is the private IP address of the computer running &appname; behind a NAT

Machine running &appname; has a public IP address, e.g. a dialup modem connection.

    $IPTABLES -A INPUT -i $EXTIF -d $PUBLICIP -p tcp --dport 9176 -j ACCEPT
    $IPTABLES -A INPUT -i $EXTIF -d $PUBLICIP -p udp --dport 9176 -j ACCEPT

Machine running &appname; is behind a NATing Linux firewall.

    $IPTABLES -t nat -A PREROUTING -d $PUBLICIP -p tcp --dport 9176 -j DNAT --to $MYPC
    $IPTABLES -t nat -A PREROUTING -d $PUBLICIP -p udp --dport 9176 -j DNAT --to $MYPC
    $IPTABLES -A FORWARD -o $INTIF -d $MYPC -p tcp --dport 9176 -j ACCEPT
    $IPTABLES -A FORWARD -o $INTIF -d $MYPC -p udp --dport 9176 -j ACCEPT

If you have other machines on your LAN wanting to connect to the NATed machine running &appname;, you need some trickery so the replies come back via the firewall. Add this line after the four above:

    $IPTABLES -t nat -A POSTROUTING -d $MYPC -s 192.168.1.0/24 -p tcp --dport 9176 -j SNAT --to $PRIVATEIP

## FAQs

### Why doesn't &appname; do <favourite feature>, like DC++ does?

&appname; isn't a clone, imitation or port of DC++ or other DC clients. It is an independent program that has been written from scratch. Certainly there are similarities between these programs, because they are all trying to do the same job, and good features tend to be implemented in all clients eventually. However that doesn't mean a feature will be added just because some other program does it. Feature requests and suggestions are welcomed, but keep in mind that the developers are trying to make the best DC client they can, not just an imitation of another program.

### &appname; prints a whole lot of stuff to the console while its running. What does it all mean?

[FIXME - I don't feel qualified to answer this]

### SSL Transfer mode

### Where can I find out more about Direct Connect?

Direct Connect is a program originally written by NeoModus . Many other programs have been written that use the same protocol. See for some details of the DC protocol.

## Keyboard Shortcuts

- Ctrl+O Options

- Ctrl+Q Exit

- Ctrl+U Hub List

- Ctrl+T Transfer List

- Ctrl+S Hub Search

- Ctrl+P Spy

- Ctrl+F Users

- Ctrl+N Away Mode Normal

- Ctrl+A Away Mode Away

## Chat commands

These commands can be typed into any chat window. &appname; intercepts the command and acts on it, the command itself is not sent to the hub.

`/dchelp`

  prints a list of the chat commands that are recognised by &appname;.

`/clear`

  clears all text from the chat window. Works in public and private chat.

`/mode`

  shows the mode you are currently in (active or passive)

`/refresh`

  refreshes your share list. It is good to do this every time you change your share.

`/rebuild`

  rebuilds your share list. This removes entries from the hash database for files which are no longer in your share, reducing it's size.

`/ts`

  Toggles on or off the display of timestamps next to chat messages.

`/dcgui or /adv`

  Sends an advertisement for &appname; to the hub. Don't use too heavily :)

`/join <address>`

  Disconnects from this hub and connect you to the hub address specified instead.

`/msg <nick> <message>`

  Sends the private message to the person specified

`/away <message>`

  Lets you specify a message that someone will see if they send you a private message while you are in away-mode. If the message is blank, then the auto-response is disabled.

`/bye <message>`

  Disconnect from the hub. If you wish you can provide a signoff message.

`/uptime`

  Shows you how long &appname; has been running.

`/ls <nick>`

  Downloads the share list of the user specified.

`/grant <nick>`

  Grant the user a slot, which is valid for a single download.

`/grantp <nick>`

  Grant the user a permanent slot, which is valid indefinitely.

`/friend <nick>`

  Add the user to your friends list.

`/fav`

  Creates a bookmark for the hub.

`/info <nick>`

  Shows information about a user.

`/now`

  Displays the current local time in the chat. Useful for letting others know what time it is where you are.

`/raw`

  Send raw message.

`/ignore <nick>`

  All public and private chat messages from the user will not be shown.

`/unignore <nick>`

  Removes the user from the ignore nick, so that messages from them will be visible again.

`/sh command arguments...`

  Executes the given command in your operating system and sends it's output to the hub.

  For example "/sh uptime" will send you system's uptime (/uptime sends the uptime of &appname;).

## Configuration files

The first time it runs &appname; creates a directory called .dc in your home directory. You won't be able to see it with a normal `ls` but it is there. In that directory will appear the files listed below, for those of you who are curious. Most of the files are in XML format, so are quite informative to read. Like all good *nix programs, if you remove the .dc directory &appname; starts afresh like it had never been run.

Not all of these files will always exist, as some are only created when you use certain features. For example, if you haven't created any profiles, you won't have a `dcprof.cfg`. You may see startup messages such as `warning: failed to load external entity "/home/username/.dc/dcprof.cfg"`. These are just notices, it doesn't indicate a problem.

`index.lst`

  This is a list of files in your share with directory structure information.

`dcbookhub.cfg`

  The hubs you have bookmarked are stored here.

`dcgui.cfg`

  Configuration settings to do with the graphical interface and how it is displayed. Set from the GUI and Sound tabs under Options.

`dchub.cfg`

  The list of all the public hubs &appname; knows of.

`dchubfilter.cfg`

  The hub-list filters you have set up.

`dclib.cfg`

  All the basic, non-gui related options. Set from the Options menu of the program.

`dcprof.cfg`

  Your hub profiles, e.g. passwords for registration-required hubs. Yes the passwords are stored in plain text. If you are security conscious you should us unimportant passwords or don't save them in your profile.

`dctra.cfg`

  Your transfer queue, including file information (e.g. sizes, hashes, chunks), download sources and hubs.

`database.bin, filebase.bin, pathbase.bin`

  These three files make up a binary database of your fileshare. This is used internally by &appname; as it is faster and more memory efficient than text files.

`searchbase.bin, searchfileindex.bin, searchindex.bin`

  These files are a binary database of keywords from your shared files. &appname; uses this to quickly respond to file searches with minimum overhead.

`hashbase.bin, hashfilebase.bin, hashpathbase.bin, hashindex.bin, hashleaves.bin`

  These files contain information including the TTH root and leaf data for all files that have ever been shared by &appname;. The data is saved so that if you temporarily unshare a file, you can share it again without hashing it again. All data about no longer shared files may be removed by typing /rebuild into chat.

## Connection speeds and transfer rates

DC is all about sharing files, and the most important thing to many is how fast they can do this. The main factor influencing this is what sort of internet connection you have. In this document (and in the DC community) upload and download rates are often mentioned. However if you are new to this you might not know what rate you have.

The speed of a data link is usually given in kilobits per second, abbreviated as kb/s or kbps. A '56k' modem is called that because its maximum downstream rate is 56 kilobits per second. A 'half meg' DSL connection would have a downstream speed of half a megabit per second, or 500 kilobits per second. It is helpful to others if you know, or can find out, what type and speed of connection you have.

Many internet links are asymmetric, that is they have two different speeds, one for transfers from the internet to you (downstream) and one for transfers from you to the internet (upstream). The upstream rate is usually less than the downstream, because that is the most efficient arrangement for tasks like web surfing or checking email. Unfortunately its the wrong way round for file sharing applications, like DC.

When it comes to transferring files, people are more interested in the speed they will see on their screen while they are downloading. This is usually given in kilobytes per second, or kB/s. Note the capitalisation of the letter B, this is important as it means Bytes insted of bits. To work this out for your link, divide your link speed by eight. Thus a 768kb/s link will let you download at 96kB/s, and a 33.6kb/s analogue modem will have a rate slightly over 4kB/s. Note that when someone asks for your rate, they generally are interested in your upstream rate, which is the one that affects their downloads.

kilo (k) = 1000 (one thousand) times, Mega (M) = 1000000 (one million) times, Giga (G) = 1000000000 (one billion) times. [FIXME - correct me if I'm wrong, but in this context 'kilo'=10^3, not 2^10]

### Examples of common connection types and speeds

Connection type | Downstream speed | Upstream speed
--- | --- | ---
56k modem | 56kbps (7kB/s) | 33kbps (4kB/s)
64k ISDN | 64kbps (8kB/s) | 64kbps (8kB/s)
128k ISDN | 128kbps (16kB/s) | 128kbps (16kB/s)
256/64 ADSL (entry-level in Australia) | 256kbps (32kB/s) | 64kbps (8kB/s)
512/128 ADSL | 512kbps (64kB/s) | 128kbps (16kB/s)
512/256 ADSL (entry-level in UK) | 512kbps (64kB/s) | 256kbps (32kB/s)
768/256 ADSL | 768kbps (96kB/s) | 256kbps (32kB/s)
1024/256 ADSL | 1024kbps (128kB/s) | 256kbps (32kB/s)
Cable |  |
Satellite | [FIXME - include comment regarding latency] |
Chello |  |
2Mbit Leased Line | 2Mbps (250kB/s) | 2Mbps (250kB/s)
T1 | 1.536 Mbps (192kB/s) |
T3 | 28 times T1 speed i.e. 43.008 Mbps (5.376MB/s) |
10Mbit Ethernet | 10Mbps (1.25MB/s) | 10Mbps (1.25MB/s)
100Mbit Ethernet | 100Mbps (12.5MB/s) | 100Mbps (12.5MB/s)
Gigabit Ethernet | 1000Mbps (125MB/s) | 1000Mbps (125MB/s)
OC-1 | 51.840 Mbps (6.48MB/s) |
OC-3/12/48/192 | 3/12/48/192 times OC-1 |

## Glossary

ACK - Acknowledgement

NAT - Network Address Translation

DSL - Digital Subscriber Line

## Required footer

Hosted by sourceforge

Insert sourceforge logo link here from valknut.html.