Copyright © 2003, 2004, 2005 Andrew Greig
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 XML markup.
This manual began life when I was a new Valknut 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 Valknut 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 Valknut. It is currently being updated for the 0.3.4 release. The XML source code of this document is under CVS, which can be browsed at http://cvs.berlios.de/cgi-bin/viewcvs.cgi/dcgui/valknut/valknut/docs/en/dcgui_manual.xml
Valknut 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. Valknut also interoperates with all common DC hub software.
Valknut is 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. Valknut compiles and runs on Linux, FreeBSD, MacOSX and Windows.
Originally, Valknut 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 Valknut. 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.
Mailing list: https://lists.berlios.de/mailman/listinfo/dcgui-common
The following people have helped make this manual possible, by providing information, text or corrections:
Mathias Küster wrote the program, and is the source of most facts about it.
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.
The Valknut download page is at http://dcgui.berlios.de/download.php. This is the best place to look for pre-packaged versions of Valknut for various operating systems.
Debian packages are included in the official 'sarge' release, and can be installed by running apt-get install dcgui-qt.
Gentoo users can do emerge valknut.
Contributed binary packages are announced on the distribution forum http://dcgui.berlios.de/forum/viewforum.php?f=5
Released versions are available at http://developer.berlios.de/project/filelist.php?group_id=370 or http://download.berlios.de/dcgui/.
There are two parts you need, dclib and valknut. The 'dc' tarballs contain both.
Important: You must compile and install dclib first, otherwise Valknut will fail to compile.
If you really want to be on the bleeding edge you can get the latest CVS version with the following steps:
cvs -d:pserver:firstname.lastname@example.org:/cvsroot/dcgui login (just press enter when prompted for a password.) cvs -z3 -d:pserver:email@example.com:/cvsroot/dcgui co valknut cvs -z3 -d:pserver:firstname.lastname@example.org:/cvsroot/dcgui co dclib
Feel free to skip this chapter if you have a precompiled version of Valknut. However, if you are interested in helping with development or tracking down bugs, read on.
libbz2 - not strictly required, but without it you won't be able to create or view BZip2-compressed sharelists.
libssl - OpenSSL libraries if you wish to use SSL for transfers.
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.
make -f Makefile.dist ./configure --enable-debug=full make make install (you will probably want to run this command as root)
make -f Makefile.dist ./configure --enable-debug=full --with-qt-dir=/usr/lib/qt3 --with-libdc=/usr/local (modify the --with-qt-dir parameter if your Qt (TM) libraries are in a different place) 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/localIf you don't have directories such as these you probably haven't installed the development libraries and headers.
Once Valknut has been successfully compiled and installed you can then run the program by typing /usr/local/bin/valknut
There are two ways of using Valknut 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.
For instructions on compiling the native version, see http://dcgui.berlios.de/forum/viewtopic.php?t=2091
The instructions below for OS 10.3 Panther on X11 are derived from forum posts by drealynn42 and others.
Install XCode Tools from the CD that came with Panther. Make sure you choose to customize the install, and select the X11 SDK for installation as well.
Install Fink and FinkCommander. The official website is http://fink.sourceforge.net/. Follow the installation instructions at http://fink.sourceforge.net/download/index.php?phpLang=en.
Run FinkCommander. Update the binary and cvs descriptions, then find each of the packages listed below and install them.
Download the Valknut source code. The quickest way is by getting http://dcgui.berlios.de/files/dcgui/snapshot/dc-source-snapshot.tar.gz (1.3MB). Expand the file to somewhere convenient, for example your user directory.
Open X11 to compile dclib and Valknut in an x-terminal.
cd to the dclib folder within the source folder. For example, if you put the dc-source-snapshot folder in your user directory, enter cd dc-source-snapshot/dclib. If the folder is within another folder, you will have to enter cd that-folder/dc-source-snapshot/dclib. Then enter the following commands when prompted:
make -f Makefile.dist ./configure --prefix=/tmp/dcguibuild --disable-shared make make install
cd to the Valknut folder within the source folder. For example, enter cd dc-source-snaphot/dcgui. Then enter the following:
make -f Makefile.dist ./configure --with-libdc=/tmp/dcguibuild --enable-static-link -- or if you get an error about qt3 -- ./configure --with-libdc=/tmp/dcguibuild --enable-static-link --with-extra-libs=/sw/lib/ --with-extra-includes=/sw/include/ --with-qt-includes=/sw/include/qt --disable-shared 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!the X11 SDK was not installed correctly. Use your Panther CD to install this package then try again.
Test the program compiled successfully by typing cd Valknut; ./Valknut. You may get some warnings, which you can ignore. The main thing is if the program starts up.
For convenience you might want to make an alias for Valknut on your deskop. Look for the Valknut file in the Valknut folder within the Valknut folder. Keep in mind that this program will only run in X11.
If you have previously used the native 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.
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. Add --disable-xmltest to the ./configure command (both for dclib and Valknut) to bypass the check for libxml.
If Valknut 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=full to the ./configure line for dclib.
Add --enable-debug=full --enable-link-static to the ./configure line for Valknut.
Don't run "make install" in the Valknut directory, instead run the program from the compilation directory, e.g.
cd Valknut; ./Valknut
You need to supply the following information:
Qt (TM) version
If it is a self compiled source or rpm (rpm distribution)
Usually you can start Valknut without any command-line options and it will work fine. These options are mainly for testing and debugging use.
Startup splash screen is not shown.
Theme support is turned off. Could be useful if buggy themes are making Valknut crash.
Displays how many themes/styles are available and exits.
Lets you specify the path where Valknut should find its configuration files. Useful if you want to have multiple configurations, e.g. for testing.
This option is only useful with debug versions of Valknut. It will cause Valknut to write a core file if it crashes, which can be used as part of a bug report.
Enables verbose output, which shows all paths added on sharelist creation.
Enables extra verbose output, which shows all files and paths added on sharelist creation.
If set, the HTTP proxy server to use for downloading public hub lists. Needs to be in the form http://<server>[:port]
If you are using Linux, a quick way to run Valknut with a proxy is to type the following into a terminal:
export http_proxy=http://192.168.0.1:8080 Valknut
A common problem asked about on the Valknut 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 ... Valknut: relocation error: Valknut: undefined symbol: _ZN19QSharedDoubleBufferC1EbbP7QPixmap
The second line gives a hint as to what is wrong - the version of Qt (TM) that you have 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 Valknut .rpm or .deb, you 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 Valknut 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 Valknut 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.
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=0x0it could be a bug, or it could be your configuration files are corrupt. Try renaming your ~/.dc folder temporarily, then run Valknut again. If it works fine then it was a problem with the configuration files. However if it continues to crash, check the Valknut 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.
Valknut can be a bit bewildering the first time you use it, so here is a quick-start guide to get you on your way.
The very first time you run Valknut 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.
Ok, Valknut 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.
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 Valknut 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.
The name you will be identified by in DC hubs.
This is the name Valknut 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 Valknut may search a hub you are already connected to, using a different nick here will avoid a name conflict.
Your email address, if you want others to know what it is. Can be blank.
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 email@example.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.
Allows you to specify an image file as a photo of yourself.
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.
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 Valknut you are running.
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.
This string will be put in front of your description and tag when you are in away mode.
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.
If you are in away mode and someone tries to send you a Private Message, Valknut will automatically reply with this text. You could put a friendly message telling people that you are away and when you will be back.
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.
If you set this to a directory instead of leaving it blank, Valknut 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.
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 two compressed formats, HE3 and Bzip2. All clients support HE3, but many modern clients are able to use Bzip2 to produce a smaller file.
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.
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.
A hash is a way of uniquely identifying a file. By default Valknut 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.
Valknut 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.
The transfer queue is Valknut'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 Valknut 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 Valknut 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.
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 Valknut. 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.
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.
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.
This setting helps Valknut 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 Valknut 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.
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.
After Valknut 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 Valknut will be constantly trying to reconnect, 'hammering' the remote users. This is unfriendly and wastes computer and network resources.
If Valknut 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.
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 help you obey the rules by automatically terminating transfers when a hub is left.
If you often leave Valknut running unattended, this setting will help you get your downloads finished. Under certain conditions, Valknut 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:
20 minutes have 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
any files found must be of equal size
only new sources, i.e. with a different nick, will be added
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.
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.
If the computer running Valknut 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.
This specifies the port number Valknut 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.
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.
If you have multiple IP addresses on one interface, you may need to specify which IP you want Valknut to use here. Otherwise leave this blank.
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.
If a hub disconnects you, Valknut will try to automatically reconnect. This can be useful if a hub briefly goes down (e.g. its owner reboots their computer) as Valknut 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 Valknut will only reconnect when told to manually. Don't set it too high, else if you are banned from a hub (it happens) Valknut will waste lots of time trying to reconnect over and over.
How long Valknut 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.
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 Valknut will try to connect to the hub again.
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.
If English isn't your preferred language, you can have the text in Valknut translated. Use this option to choose the appropriate language file to use. You will need to restart Valknut for this to take effect.
You can change the appearance of the buttons, dialogs and windows in Valknut all at once by choosing a different theme. Click the test button to see what a theme looks like.
Numeric values are used heavily in Valknut, 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.
Lets you choose the font style and size that will be used.
Where Valknut should find other files it needs, such as emoticon images and language translation files.
Status messages are short lines of information Valknut prints in chat windows, such as <Valknut> Connected when you connect to a hub, and in response to chat commands. Disabling this option will stop these messages from appearing.
When activated, Valknut 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.
When enbaled, this option will make Valknut prompt you for confirmation whenever you delete a file from your queue.
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.
Valknut 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.
What percentage of the file has been downloaded.
Displays the position, in bytes, of the start of the chunk, the current position in the chunk, and the end of the chunk.
Shows the number of bytes downloaded against the size of the whole file.
How fast this individual transfer is progressing.
How long before this individual transfer will be completed at the current rate.
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.
Similarly, this shows the amount of time remaining to download the whole file at the combined multi-download rate.
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.
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.
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.
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.
If you try and send a message to someone who has gone offline, and this option is enabled, Valknut will refuse to send the message and print a warning.
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.
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.
When you click on a URL that is displayed in a chat window, Valknut 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
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.
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.
Will automatically put you into away mode if you are idle for more than the set number of seconds.
Lets you select which information is shown in the user list. Does not affect already connected hub windows.
You can choose to have sounds played when various events happen in Valknut. Sounds are disabled by default.
Valknut can write a log of its activity, such as files successfully downloaded. To enable logging, select this option and specify a file that Valknut should log information to. Useful for debugging.
If enabled, each message in private chat will have the time it was sent displayed beside it.
If enabled, each message in the main hub chat will have a timestamp displayed beside it.
Various options to configure when and how Valknut logs chat conversations.
Whether Valknut should keep a local copy of the hub list.
If this is set to a value greater that zero, then Valknut 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.
These URLs are where Valknut 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.
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.
If the same message appears this many times, Valknut will automatically hide any more copies of it. This greatly reduces the impact of flooders.
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.
This is the reason that will be given if a person is kicked by Valknut for flooding the chat.
These options are to do with SSL transfers [FIXME]
You can open the hub list window by clicking the toolbar icon, or by choosing Ctrl+U) 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 .
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 Valknut 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 the Section called Hub Lists in Chapter 6 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.
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.
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:
Click the Add Filter button
Enter a name for the filter in the Filter field.
Enter the word 'anime' in the Contains field.
Tick the box next to Description. You should now have a window that looks something like this:
Click the Save button.
From the Filter drop-down list. choose your new filter 'anime'
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.
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 . 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.
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
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 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.
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.
You can change any Bookmark name, server, or description by right-clicking the Bookmark and selecting "Edit".
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.
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".
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".
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 Valknut, 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.
In the Bookmarks window, right click on the hub you want to set a profile for and select "Edit".
In the hub settings window, tick the "Profile" box then click the "Profile" button.
If you are going to use a nickname different from your default one on this hub, enter it in the space labelled "Nick"
If this profile is going to be used for a hub where a password is required, enter the password. Otherwise leave it blank.
Fill in the other options as required if your default settings aren't sufficient for this hub.
If you want the hub to open automatically when you start Valknut, mark the "Auto Connect" box.
You can specify that Valknut should use SSL when connecting to this hub by selecting the "Secure Socket Layer" option.
Click "OK" when finished.
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.
Shows transfers that are in progress.
Lists the users you are waiting to get files from.
Lists the files you are waiting to download.
Shows what download slots you have granted to other users.
Shows detailed information on the connection and transfer process.
This is one of the most powerful parts of Valknut 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.
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.
Valknut 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 Valknut 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.
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.
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.
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.
Selecting which hubs will give you the best search results the fastest.
sorting and grouping
browsing files of those that matched search
searching for clones
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 Valknut has to handle.
Also called Friends, if you mark a user as a friend they will appear here, along with an icon indicating if they are online.
Choice of download mode: Ask, Single or Multi
Multi-download is where Valknut 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. Valknut 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 Valknut 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.
Toggles display of the toolbar on and off.
This option toggles the display of the status bar on and off. The status bar appears at the very bottom the main Valknut window. It lists summary information about your slots and transfers. From left to right the information listed is:
Slots: <number used>/<number total> <used admin slots>/<used user slots>/<used special slots>. See Max Upload Slots for more info.
Bytes you have received with Valknut since its first run.
Bytes you have sent with Valknut since its first run.
Toggles dock mode on and off.
A Valknut 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 Valknut's internal state, without them having to modify the Valknut source. Currently the only plugin is one which allows you to control Valknut over http.
Plugins aren't included in the core Valknut/dclib distribution, you have to get them seperately. You can find the source for released plugins on the developers page at http://developer.berlios.de/project/showfiles.php?group_id=370 or check out the module from cvs:
cvs -d:pserver:firstname.lastname@example.org:/cvsroot/dcgui login cvs -z3 -d:pserver:email@example.com:/cvsroot/dcgui co plugin
Compilation is similar to the rest of Valknut:
make -f Makefile.dist ./configure make make install (as root)
The http plugin allows you to control Valknut 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 Valknut, 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 http://localhost:1480/ 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
This is a common problem in the P2P community, and is not unique to Valknut. 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 Valknut 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 Valknut, either by your operating system or an external program. In some ways this is better solution, as it is transparent to Valknut, 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 http://www.lartc.org/ for full details, including the 'Wondershaper' script. An alternate script with a similar aim is at http://www.digriz.org.uk/jdg-qos-script/
OpenBSD users have the powerful pf utility. See http://www.benzedrine.cx/ackpri.html for a guide to ACK prioritisation.
MacOS X users might find this article about throttled lets them do almost the same thing. http://wincent.org/article/articleview/161/1/25/
Windows users may want to try the shareware program Netlimiter, from http://www.netlimiter.com/
Unless you have an unusual situation, there is no need to change the port Valknut 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 Valknut on ports less than 1024, as this requires that you run the program as root, which is *never* a good idea.
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 Valknut. If the firewall is on the machine running Valknut 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 Valknut 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 Valknut behind a NAT
Machine running Valknut 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 Valknut 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 ACCEPTIf you have other machines on your LAN wanting to connect to the NATed machine running Valknut, 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
Valknut 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.
[FIXME - I don't feel qualified to answer this]
These commands can be typed into any chat window. Valknut intercepts the command and acts on it, the command itself is not sent to the hub.
prints a list of the chat commands that are recognised by Valknut.
clears all text from the chat window. Works in public and private chat.
shows the mode you are currently in (active or passive)
rebuilds your share list. It is good to do this every time you change your share.
Toggles on or off the display of timestamps next to chat messages.
Sends an advertisement for Valknut to the hub. Don't use too heavily :)
Disconnects from this hub and connect you to the hub address specified instead.
Sends the private message to the person specified
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.
Disconnect from the hub. If you wish you can provide a signoff message.
Shows you how long Valknut has been running.
Downloads the share list of the user specified.
Grant the user a slot, which is valid for a single download.
Grant the user a permanent slot, which is valid indefinitely.
Add the user to your friends list.
Creates a bookmark for the hub.
Shows information about a user. Only works in private chat.
Displays the current local time in the chat. Useful for letting others know what time it is where you are.
Send raw message.
The first time it runs Valknut 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 Valknut 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.
This is your share list, compressed using HE3.
This is your share list, compressed using Bzip2. It is usually smaller than the HE3 version. You can look at it by using utilities such as bzless or bzcat.
The hubs you have bookmarked are stored here.
Configuration settings to do with the graphical interface and how it is displayed. Set from the GUI and Sound tabs under Options.
The list of all the public hubs Valknut knows of.
The hub-list filters you have set up.
All the basic, non-gui related options. Set from the Options menu of the program.
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.
Your transfer queue, including file information (e.g. sizes, hashes, chunks), download sources and hubs.
These three files make up a binary database of your fileshare. This is used internally by Valknut as it is faster and more memory efficient than text files.
These files are a binary database of keywords from your shared files. Valknut uses this to quickly respond to file searches with minimum overhead.
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]
Table D-1. 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)|
|Satellite||[FIXME - include comment regarding latency]|
|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|