Rewrite to static site

With a complete reorganisation of the directory structure and most of
the content converted to pandoc-flavoured markdown.

Some TODO's left before this can go live:
- Main page
- Atom feeds
- Bug tracker
This commit is contained in:
Yorhel 2019-03-23 11:52:08 +01:00
parent 5c85a7d32f
commit 6242b2ee9c
291 changed files with 4346 additions and 6141 deletions

140
dat/ncdc
View file

@ -1,140 +0,0 @@
=pod
Ncdc is a modern and lightweight direct connect client with a friendly
ncurses interface.
=head2 Get ncdc!
=over
=item Latest version
1.20 ([dllink ncdc-1.20.tar.gz download]
- L<changes|https://dev.yorhel.nl/ncdc/changes>)
Convenient static binaries for Linux:
L<64-bit|https://dev.yorhel.nl/download/ncdc-linux-x86_64-1.20-6-g5111a.tar.gz> -
L<32-bit|https://dev.yorhel.nl/download/ncdc-linux-i486-1.20-6-g5111a.tar.gz> -
L<ARM|https://dev.yorhel.nl/download/ncdc-linux-arm-1.20-6-g5111a.tar.gz>. Check the
L<installation instructions|https://dev.yorhel.nl/ncdc/install> for more info.
=item Development version
The latest development version is available from git and can be cloned using
C<git clone git://g.blicky.net/ncdc.git>. The repository is available for
L<online browsing|http://g.blicky.net/ncdc.git/>.
=item Requirements
The following libraries are required: ncurses, zlib, bzip2, sqlite3, glib2 and
gnutls.
Ncdc is entirely written in C and available under a liberal MIT license.
=item Community
[html]
L<Bug tracker|https://dev.yorhel.nl/ncdc/bug> - For bugs reports, feature requests and patches.<br />
C<adcs://dc.blicky.net:2780/> - For real-time chat.
É
=item Packages and ports
Are available for the following systems:
L<Arch Linux|https://aur.archlinux.org/packages/ncdc/> -
L<Fedora|https://apps.fedoraproject.org/packages/ncdc/overview/> -
L<FreeBSD|http://www.freshports.org/net-p2p/ncdc/> -
L<Frugalware|http://frugalware.org/packages?srch=ncdc&op=pkg&arch=all&ver=all> -
L<Gentoo|http://packages.gentoo.org/package/net-p2p/ncdc> -
L<GNU Guix|https://www.gnu.org/software/guix/package-list.html> -
L<Homebrew|http://braumeister.org/formula/ncdc> -
L<OpenSUSE|http://packman.links2linux.org/package/ncdc> -
L<Source Mage|http://download.sourcemage.org/grimoire/codex/test/ftp/ncdc/>
I have a few old packages on the L<Open Build
Service|https://build.opensuse.org/package/show/home:yorhel/ncdc>,
but these are unmaintained. The static binaries are preferred.
A convenient installer is available for
L<Android|http://code.ivysaur.me/ncdcinstaller.html>.
=back
=head2 Features
Common features all modern DC clients (should) have:
=over
=item * Connecting to multiple hubs at the same time,
=item * Support for both ADC and NMDC protocols,
=item * Chatting and private messaging,
=item * Browsing the user list of a connected hub,
=item * Share management and file uploading,
=item * Connections and download queue management,
=item * File list browsing,
=item * TTH-checked, multi-source and segmented file downloading,
=item * Searching for files,
=item * Secure hub (adcs:// and nmdcs://) and client connections on both protocols,
=item * Bandwidth throttling,
=item * IPv6 support.
=back
And special features not commonly found in other clients:
=over
=item * Different connection settings for each hub,
=item * Encrypted UDP messages (ADC SUDP),
=item * Subdirectory refreshing,
=item * Nick notification and highlighting in chat windows,
=item * Trust on First Use for TLS-enabled hubs,
=item * A single listen port for both TLS and TCP connections,
=item * Efficient file uploads using sendfile(),
=item * Large file lists are opened in a background thread,
=item * Doesn't trash your OS file cache (with the flush_file_cache option enabled),
=item * (Relatively...) low memory usage.
=back
=head2 What doesn't ncdc do?
Since the above list is getting larger and larger every time, it may be more
interesting to list a few features that are (relatively) common in other DC
clients, but which ncdc doesn't do. Yet.
=over
=item * NAT Traversal,
=item * OP features (e.g. client detection, file list scanning and other useful stuff for OPs),
=item * SOCKS support.
=back
Of course, there are many more features that could be implemented or improved.
These will all be addressed in later versions (hopefully :).

149
dat/ncdc/faq.md Normal file
View file

@ -0,0 +1,149 @@
% Ncdc Q&A
# About ncdc
## What about other text-mode clients?
[microdc2](http://corsair626.no-ip.org/microdc/) - A rather nice client, yet
not exactly there. It's limited to connecting to a single hub, hasn't been
updated since 2006, and the readline interface is slightly awkward to use.
[nanodc](http://sourceforge.net/projects/nanodc/) - Can't comment much on this,
except maybe that rocket science is perhaps easier than getting nanodc to
compile.
LDCC - Uses DCTC as backend and an interface based on TurboVision. All
mentioned projects are dead: neither LDCC, DCTC nor TurboVision are seeing any
recent development.
[ShakesPeer](http://shakespeer.bzero.se/) - Appears to have a commandline
interface as well. I haven't personally tried it, but have not heard many
positive things about it. Has not seen any recent development, either.
## Why did you start from scratch? Why not use the DC++ core?
There are several reasons why I chose not to use code from existing projects,
but the two most important reasons are the following: 1) I am a control freak,
and 2) personal preferences.
**Control freak:** I have no idea how to create an interface to a protocol if I
don't know the overall design and all the tiny details of the actual protocol
I'm working with. And what's a better way to get used to a protocol than by
writing everything yourself? Then there's some other advantages to
reimplementing everything: I get to choose the library dependencies and the
memory/CPU efficiency trade-offs, and I am not limited by an existing
implementation that needs quite a few modifications to achieve what I want.
Most of the "special features not commonly found in other clients" mentioned on
the [homepage](/ncdc) are a direct result of this.
**Personal preferences:** These are simple: I rather dislike C++ and working
with other people's code. Working with other people's C++ code isn't exactly
something I wish to spend my free time on.
## Does ncdc support TLS 1.2?
Yes, but you need a recent version of GnuTLS. Nobody knows what counts as
"recent", exactly, but I'm guessing any 3.0+ version will do.
## Does ncdc support TLS 1.3?
Yes, but you need an even more recent version of GnuTLS.
## What protocol features does ncdc support?
For ADC: BASE, RF, TIGR, BZIP, BLOM, ADCS, KEYP and SUDP.
For NMDC: NoGetINFO, NoHello, UserIP2, MiniSlots, XmlBZList, ADCGet, TTHL and TTHF.
ncdc also supports TLS-enabled connections for both hub connections and
client-to-client connections on both ADC and NMDC protocols. Note that ncdc
does not support some of the older NMDC protocol features, like $Get,
$GetZBlock, $CHUNK, $Cancel or non-XML file lists. I am not aware of an other
up-to-date client that still uses any of these features.
## What are those flags / character indications in the connection list?
Since the manual page doesn't cover those yet, I'll document it here for now:
The header has `St`, where the `S` stands for Status and `t` for whether TLS
encryption is used or not. The status flags can be either **C**onnecting,
**H**andshake, **I**dle, **D**ownloading, **U**ploading or **-** for disconnected.
## ...And what about those in the user list?
The user list has three boolean flags: **O**perator, **P**assive, and whether the client has **T**LS enabled.
# Troubleshooting
## Luadch: "(error-40) Invalid named parameter in inf: I4"
This error occurs when connecting to (some?) luadch hubs. The problem here is
that IP address autodetection is broken on these hubs, and you can work around
it by manually setting `active_ip` to your (public) IP address: `/set
active_ip 1.3.3.7`.
## The Alt- keys don't work!
The ncdc manual refers to the "meta" key as Alt-something, but the actual key
to use tends to differ depending on your setup. In almost every setup, you can
press and release the 'Esc' key as a replacement for Alt-something. If you're
on OS X, [this stackoverflow answer](http://stackoverflow.com/a/438892)
may be helpful.
## Ncdc crashes a lot!
Ncdc 1.20 has no known bugs that may cause a crash. If you're running an older
version of ncdc, please upgrade. If your ncdc is up to date and you still have
a crash, please report a bug.
## Ncdc uses too much disk space!
First, look where this disk space goes to (hint: use [ncdu](/ncdu)). If it's
the log files: you can safely delete or rotate them (see next question).
The _db.sqlite3_ file can also grow quite large in certain situations. If you
modify or rename a lot of files in your share and ncdc re-hashes them, the old
hash data associated with the files is not removed from the database, resulting
in wasted disk space. The `/gc` command in ncdc can be used to clean up this
unused data. Be warned, however, that this command needs roughly twice the size
of the old db.sqlite3 file for temporary storage, so make sure you have enough
space available. (Note that this behaviour is not specific to ncdc, most other
DC clients do the same.)
## Why doesn't ncdc rotate log files automatically?
Because you can easily do that yourself. You can either use logrotate or a
simple script that runs from a cron. For an example of the latter option,
[this is the script I use](http://p.blicky.net/s7132), which is run as a
monthly cron job.
# Can ncdc...
## Can ncdc run in the background / as a daemon?
As with most ncurses applications: no. At least, it does not have this
functionality built-in. Ncdc is designed to be used in combination with a
separate terminal multiplexer or detach utility to handle this. Have a look at
[GNU screen](http://www.gnu.org/s/screen/),
[tmux](http://tmux.sourceforge.net/) or [dtach](http://dtach.sourceforge.net/).
## Does ncdc support UPnP?
Not natively. However, it is possible to use [this
script](http://www.howtoforge.com/administrating-your-gateway-device-via-upnp)
and manually keep a port open using a cron job. I have no experience with this
myself, though. I just run ncdc directly on my router. :-)
## Are there any programs available for analyzing the transfers.log file?
Nothing like that is included in the release yet, but there is a simple Perl
script available: [ncdc-transfer-stats](http://p.blicky.net/eu00a), and a short
Go program: [ncdc-share-report](http://p.blicky.net/h25z8).
## Can ncdc use the hash data or configuration from an existing DC++ installation?
No, ncdc uses its own configuration and hash storage directory. However, on
popular demand I could write a conversion utility to transfer the hash data
from other clients to ncdc's format. (Contrary to my expectations, there hasn't
been much interest in such a tool ever since I wrote this FAQ entry many years
ago. So I guess this isn't really a FAQ).

156
dat/ncdc/install.md Normal file
View file

@ -0,0 +1,156 @@
% Ncdc Installation Instructions
# General instructions
## Building from source
In theory, the following instructions should work everywhere:
- Install the required dependencies: ncurses, bzip2, zlib, sqlite3, glib2 and gnutls,
- Download and extract the source tarball from the [homepage](/ncdc),
- `./configure`
- `make`
- And then run `make install` with superuser permissions.
In practice, however, this does not always work and may not always be the
prefered method of installation. On this page I try to collect instructions for
each OS and distribution to make the installation process a bit easier for
everyone.
If your system is missing from this page or if you're still having trouble,
don't hesitate to join the support hub at `adc://dc.blicky.net/` or send me a
mail at [projects@yorhel.nl](mailto:projects@yorhel.nl). Contributions to this
page are of course highly welcomed as well. :-)
## Statically linked binaries
If you just want to get ncdc running without going through the trouble of
compiling and/or installing it, I also offer statically linked binaries:
- [Linux, 64-bit](/download/ncdc-linux-x86_64-1.20-6-g5111a.tar.gz)
- [Linux, 32-bit](/download/ncdc-linux-i486-1.20-6-g5111a.tar.gz)
- [Linux, ARM](/download/ncdc-linux-arm-1.20-6-g5111a.tar.gz)
To use them, simply download and extract the tarball, and then run `./ncdc` on
the command line.
The binaries include all the required dependencies and are linked against
[musl](http://www.etalabs.net/musl/), so they should run on any Linux machine
with the right architecture. If you want binaries for an other OS or
architecture, please bug me and I'll see what I can do.
# System-specific instructions
## Android
An [convenient installer](http://code.ivysaur.me/ncdcinstaller.html) is
available for Android 2.3 and later, which makes use of the static binary.
## Arch Linux
Ncdc is available on [AUR](https://aur.archlinux.org/packages/ncdc/), to
install it you can use your favorite AUR-installer. If you don't have a
favorite, go for the manual approach:
wget https://aur.archlinux.org/cgit/aur.git/snapshot/ncdc.tar.gz
tar -xf ncdc.tar.gz
cd ncdc
makepkg -si
## Fedora
There's a [package](https://apps.fedoraproject.org/packages/ncdc/overview/)
available for Fedora.
## FreeBSD
Ncdc is available in the Ports Collection. To install, [make sure your
collection is
up-to-date](http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html)
and install the Port as any other:
cd /usr/ports/net-p2p/ncdc
make install clean
## Gentoo
Ncdc is available in the Portage tree, so installation is trivial:
emerge ncdc
## Mac OS X
Ncdc is available in [Homebrew](http://braumeister.org/formula/ncdc).
## OpenIndiana
This has been tested on OpenIndiana Build 151a Server, but may work on other
versions as well. Compiling from source is your only option at the moment.
First install some required packages (as root):
pkg install gcc-3 glib2 gnutls gettext header-math perl-510/extra
Then, fetch the ncdc source tarball, extract and build as follows:
wget https://dev.yorhel.nl/download/ncdc-1.20.tar.gz
tar -xf ncdc-1.20.tar.gz
cd ncdc-1.20
export PATH="$PATH:/usr/perl5/5.10.0/bin"
./configure --prefix=/usr LDFLAGS='-L/usr/gnu/lib -R/usr/gnu/lib'
make
And finally, to actually install ncdc, run `make install` as root. You can
safely revert `$PATH` back to its previous value if you wish, it was only
necessary in order for `./configure` and `make` to find `pod2man`.
## OpenSUSE
Get the package from [PackMan](http://packman.links2linux.org/package/ncdc):
Select your openSUSE release and hit the "1 click install" button.
## Ubuntu & Debian
The preferred way of installing ncdc on Ubuntu or Debian is to use the static
binaries provided above.
Alternatively, you can also try to compile ncdc from source. To do so, first
install the required libraries:
sudo apt-get install libbz2-dev libsqlite3-dev libncurses5-dev\
libncursesw5-dev libglib2.0-dev libgnutls-dev zlib1g-dev
Then run the following commands to download and install ncdc:
wget https://dev.yorhel.nl/download/ncdc-1.20.tar.gz
tar -xf ncdc-1.20.tar.gz
cd ncdc-1.20
./configure --prefix=/usr
make
sudo make install
## Windows (Cygwin)
Surprisingly enough, ncdc can be used even on Windows, thanks to Cygwin. If
you haven't done so already, get `setup.exe` from the [Cygwin
website](http://cygwin.com/) and use it to install the following packages:
- make
- gcc4
- perl
- pkg-config
- wget
- zlib-devel
- libncursesw-devel
- libbz2-devel
- libglib2.0-devel
- libsqlite3-devel
- gnutls-devel
Then open a Cygwin terminal and run the following commands to download,
compile, and install ncdc:
wget https://dev.yorhel.nl/download/ncdc-1.20.tar.gz
tar -xf ncdc-1.20.tar.gz
cd ncdc-1.20
./configure --prefix=/usr
make install

21
dat/ncdc/scr.md Normal file
View file

@ -0,0 +1,21 @@
% Ncdc Screenshots
Note: While these screenshots are from version 1.5, the latest version has only
little visible changes. Let me also apologise for the crappy formatting, I
should take some smaller shots next time...
## Main chat
![Ncdc in the mainchat.](/img/ncdchub.png)
## File browser
![Simple file list browser.](/img/ncdcbrowse.png)
## User list
![Ncdc displaying the userlist of a hub.](/img/ncdcusers.png)
## Built-in help
![Ncdc built-in help.](/img/ncdchelp.png)