]> Cypherpunks.ru repositories - nncp.git/commitdiff
Merge branch 'develop' 0.12
authorSergey Matveev <stargrave@stargrave.org>
Sun, 8 Oct 2017 17:37:24 +0000 (20:37 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 8 Oct 2017 17:37:24 +0000 (20:37 +0300)
22 files changed:
.gitmodules
VERSION
doc/about.ru.texi
doc/about.texi
doc/cfg.texi
doc/download.texi
doc/index.texi
doc/integration.texi [new file with mode: 0644]
doc/news.ru.texi
doc/news.texi
doc/postfix.texi [deleted file]
doc/usecases.ru.texi
doc/usecases.texi
makedist.sh
ports/nncp/Makefile
src/cypherpunks.ru/nncp/toss.go
src/github.com/dustin/go-humanize
src/github.com/flynn/noise
src/github.com/minio/blake2b-simd [deleted submodule]
src/golang.org/x/crypto
src/golang.org/x/net
src/golang.org/x/sys

index ae68d8ec6d28eccfec894dc578a0059dd8175e6b..fb795d974753b761176066547db5061ebe284a0b 100644 (file)
@@ -7,9 +7,6 @@
 [submodule "src/github.com/flynn/noise"]
        path = src/github.com/flynn/noise
        url = https://github.com/flynn/noise.git
-[submodule "src/github.com/minio/blake2b-simd"]
-       path = src/github.com/minio/blake2b-simd
-       url = https://github.com/minio/blake2b-simd.git
 [submodule "src/gopkg.in/check.v1"]
        path = src/gopkg.in/check.v1
        url = https://github.com/go-check/check.git
diff --git a/VERSION b/VERSION
index 51176c7c891c45403eab9e0cf753cbab19dc2442..c43e1055fd3f2e00540c298404934e8097459098 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.11
+0.12
index e9a2dce67c7c09cf6de59c0b443736beded1cc39..c285e164f379610a92315b9a97e9bfe94bc2d680 100644 (file)
@@ -34,9 +34,9 @@ NNCP это @url{https://www.gnu.org/philosophy/pragmatic.ru.html,
 программное обеспечение}: лицензировано под условиями
 @url{https://www.gnu.org/licenses/gpl-3.0.ru.html, GNU GPLv3+}. Оно
 должно работать на всех @url{https://ru.wikipedia.org/wiki/POSIX,
-POSIX}-совместимых системах. Лёгкая интеграция с существующими
-@url{https://ru.wikipedia.org/wiki/SMTP, SMTP} серверами. Единственный
-конфигурационный @url{http://yaml.org/, YAML} файл.
+POSIX}-совместимых системах. Лёгкая @ref{Integration, интеграция} с
+существующими @url{https://ru.wikipedia.org/wiki/SMTP, SMTP} серверами.
\95динÑ\81Ñ\82веннÑ\8bй ÐºÐ¾Ð½Ñ\84игÑ\83Ñ\80аÑ\86ионнÑ\8bй @url{http://yaml.org/, YAML} Ñ\84айл.
 
 Зачем создавать ещё одно решение с принципом сохранить-и-переслать когда
 уже существуют UUCP, FTN и даже SMTP? Посмотрите @ref{Сравнение, сравнение}!
index eb306ad37e7a533967b641f9a87aa3f4c9e669a3..cfd53212341360376db6bcdaa9fd1598e209356d 100644 (file)
@@ -27,7 +27,7 @@ NNCP is @url{https://www.gnu.org/philosophy/pragmatic.html, copylefted}
 @url{https://www.gnu.org/philosophy/free-sw.html, free software}
 licenced under @url{https://www.gnu.org/licenses/gpl-3.0.html, GNU GPLv3+}.
 It should work on all @url{https://en.wikipedia.org/wiki/POSIX,
-POSIX}-compatible systems. Easy integration with existing
+POSIX}-compatible systems. Easy @ref{Integration, integration} with existing
 @url{https://en.wikipedia.org/wiki/SMTP, SMTP} servers. Single
 @url{http://yaml.org/, YAML} configuration file.
 
index 1a37f10e5678410c3d7523ae311567a62c856e94..0420d3959fec7352b25e7695cd1159fec9d3f12a 100644 (file)
@@ -89,7 +89,9 @@ synchronization protocol}. Contains authentication public key.
 @item sendmail
 An array containing path to executable and its command line arguments
 that is called for mail sending. If it is empty, then no mail processing
-will be performed from that node.
+will be performed from that node. Sendmail command
+@command{["/bin/foo", "bar"]} called the following way:
+@command{NNCP_SENDER=NODEID /bin/foo bar RCPT1 RCPT2 ... < MSG}.
 
 @anchor{CfgIncoming}
 @item incoming
index fef33eaec9a1b3655a0f2c7310fd64563d2aa39e..e325722b1d6536d23ad39aef40f0f06f58e0b7ca 100644 (file)
@@ -9,12 +9,12 @@ Tarballs include all necessary required libraries:
 @multitable @columnfractions .50 .50
 @headitem Library @tab Licence
 @item @code{cypherpunks.ru/balloon} @tab GNU LGPLv3+
+@item @code{github.com/davecgh/go-xdr} @tab ISC
 @item @code{github.com/dustin/go-humanize} @tab MIT
 @item @code{github.com/flynn/noise} @tab BSD 3-Clause
 @item @code{github.com/go-check/check} @tab BSD 2-Clause
 @item @code{github.com/go-yaml/yaml} @tab Apache License 2.0 and MIT
 @item @code{github.com/gorhill/cronexpr} @tab GNU GPLv3
-@item @code{github.com/minio/blake2b-simd} @tab Apache License 2.0
 @item @code{golang.org/x/crypto} @tab BSD 3-Clause
 @item @code{golang.org/x/net} @tab BSD 3-Clause
 @item @code{golang.org/x/sys} @tab BSD 3-Clause
@@ -23,6 +23,10 @@ Tarballs include all necessary required libraries:
 @multitable {XXXXX} {XXXX KiB} {link sign} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
 @headitem Version @tab Size @tab Tarball @tab SHA256 checksum
 
+@item @ref{Release 0.11, 0.11} @tab 1031 KiB
+@tab @url{download/nncp-0.11.tar.xz, link} @url{download/nncp-0.11.tar.xz.sig, sign}
+@tab @code{D0F73C3B ADBF6B8B 13641A61 4D34F65F 20AF4C84 90894331 BF1F1609 2D65E719}
+
 @item @ref{Release 0.10, 0.10} @tab 949 KiB
 @tab @url{download/nncp-0.10.tar.xz, link} @url{download/nncp-0.10.tar.xz.sig, sign}
 @tab @code{DCE7C762 2F9281EB 282F1A67 5CA6500E 854F2DEC D60F3264 07872B91 4F4E6FA0}
index 87c008e6d304d0dbcabce27404109e34cd293549..4ce8613b4895236cff269f3db8cd24c35ae52f16 100644 (file)
@@ -33,7 +33,7 @@ A copy of the license is included in the section entitled "Copying conditions".
 * Installation::
 * Configuration::
 * Call configuration: Call.
-* Integration with Postfix: Postfix.
+* Integration::
 * Commands::
 * Niceness::
 * Chunked files: Chunked.
@@ -55,7 +55,7 @@ A copy of the license is included in the section entitled "Copying conditions".
 @include install.texi
 @include cfg.texi
 @include call.texi
-@include postfix.texi
+@include integration.texi
 @include cmds.texi
 @include niceness.texi
 @include chunked.texi
diff --git a/doc/integration.texi b/doc/integration.texi
new file mode 100644 (file)
index 0000000..c27cb36
--- /dev/null
@@ -0,0 +1,335 @@
+@node Integration
+@unnumbered Integration with existing software
+
+Here is some examples of how you can solve popular tasks with NNCP,
+making them store-and-forward friendly.
+
+@menu
+* Postfix::
+* Web feeds: Feeds.
+* Web pages: WARCs.
+* BitTorrent and huge files: BitTorrent.
+* Git::
+* Multimedia streaming: Multimedia.
+@end menu
+
+@node Postfix
+@section Integration with Postfix
+
+This section is taken from @url{http://www.postfix.org/nncp_README.html,
+Postfix and UUCP} manual and just replaces UUCP-related calls with NNCP
+ones.
+
+@strong{Setting up a Postfix Internet to NNCP gateway}
+
+Here is how to set up a machine that sits on the Internet and that forwards
+mail to a LAN that is connected via NNCP.
+
+@itemize
+
+@item You need an @ref{nncp-mail} program that extracts the sender
+address from mail that arrives via NNCP, and that feeds the mail into
+the Postfix @command{sendmail} command.
+
+@item Define a @command{pipe(8)} based mail delivery transport for
+delivery via NNCP:
+@verbatim
+/usr/local/etc/postfix/master.cf:
+nncp      unix  -       n       n       -       -       pipe
+          flags=F user=nncp argv=nncp-mail -quiet $nexthop $recipient
+@end verbatim
+
+This runs the @command{nncp-mail} command to place outgoing mail into
+the NNCP queue after replacing @var{$nexthop} by the the receiving NNCP
+node and after replacing @var{$recipient} by the recipients. The
+@command{pipe(8)} delivery agent executes the @command{nncp-mail}
+command without assistance from the shell, so there are no problems with
+shell meta characters in command-line parameters.
+
+@item Specify that mail for @emph{example.com}, should be delivered via
+NNCP, to a host named @emph{nncp-host}:
+
+@verbatim
+/usr/local/etc/postfix/transport:
+    example.com     nncp:nncp-host
+    .example.com    nncp:nncp-host
+@end verbatim
+
+See the @command{transport(5)} manual page for more details.
+
+@item Execute the command @command{postmap /etc/postfix/transport}
+whenever you change the @file{transport} file.
+
+@item Enable @file{transport} table lookups:
+
+@verbatim
+/usr/local/etc/postfix/main.cf:
+    transport_maps = hash:$config_directory/transport
+@end verbatim
+
+@item Add @emph{example.com} to the list of domains that your site is
+willing to relay mail for.
+
+@verbatim
+/usr/local/etc/postfix/main.cf:
+    relay_domains = example.com ...other relay domains...
+@end verbatim
+
+See the @option{relay_domains} configuration parameter description for
+details.
+
+@item Execute the command @command{postfix reload} to make the changes
+effective.
+
+@end itemize
+
+@strong{Setting up a Postfix LAN to NNCP gateway}
+
+Here is how to relay mail from a LAN via NNCP to the Internet.
+
+@itemize
+
+@item You need an @ref{nncp-mail} program that extracts the sender
+address from mail that arrives via NNCP, and that feeds the mail into
+the Postfix @command{sendmail} command.
+
+@item Specify that all remote mail must be sent via the @command{nncp}
+mail transport to your NNCP gateway host, say, @emph{nncp-gateway}:
+
+@verbatim
+/usr/local/etc/postfix/main.cf:
+    relayhost = nncp-gateway
+    default_transport = nncp
+@end verbatim
+
+Postfix 2.0 and later also allows the following more succinct form:
+
+@verbatim
+/usr/local/etc/postfix/main.cf:
+    default_transport = nncp:nncp-gateway
+@end verbatim
+
+@item Define a @command{pipe(8)} based message delivery transport for
+mail delivery via NNCP:
+
+@verbatim
+/usr/local/etc/postfix/master.cf:
+nncp      unix  -       n       n       -       -       pipe
+          flags=F user=nncp argv=nncp-mail -quiet $nexthop $recipient
+@end verbatim
+
+This runs the @command{nncp-mail} command to place outgoing mail into
+the NNCP queue. It substitutes the hostname (@emph{nncp-gateway}, or
+whatever you specified) and the recipients before executing the command.
+The @command{nncp-mail} command is executed without assistance from the
+shell, so there are no problems with shell meta characters.
+
+@item Execute the command @command{postfix reload} to make the changes
+effective.
+
+@end itemize
+
+@node Feeds
+@section Integration with Web feeds
+
+RSS and Atom feeds could be collected using
+@url{https://github.com/wking/rss2email, rss2email} program. It
+converts all incoming feed entries to email messages. Read about how to
+integration @ref{Postfix} with email. @command{rss2email} could be run
+in a cron, to collect feeds without any user interaction. Also this
+program supports ETags and won't pollute the channel if remote server
+supports them too.
+
+After installing @command{rss2email}, create configuration file:
+@verbatim
+% 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
+@end verbatim
+and run the process:
+@verbatim
+% r2e run
+@end verbatim
+
+@node WARCs
+@section Integration with Web pages
+
+Simple HTML web page can be downloaded very easily for sending and
+viewing it offline after:
+@verbatim
+% wget http://www.example.com/page.html
+@end verbatim
+
+But most web pages contain links to images, CSS and JavaScript files,
+required for complete rendering.
+@url{https://www.gnu.org/software/wget/, GNU Wget} supports that
+documents parsing and understanding page dependencies. You can download
+the whole page with dependencies the following way:
+@verbatim
+% wget \
+    --page-requisites \
+    --convert-links \
+    --adjust-extension \
+    --restrict-file-names=ascii \
+    --span-hosts \
+    --random-wait \
+    --execute robots=off \
+    http://www.example.com/page.html
+@end verbatim
+that will create @file{www.example.com} directory with all files
+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 |
+    nncp-file - remote.node:www.example.com-page.tar.xz
+@end verbatim
+
+But there are multi-paged articles, there are the whole interesting
+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 \
+    --recursive \
+    --timestamping \
+    -l inf \
+    --no-remove-listing \
+    --no-parent \
+    [...]
+    http://www.example.com/
+@end verbatim
+
+There is a standard for creating
+@url{https://en.wikipedia.org/wiki/Web_ARChive, Web ARChives}:
+@strong{WARC}. Fortunately again, @command{wget} supports it as an
+output format.
+@verbatim
+% wget \
+    --warc-file www.example_com-$(date '+%Y%M%d%H%m%S') \
+    --no-warc-compression \
+    --no-warc-keep-log \
+    [...]
+    http://www.example.com/
+@end verbatim
+That command will create uncompressed @file{www.example_com-XXX.warc}
+web archive. By default, WARCs are compressed using
+@url{https://en.wikipedia.org/wiki/Gzip, gzip}, but, in example above,
+we have disabled it to compress with stronger @command{xz}, before
+sending via @command{nncp-file}.
+
+There are plenty of software acting like HTTP proxy for your browser,
+allowing to view that WARC files. However you can extract files from
+that archive using @url{https://pypi.python.org/pypi/Warcat, warcat}
+utility, producing usual directory hierarchy:
+@verbatim
+% python3 -m warcat extract \
+    www.example_com-XXX.warc \
+    --output-dir www.example.com-XXX \
+    --progress
+@end verbatim
+
+@node BitTorrent
+@section BitTorrent and huge files
+
+If dealing with @ref{Git}, @ref{Feeds, web feeds} and @ref{Multimedia,
+multimedia} goes relatively fast, then BitTorrent and huge files
+consumes much time. You can not wait for downloads finish, but want to
+queue them after.
+
+@url{http://aria2.github.io/, aria2} multi-protocol download utility
+could be used for solving that issue conveniently. It supports HTTP,
+HTTPS, FTP, SFTP and BitTorrent protocols, together with
+@url{http://tools.ietf.org/html/rfc5854, Metalink} format. BitTorrent
+support is fully-featured: UDP trackers, DHT, PEX, encryption, magnet
+URIs, Web-seeding, selective downloads, LPD. @command{aria2} can
+accelerate HTTP*/*FTP downloads by segmented multiple parallel
+connections.
+
+You can queue you files after they are completely downloaded:
+@verbatim
+% cat send-downloaded.sh
+#!/bin/sh
+nncp-file -chunked $(( 1024 * 100 )) "$3" remote.node
+
+% aria2c \
+    --on-download-complete send-downloaded.sh \
+    http://example.org/file.iso \
+    http://example.org/file.iso.asc
+@end verbatim
+
+Also you can prepare
+@url{http://aria2.github.io/manual/en/html/aria2c.html#files, input file}
+with the jobs you want to download:
+@verbatim
+% 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 \
+    --on-download-complete send-downloaded.sh \
+    --input-file jobs
+@end verbatim
+and all that downloaded (@file{nncp.txz}, @file{nncp.txz.sig}) files
+will be sent to @file{remote.node} when finished.
+
+@node Git
+@section Integration with Git
+
+@url{https://git-scm.com/, Git} version control system already has all
+necessary tools for store-and-forward networking.
+@url{https://git-scm.com/docs/git-bundle, git-bundle} command is
+everything you need.
+
+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
+@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
+or maybe
+% 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
+@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
+@end verbatim
+
+Bundles are also useful when cloning huge repositories (like Linux has).
+Git's native protocol does not support any kind of interrupted download
+resuming, so you will start from the beginning if connection is lost.
+Bundles, being an ordinary files, can be downloaded with native
+HTTP/FTP/NNCP resuming capabilities. After you fetch repository via the
+bundle, you can add an ordinary @file{git://} remote and fetch the
+difference.
+
+@node Multimedia
+@section Integration with multimedia streaming
+
+Many video and audio streams could be downloaded using
+@url{http://yt-dl.org/, youtube-dl} program.
+@url{https://rg3.github.io/youtube-dl/supportedsites.html, Look} how
+many of them are supported, including @emph{Dailymotion}, @emph{Vimeo}
+and @emph{YouTube}.
+
+When you multimedia becomes an ordinary file, you can transfer it easily.
+@verbatim
+% youtube-dl \
+    --exec 'nncp-file {} remote.node:' \
+    'https://www.youtube.com/watch?list=PLd2Cw8x5CytxPAEBwzilrhQUHt_UN10FJ'
+@end verbatim
index f738d0e676a8b4ffaff78b7ba6851b0fd49dc441..98804fb87c014fde77431e6174b5445d45d7910d 100644 (file)
@@ -1,6 +1,13 @@
 @node Новости
 @section Новости
 
+@node Релиз 0.12
+@subsection Релиз 0.12
+@itemize
+@item
+Команда sendmail вызывается с @env{NNCP_SENDER} переменной окружения.
+@end itemize
+
 @node Релиз 0.11
 @subsection Релиз 0.11
 @itemize
index 8c3ec1a3b4548eebe9edf8d475d6f1bda74f15bb..8f36b4b590be2b2faa0a1a51b8911be68d189307 100644 (file)
@@ -3,6 +3,13 @@
 
 See also this page @ref{Новости, on russian}.
 
+@node Release 0.12
+@section Release 0.12
+@itemize
+@item
+Sendmail command is called with @env{NNCP_SENDER} environment variable.
+@end itemize
+
 @node Release 0.11
 @section Release 0.11
 @itemize
diff --git a/doc/postfix.texi b/doc/postfix.texi
deleted file mode 100644 (file)
index 95ed9bb..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-@node Postfix
-@unnumbered Integration with Postfix
-
-This section is taken from @url{http://www.postfix.org/nncp_README.html,
-Postfix and UUCP} manual and just replaces UUCP-related calls with NNCP
-ones.
-
-@strong{Setting up a Postfix Internet to NNCP gateway}
-
-Here is how to set up a machine that sits on the Internet and that forwards
-mail to a LAN that is connected via NNCP.
-
-@itemize
-
-@item You need an @ref{nncp-mail} program that extracts the sender
-address from mail that arrives via NNCP, and that feeds the mail into
-the Postfix @command{sendmail} command.
-
-@item Define a @command{pipe(8)} based mail delivery transport for
-delivery via NNCP:
-@verbatim
-/usr/local/etc/postfix/master.cf:
-nncp      unix  -       n       n       -       -       pipe
-          flags=F user=nncp argv=nncp-mail -quiet $nexthop $recipient
-@end verbatim
-
-This runs the @command{nncp-mail} command to place outgoing mail into
-the NNCP queue after replacing @var{$nexthop} by the the receiving NNCP
-node and after replacing @var{$recipient} by the recipients. The
-@command{pipe(8)} delivery agent executes the @command{nncp-mail}
-command without assistance from the shell, so there are no problems with
-shell meta characters in command-line parameters.
-
-@item Specify that mail for @emph{example.com}, should be delivered via
-NNCP, to a host named @emph{nncp-host}:
-
-@verbatim
-/usr/local/etc/postfix/transport:
-    example.com     nncp:nncp-host
-    .example.com    nncp:nncp-host
-@end verbatim
-
-See the @command{transport(5)} manual page for more details.
-
-@item Execute the command @command{postmap /etc/postfix/transport}
-whenever you change the @file{transport} file.
-
-@item Enable @file{transport} table lookups:
-
-@verbatim
-/usr/local/etc/postfix/main.cf:
-    transport_maps = hash:$config_directory/transport
-@end verbatim
-
-@item Add @emph{example.com} to the list of domains that your site is
-willing to relay mail for.
-
-@verbatim
-/usr/local/etc/postfix/main.cf:
-    relay_domains = example.com ...other relay domains...
-@end verbatim
-
-See the @option{relay_domains} configuration parameter description for
-details.
-
-@item Execute the command @command{postfix reload} to make the changes
-effective.
-
-@end itemize
-
-@strong{Setting up a Postfix LAN to NNCP gateway}
-
-Here is how to relay mail from a LAN via NNCP to the Internet.
-
-@itemize
-
-@item You need an @ref{nncp-mail} program that extracts the sender
-address from mail that arrives via NNCP, and that feeds the mail into
-the Postfix @command{sendmail} command.
-
-@item Specify that all remote mail must be sent via the @command{nncp}
-mail transport to your NNCP gateway host, say, @emph{nncp-gateway}:
-
-@verbatim
-/usr/local/etc/postfix/main.cf:
-    relayhost = nncp-gateway
-    default_transport = nncp
-@end verbatim
-
-Postfix 2.0 and later also allows the following more succinct form:
-
-@verbatim
-/usr/local/etc/postfix/main.cf:
-    default_transport = nncp:nncp-gateway
-@end verbatim
-
-@item Define a @command{pipe(8)} based message delivery transport for
-mail delivery via NNCP:
-
-@verbatim
-/usr/local/etc/postfix/master.cf:
-nncp      unix  -       n       n       -       -       pipe
-          flags=F user=nncp argv=nncp-mail -quiet $nexthop $recipient
-@end verbatim
-
-This runs the @command{nncp-mail} command to place outgoing mail into
-the NNCP queue. It substitutes the hostname (@emph{nncp-gateway}, or
-whatever you specified) and the recipients before executing the command.
-The @command{nncp-mail} command is executed without assistance from the
-shell, so there are no problems with shell meta characters.
-
-@item Execute the command @command{postfix reload} to make the changes
-effective.
-
-@end itemize
index e890e3e1ce3d95f5138947bd3e1dc182e1e9c4dd..cebf333e4dbed3139ca41b95dd94450df3c2fd61 100644 (file)
@@ -122,7 +122,8 @@ NNCP поддерживает @ref{Niceness, приоритезацию траф
 передачи пакетов другим узлам.
 
 Представьте, что вы послали два файла узлу @emph{bob}. Вставьте USB
-устройство хранения, подмонтируйте и запустите @ref{nncp-xfer}:
+устройство (SD гораздо предпочтительнее!) хранения, подмонтируйте и
+запустите @ref{nncp-xfer}:
 
 @verbatim
 % nncp-xfer -node bob /media/usbstick
@@ -206,8 +207,8 @@ NNCP поддерживает @ref{Niceness, приоритезацию траф
 выбором. Компьютер без каких-либо модемов, проводных и беспроводных
 сетей. Очевидно, что единственная возможность обмениваться почтой и
 файлами -- использовать физически переносимые устройства хранения типа
-CD-ROM, жёстких дисков, лент и USB накопителей (худший вариант, из-за
-сложности подобных устройств).
+CD-ROM, жёстких дисков, SD, лент и USB накопителей (@strong{худший}
+вариант, из-за сложности подобных устройств).
 
 Предполагаем что у вас есть ещё один собственный узел, стоящий "до"
 безопасного, который делает базовые проверки полученных накопителей,
index 7aa807fc062a285cbd880c7f1eee3c3e107722f2..81af4bbcfc8c1e5fa62422dd76adac1332aa6510 100644 (file)
@@ -116,14 +116,14 @@ choice. Just send files as shown in previous section, but use removable
 media for transferring packets to other nodes.
 
 Assume that you send two files to @emph{bob} node. Insert USB storage
-device, mount it and run @ref{nncp-xfer}:
+device (SD is preferable!), mount it and run @ref{nncp-xfer}:
 
 @verbatim
 % nncp-xfer -node bob /media/usbstick
 @end verbatim
 
 to copy all outbound packets related to @emph{bob}. Use @option{-mkdir}
-option to create related directory on USB storage if they are missing
+option to create related directory on USB/SD storage if they are missing
 (for example when running for the first time).
 
 If you use single storage device to transfer data both to @emph{bob} and
@@ -195,8 +195,8 @@ If you worry much about security, then air-gapped computer could be the
 only choice you can afford. Computer without any modems, wired and
 wireless networks. Obviously the only possibility to exchange mail and
 files is to use physically removable storage devices like CD-ROM, hard
-drive, tape and USB flash drives (worst choice, due to those devices
-complexity).
+drive, SD, tape and USB flash drives (@strong{worst} choice, due to
+those devices complexity).
 
 Presumably you have got another own hop before that computer: another
 intermediate node which performs basic verification of retrieved storage
index afaecd10cb812c239d53d6abc8039bec83cf319b..fafb226f3c733a81b307eedaed226f1e0f87f6d1 100755 (executable)
@@ -10,7 +10,6 @@ repos="
     src/github.com/davecgh/go-xdr
     src/github.com/dustin/go-humanize
     src/github.com/flynn/noise
-    src/github.com/minio/blake2b-simd
     src/golang.org/x/crypto
     src/golang.org/x/net
     src/golang.org/x/sys
@@ -75,7 +74,7 @@ make -C doc
 ./supplementary_files.sh
 rm -r doc/.well-known doc/nncp.html/.well-known supplementary_files.sh
 
-find . -name .git -type d | xargs rm -fr
+find . -name .git | xargs rm -fr
 find . -name .gitignore -delete
 rm .gitmodules
 
index 7d131213c57c60a57d87fcc25f1b126aa6b17302..22b33138499952702da92323258ec637a56e8ef8 100644 (file)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PORTNAME=      nncp
-PORTVERSION=   0.10
+PORTVERSION=   0.12
 CATEGORIES=    net
 MASTER_SITES=  http://www.nncpgo.org/download/
 
index 2fb4cbb034b47b1c549f92bfda036e6433182a8c..962b240152626e4f9299cb4a9584e47b2797677d 100644 (file)
@@ -98,7 +98,8 @@ func (ctx *Ctx) Toss(nodeId *NodeId, nice uint8, dryRun bool) bool {
                        if err != nil {
                                log.Fatalln(err)
                        }
-                       sendmail := ctx.Neigh[*job.PktEnc.Sender].Sendmail
+                       sender := ctx.Neigh[*job.PktEnc.Sender]
+                       sendmail := sender.Sendmail
                        if len(sendmail) == 0 {
                                ctx.LogE("rx", SdsAdd(sds, SDS{"err": "No sendmail configured"}), "")
                                isBad = true
@@ -112,6 +113,7 @@ func (ctx *Ctx) Toss(nodeId *NodeId, nice uint8, dryRun bool) bool {
                                                strings.Split(recipients, " ")...,
                                        )...,
                                )
+                               cmd.Env = append(cmd.Env, "NNCP_SENDER=" + sender.Id.String())
                                cmd.Stdin = decompressor
                                if err = cmd.Run(); err != nil {
                                        ctx.LogE("rx", SdsAdd(sds, SDS{"err": err}), "sendmail")
index 259d2a102b871d17f30e3cd9881a642961a1e486..79e699ccd02f240a1f1fbbdcee7e64c1c12e41aa 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 259d2a102b871d17f30e3cd9881a642961a1e486
+Subproject commit 79e699ccd02f240a1f1fbbdcee7e64c1c12e41aa
index 01cefa3e208b7260892d831b38b44bdbfd0f9f26..fc3a9f3b3c4fba0af38ac409e8867672499d26e4 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 01cefa3e208b7260892d831b38b44bdbfd0f9f26
+Subproject commit fc3a9f3b3c4fba0af38ac409e8867672499d26e4
diff --git a/src/github.com/minio/blake2b-simd b/src/github.com/minio/blake2b-simd
deleted file mode 160000 (submodule)
index 3f5f724..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 3f5f724cb5b182a5c278d6d3d55b40e7f8c2efb4
index eb71ad9bd329b5ac0fd0148dd99bd62e8be8e035..9419663f5a44be8b34ca85f08abc5fe1be11f8a3 160000 (submodule)
@@ -1 +1 @@
-Subproject commit eb71ad9bd329b5ac0fd0148dd99bd62e8be8e035
+Subproject commit 9419663f5a44be8b34ca85f08abc5fe1be11f8a3
index 1c05540f6879653db88113bc4a2b70aec4bd491f..a04bdaca5b32abe1c069418fb7088ae607de5bd0 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 1c05540f6879653db88113bc4a2b70aec4bd491f
+Subproject commit a04bdaca5b32abe1c069418fb7088ae607de5bd0
index 43e60d72a8e2bd92ee98319ba9a384a0e9837c08..ebfc5b4631820b793c9010c87fd8fef0f39eb082 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 43e60d72a8e2bd92ee98319ba9a384a0e9837c08
+Subproject commit ebfc5b4631820b793c9010c87fd8fef0f39eb082