@item They do not require intermediate storage before recording on
either CD-ROM or tape drive.
@verbatim
-% nncp-bundle -tx SOMENODE | cdrecord -tao - # record directly to CD
-% nncp-bundle -tx SOMENODE | dd of=/dev/sa0 bs=10240 # record directly to tape
+$ nncp-bundle -tx SOMENODE | cdrecord -tao - # record directly to CD
+$ nncp-bundle -tx SOMENODE | dd of=/dev/sa0 bs=10240 # record directly to tape
-% dd if=/dev/cd0 bs=2048 | nncp-bundle -rx # read directly from CD
-% dd if=/dev/sa0 bs=10240 | nncp-bundle -rx # read directly from tape
+$ dd if=/dev/cd0 bs=2048 | nncp-bundle -rx # read directly from CD
+$ dd if=/dev/sa0 bs=10240 | nncp-bundle -rx # read directly from tape
@end verbatim
@item They do not require filesystem existence to deal with, simplifying
filesystems. No @command{mount}/@command{umount}, @command{zpool
import}/@command{zpool export} and struggling with file permissions.
@verbatim
-% nncp-bundle -tx SOMENODE | dd of=/dev/da0 bs=1M # record directly to
+$ nncp-bundle -tx SOMENODE | dd of=/dev/da0 bs=1M # record directly to
# hard/flash drive
-% dd if=/dev/da0 bs=1M | nncp-bundle -rx # read directly from drive
+$ dd if=/dev/da0 bs=1M | nncp-bundle -rx # read directly from drive
@end verbatim
@item This is the fastest way to record outbound packets for offline
@section nncp-bundle
@verbatim
-% nncp-bundle [options] -tx [-delete] NODE [NODE ...] > ...
-% nncp-bundle [options] -rx -delete [-dryrun] [NODE ...] < ...
-% nncp-bundle [options] -rx [-check] [-dryrun] [NODE ...] < ...
+$ nncp-bundle [options] -tx [-delete] NODE [NODE ...] > ...
+$ nncp-bundle [options] -rx -delete [-dryrun] [NODE ...] < ...
+$ nncp-bundle [options] -rx [-check] [-dryrun] [NODE ...] < ...
@end verbatim
With @option{-tx} option, this command creates @ref{Bundles, bundle} of
spool if everything is good. So it is advisable to recheck your streams:
@verbatim
-% nncp-bundle -tx ALICE BOB WHATEVER | cdrecord -tao -
-% dd if=/dev/cd0 bs=2048 | nncp-bundle -rx -delete
+$ nncp-bundle -tx ALICE BOB WHATEVER | cdrecord -tao -
+$ dd if=/dev/cd0 bs=2048 | nncp-bundle -rx -delete
@end verbatim
@option{-dryrun} option prevents any writes to the spool. This is
@section nncp-call
@verbatim
-% nncp-call [options]
+$ nncp-call [options]
[-onlinedeadline INT]
[-maxonlinetime INT]
[-rx|-tx]
@section nncp-caller
@verbatim
-% nncp-caller [options] [NODE ...]
+$ nncp-caller [options] [NODE ...]
@end verbatim
Croned daemon that calls remote nodes from time to time, according to
@section nncp-cfgenc
@verbatim
-% nncp-cfgmin [options] [-s INT] [-t INT] [-p INT] cfg.yaml > cfg.yaml.eblob
-% nncp-cfgmin [options] -d cfg.yaml.eblob > cfg.yaml
+$ nncp-cfgmin [options] [-s INT] [-t INT] [-p INT] cfg.yaml > cfg.yaml.eblob
+$ nncp-cfgmin [options] -d cfg.yaml.eblob > cfg.yaml
@end verbatim
This command allows you to encrypt provided @file{cfg.yaml} file with
@option{-dump} options parses @file{eblob} and prints parameters used
during its creation. For example:
@verbatim
-% nncp-cfgenc -dump /usr/local/etc/nncp.yaml.eblob
+$ nncp-cfgenc -dump /usr/local/etc/nncp.yaml.eblob
Strengthening function: Balloon with BLAKE2b-256
Memory space cost: 1048576 bytes
Number of rounds: 16
@section nncp-cfgmin
@verbatim
-% nncp-cfgmin [options] > stripped.yaml
+$ nncp-cfgmin [options] > stripped.yaml
@end verbatim
Print out stripped configuration version: only path to @ref{Spool,
@section nncp-cfgnew
@verbatim
-% nncp-cfgnew [options] > new.yaml
+$ nncp-cfgnew [options] > new.yaml
@end verbatim
Generate new node configuration: private keys, example configuration
@section nncp-check
@verbatim
-% nncp-check [options]
+$ nncp-check [options]
@end verbatim
Perform @ref{Spool, spool} directory integrity check. Read all files
@section nncp-daemon
@verbatim
-% nncp-daemon [options] [-maxconn INT] [-bind ADDR] [-inetd]
+$ nncp-daemon [options] [-maxconn INT] [-bind ADDR] [-inetd]
@end verbatim
Start listening TCP daemon, wait for incoming connections and run
@section nncp-exec
@verbatim
-% nncp-exec [options] NODE HANDLE [ARG0 ARG1 ...]
+$ nncp-exec [options] NODE HANDLE [ARG0 ARG1 ...]
@end verbatim
Send execution command to @option{NODE} for specified @option{HANDLE}.
@section nncp-file
@verbatim
-% nncp-file [options] [-chunked INT] SRC NODE:[DST]
+$ nncp-file [options] [-chunked INT] SRC NODE:[DST]
@end verbatim
Send @file{SRC} file to remote @option{NODE}. @file{DST} specifies
@section nncp-freq
@verbatim
-% nncp-freq [options] NODE:SRC [DST]
+$ nncp-freq [options] NODE:SRC [DST]
@end verbatim
Send file request to @option{NODE}, asking it to send its @file{SRC}
@section nncp-log
@verbatim
-% nncp-log [options]
+$ nncp-log [options]
@end verbatim
Parse @ref{Log, log} file and print out its records in human-readable form.
@section nncp-pkt
@verbatim
-% nncp-pkt [options] < pkt
-% nncp-pkt [options] [-decompress] -dump < pkt > payload
-% nncp-pkt -overheads
+$ nncp-pkt [options] < pkt
+$ nncp-pkt [options] [-decompress] -dump < pkt > payload
+$ nncp-pkt -overheads
@end verbatim
Low level packet parser. Normally it should not be used, but can help in
@section nncp-reass
@verbatim
-% nncp-reass [options] [-dryrun] [-keep] [-dump] [-stdout] FILE.nncp.meta
-% nncp-reass [options] [-dryrun] [-keep] {-all | -node NODE}
+$ nncp-reass [options] [-dryrun] [-keep] [-dump] [-stdout] FILE.nncp.meta
+$ nncp-reass [options] [-dryrun] [-keep] {-all | -node NODE}
@end verbatim
Reassemble @ref{Chunked, chunked file} after @ref{nncp-toss, tossing}.
@section nncp-rm
@verbatim
-% nncp-rm [options] -tmp
-% nncp-rm [options] -lock
-% nncp-rm [options] -node NODE -part
-% nncp-rm [options] -node NODE -seen
-% nncp-rm [options] -node NODE [-rx] [-tx]
-% nncp-rm [options] -node NODE -pkt PKT
+$ nncp-rm [options] -tmp
+$ nncp-rm [options] -lock
+$ nncp-rm [options] -node NODE -part
+$ nncp-rm [options] -node NODE -seen
+$ nncp-rm [options] -node NODE [-rx] [-tx]
+$ nncp-rm [options] -node NODE -pkt PKT
@end verbatim
This command is aimed to delete various files from your spool directory:
@section nncp-stat
@verbatim
-% nncp-stat [options] [-node NODE]
+$ nncp-stat [options] [-node NODE]
@end verbatim
Print current @ref{Spool, spool} statistics about unsent and unprocessed
@section nncp-toss
@verbatim
-% nncp-toss [options]
+$ nncp-toss [options]
[-node NODE]
[-dryrun]
[-cycle INT]
@section nncp-xfer
@verbatim
-% nncp-xfer [options] [-node NODE] [-mkdir] [-keep] [-rx|-tx] DIR
+$ nncp-xfer [options] [-node NODE] [-mkdir] [-keep] [-rx|-tx] DIR
@end verbatim
Search for directory in @file{DIR} containing inbound packets for us and
After installing @command{rss2email}, create configuration file:
@verbatim
-% r2e new rss-robot@address.com
+$ r2e new rss-robot@address.com
@end verbatim
and add feeds you want to retrieve:
@verbatim
-% r2e add https://git.cypherpunks.ru/cgit.cgi/nncp.git/atom/?h=master
+$ r2e add https://git.cypherpunks.ru/cgit.cgi/nncp.git/atom/?h=master
@end verbatim
and run the process:
@verbatim
-% r2e run
+$ r2e run
@end verbatim
@node WARCs
Simple HTML web page can be downloaded very easily for sending and
viewing it offline after:
@verbatim
-% wget http://www.example.com/page.html
+$ wget http://www.example.com/page.html
@end verbatim
But most web pages contain links to images, CSS and JavaScript files,
documents parsing and understanding page dependencies. You can download
the whole page with dependencies the following way:
@verbatim
-% wget \
+$ wget \
--page-requisites \
--convert-links \
--adjust-extension \
necessary to view @file{page.html} web page. You can create single file
compressed tarball with that directory and send it to remote node:
@verbatim
-% tar cf - www.example.com | xz -9 |
+$ tar cf - www.example.com | xz -9 |
nncp-file - remote.node:www.example.com-page.tar.xz
@end verbatim
sites you want to get in a single package. You can mirror the whole web
site by utilizing @command{wget}'s recursive feature:
@verbatim
-% wget \
+$ wget \
--recursive \
--timestamping \
-l inf \
@strong{WARC}. Fortunately again, @command{wget} supports it as an
output format.
@verbatim
-% wget \
+$ wget \
--warc-file www.example_com-$(date '+%Y%M%d%H%m%S') \
--no-warc-compression \
--no-warc-keep-log \
that archive using @url{https://pypi.python.org/pypi/Warcat, warcat}
utility, producing usual directory hierarchy:
@verbatim
-% python3 -m warcat extract \
+$ python3 -m warcat extract \
www.example_com-XXX.warc \
--output-dir www.example.com-XXX \
--progress
@url{http://aria2.github.io/manual/en/html/aria2c.html#files, input file}
with the jobs you want to download:
@verbatim
-% cat jobs
+$ cat jobs
http://www.nncpgo.org/download/nncp-0.11.tar.xz
out=nncp.txz
http://www.nncpgo.org/download/nncp-0.11.tar.xz.sig
out=nncp.txz.sig
-% aria2c \
+$ aria2c \
--on-download-complete aria2-downloaded.sh \
--input-file jobs
@end verbatim
BitTorrents:
@verbatim
-% echo http://www.nncpgo.org/Postfix.html |
+$ echo http://www.nncpgo.org/Postfix.html |
nncp-exec remote.node warcer postfix-whole-page
-% echo http://www.nncpgo.org/Postfix.html |
+$ echo http://www.nncpgo.org/Postfix.html |
nncp-exec remote.node wgeter postfix-html-page
-% echo \
+$ echo \
http://www.nncpgo.org/download/nncp-0.11.tar.xz
http://www.nncpgo.org/download/nncp-0.11.tar.xz.sig |
nncp-exec remote.node aria2c
Use it to create bundles containing all required blobs/trees/commits and tags:
@verbatim
-% git bundle create repo-initial.bundle master --tags --branches
-% git tag -f last-bundle
-% nncp-file repo-initial.bundle remote.node:repo-$(date % '+%Y%M%d%H%m%S').bundle
+$ git bundle create repo-initial.bundle master --tags --branches
+$ git tag -f last-bundle
+$ nncp-file repo-initial.bundle remote.node:repo-$(date % '+%Y%M%d%H%m%S').bundle
@end verbatim
Do usual working with the Git: commit, add, branch, checkout, etc. When
you decide to queue your changes for sending, create diff-ed bundle and
transfer them:
@verbatim
-% git bundle create repo-$(date '+%Y%M%d%H%m%S').bundle last-bundle..master
+$ git bundle create repo-$(date '+%Y%M%d%H%m%S').bundle last-bundle..master
or maybe
-% git bundle create repo-$(date '+%Y%M%d').bundle --since=10.days master
+$ git bundle create repo-$(date '+%Y%M%d').bundle --since=10.days master
@end verbatim
Received bundle on remote machine acts like usual remote:
@verbatim
-% git clone -b master repo-XXX.bundle
+$ git clone -b master repo-XXX.bundle
@end verbatim
overwrite @file{repo.bundle} file with newer bundles you retrieve and
fetch all required branches and commits:
@verbatim
-% git pull # assuming that origin remote points to repo.bundle
-% git fetch repo.bundle master:localRef
-% git ls-remote repo.bundle
+$ git pull # assuming that origin remote points to repo.bundle
+$ git fetch repo.bundle master:localRef
+$ git ls-remote repo.bundle
@end verbatim
Bundles are also useful when cloning huge repositories (like Linux has).
When you multimedia becomes an ordinary file, you can transfer it easily.
@verbatim
-% youtube-dl \
+$ youtube-dl \
--exec 'nncp-file {} remote.node:' \
'https://www.youtube.com/watch?list=PLd2Cw8x5CytxPAEBwzilrhQUHt_UN10FJ'
@end verbatim
@item
@verbatim
-% gpg --auto-key-locate dane --locate-keys releases at nncpgo dot org
-% gpg --auto-key-locate wkd --locate-keys releases at nncpgo dot org
+$ gpg --auto-key-locate dane --locate-keys releases at nncpgo dot org
+$ gpg --auto-key-locate wkd --locate-keys releases at nncpgo dot org
@end verbatim
@item
Then you could verify tarballs signature:
@verbatim
-% gpg --verify nncp-3.1.tar.xz.sig nncp-3.1.tar.xz
+$ gpg --verify nncp-3.1.tar.xz.sig nncp-3.1.tar.xz
@end verbatim
Look @ref{Integrity, here} for finding public keys for tarball authentication.
@verbatim
-% wget http://www.nncpgo.org/download/nncp-3.1.tar.xz
-% wget http://www.nncpgo.org/download/nncp-3.1.tar.xz.sig
-% gpg --verify nncp-3.1.tar.xz.sig nncp-3.1.tar.xz
-% xz -d nncp-3.1.tar.xz
-% tar xf nncp-3.1.tar
-% make -C nncp-3.1 all
+$ wget http://www.nncpgo.org/download/nncp-3.1.tar.xz
+$ wget http://www.nncpgo.org/download/nncp-3.1.tar.xz.sig
+$ gpg --verify nncp-3.1.tar.xz.sig nncp-3.1.tar.xz
+$ xz -d nncp-3.1.tar.xz
+$ tar xf nncp-3.1.tar
+$ make -C nncp-3.1 all
@end verbatim
There is @command{install} target respecting @env{DESTDIR}. It will
@verbatim
# apt-get install golang-1.6
-% wget http://www.nncpgo.org/download/nncp-3.1.tar.xz
-% wget http://www.nncpgo.org/download/nncp-3.1.tar.xz.sig
-% gpg --verify nncp-3.1.tar.xz.sig nncp-3.1.tar.xz
-% tar xf nncp-3.1.tar.xz
-% PATH=/usr/lib/go-1.6/bin:$PATH make -C nncp-3.1 all
+$ wget http://www.nncpgo.org/download/nncp-3.1.tar.xz
+$ wget http://www.nncpgo.org/download/nncp-3.1.tar.xz.sig
+$ gpg --verify nncp-3.1.tar.xz.sig nncp-3.1.tar.xz
+$ tar xf nncp-3.1.tar.xz
+$ PATH=/usr/lib/go-1.6/bin:$PATH make -C nncp-3.1 all
# make -C nncp-3.1 install PREFIX=/usr
@end verbatim
and fetching dependent libraries source code as git submodules:
@verbatim
-% git clone git://git.cypherpunks.ru/nncp.git nncp
-% cd nncp
-% git checkout develop
-% git submodule update --init
+$ git clone git://git.cypherpunks.ru/nncp.git nncp
+$ cd nncp
+$ git checkout develop
+$ git submodule update --init
@end verbatim
Also there is mirror of dependent libraries for safety if their native
Команды:
@verbatim
-% nncp-file file_i_want_to_send bob:
-% nncp-file another_file bob:movie.avi
+$ nncp-file file_i_want_to_send bob:
+$ nncp-file another_file bob:movie.avi
@end verbatim
добавят в очередь отправки два файла для узла @emph{bob}.
опцию:
@verbatim
-% nncp-file -nice FLASH myfile node:dst
-% nncp-xfer -nice PRIORITY /mnt/shared
-% nncp-call -nice NORMAL bob
+$ nncp-file -nice FLASH myfile node:dst
+$ nncp-xfer -nice PRIORITY /mnt/shared
+$ nncp-call -nice NORMAL bob
[...]
@end verbatim
Вы также можете использовать CD-ROM и ленточные накопители:
@verbatim
-% nncp-bundle -tx bob | cdrecord -tao -
-% nncp-bundle -tx bob | dd of=/dev/sa0 bs=10240
+$ nncp-bundle -tx bob | cdrecord -tao -
+$ nncp-bundle -tx bob | dd of=/dev/sa0 bs=10240
@end verbatim
@node UsecaseNoLinkRU
запустите @ref{nncp-xfer}:
@verbatim
-% nncp-xfer -node bob /media/usbstick
+$ nncp-xfer -node bob /media/usbstick
@end verbatim
чтобы скопировать все исходящие пакеты относящиеся к @emph{bob}.
@option{-node} опцию, чтобы скопировать все доступные исходящие пакеты.
@verbatim
-% nncp-xfer /media/usbstick
+$ nncp-xfer /media/usbstick
@end verbatim
Размонтируйте и передайте накопитель Бобу и Алисе. Когда они вставят
накопитель в свои компьютеры, то выполнят точно такую же команду:
@verbatim
-% nncp-xfer /media/usbstick
+$ nncp-xfer /media/usbstick
@end verbatim
чтобы найти все пакеты относящиеся к их узлу и локально скопируют для
зашифрованных пакетов}, которые вы можете принять.
@verbatim
-% nncp-bundle -tx alice bob eve ... | команда для отправки широковещательной рассылки
-% команда для приёма широковещательной рассылки | nncp-bundle -rx
+$ nncp-bundle -tx alice bob eve ... | команда для отправки широковещательной рассылки
+$ команда для приёма широковещательной рассылки | nncp-bundle -rx
@end verbatim
Встроенная возможность определять дубляжи пакетов позволит вам
транспорт с свойством совершенной прямой секретности.
@verbatim
-% nncp-daemon -bind [::]:5400
+$ nncp-daemon -bind [::]:5400
@end verbatim
запустит TCP демон, который будет слушать входящие соединения на всех
интерфейсах.
@verbatim
-% nncp-call bob
+$ nncp-call bob
@end verbatim
попытается подключиться к известному TCP-адресу узла @emph{bob} (взятого
из конфигурационного файла), послать все связанные с ним исходящие
The command:
@verbatim
-% nncp-file file_i_want_to_send bob:
-% nncp-file another_file bob:movie.avi
+$ nncp-file file_i_want_to_send bob:
+$ nncp-file another_file bob:movie.avi
@end verbatim
will queue two files for sending to @emph{bob} node. Fire and forget!
later than the other ones. Nearly all commands has corresponding option:
@verbatim
-% nncp-file -nice FLASH myfile node:dst
-% nncp-xfer -nice PRIORITY /mnt/shared
-% nncp-call -nice NORMAL bob
+$ nncp-file -nice FLASH myfile node:dst
+$ nncp-xfer -nice PRIORITY /mnt/shared
+$ nncp-call -nice NORMAL bob
[...]
@end verbatim
You can also use CD-ROM and tape drives:
@verbatim
-% nncp-bundle -tx bob | cdrecord -tao -
-% nncp-bundle -tx bob | dd of=/dev/sa0 bs=10240
+$ nncp-bundle -tx bob | cdrecord -tao -
+$ nncp-bundle -tx bob | dd of=/dev/sa0 bs=10240
@end verbatim
@node UsecaseNoLink
device (SD is preferable!), mount it and run @ref{nncp-xfer}:
@verbatim
-% nncp-xfer -node bob /media/usbstick
+$ nncp-xfer -node bob /media/usbstick
@end verbatim
to copy all outbound packets related to @emph{bob}. Use @option{-mkdir}
outgoing packets.
@verbatim
-% nncp-xfer /media/usbstick
+$ nncp-xfer /media/usbstick
@end verbatim
Unmount it and transfer storage to Bob and Alice. When they will insert
it in their computers, they will use exactly the same command:
@verbatim
-% nncp-xfer /media/usbstick
+$ nncp-xfer /media/usbstick
@end verbatim
to find all packets related to their node and copy them locally for
a sequence of @ref{Encrypted, encrypted packets} you can catch on.
@verbatim
-% nncp-bundle -tx alice bob eve ... | command to send broadcast
-% command to receive broadcast | nncp-bundle -rx
+$ nncp-bundle -tx alice bob eve ... | command to send broadcast
+$ command to receive broadcast | nncp-bundle -rx
@end verbatim
With built-in packet duplicates detection ability, you can retransmit
property.
@verbatim
-% nncp-daemon -bind [::]:5400
+$ nncp-daemon -bind [::]:5400
@end verbatim
will start TCP daemon listening on all interfaces for incoming
connections.
@verbatim
-% nncp-call bob
+$ nncp-call bob
@end verbatim
will try to connect to @emph{bob}'s node known TCP addresses (taken from
configuration file) and send all related outbound packets and retrieve