VERSION | 2 +- doc/about.ru.texi | 6 +++--- doc/about.texi | 2 +- doc/cfg.texi | 4 +++- doc/download.texi | 6 +++++- doc/index.texi | 4 ++-- doc/integration.texi | 335 +++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/news.ru.texi | 7 +++++++ doc/news.texi | 7 +++++++ doc/postfix.texi | 115 ----------------------------------------------------- doc/usecases.ru.texi | 7 ++++--- doc/usecases.texi | 8 ++++---- makedist.sh | 3 +-- ports/nncp/Makefile | 2 +- src/cypherpunks.ru/nncp/toss.go | 4 +++- diff --git a/VERSION b/VERSION index 4d90dd0d86e1583e51d6ec173213f5d38c5190f7222fdc6e90a169291afdb078..1fc2c3042a1c37ef05fabbbcdd5189b558aea8c8c73b124e00026c96ff597b80 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.11 +0.12 diff --git a/doc/about.ru.texi b/doc/about.ru.texi index b7c2fa27ca5ab805a33eae1bb35b33b2c05393cb70f65ae248b92a733fe8aa19..5c3c4294e7f485b82632aaa6bdb45e456d90b69965a608ac3b61b260df9f3183 100644 --- a/doc/about.ru.texi +++ b/doc/about.ru.texi @@ -34,9 +34,9 @@ копилефт} @url{https://www.gnu.org/philosophy/free-sw.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} серверами. +Единственный конфигурационный @url{http://yaml.org/, YAML} файл. Зачем создавать ещё одно решение с принципом сохранить-и-переслать когда уже существуют UUCP, FTN и даже SMTP? Посмотрите @ref{Сравнение, сравнение}! diff --git a/doc/about.texi b/doc/about.texi index b7f824692c4c40215120a1b96d906548842437cf09d45698c30bc5d0dd9f67b3..df307fb80d590ba410d88584e120498715fbef80f366fc2c16dbd5434cfeb5d2 100644 --- a/doc/about.texi +++ b/doc/about.texi @@ -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. diff --git a/doc/cfg.texi b/doc/cfg.texi index 09f2f4a75a91edb21419fe4be9662d35f5a495f7c3c8ee42aff571827c1079f8..acde3bcb2ea8c781594e678b0816495eee92894898652c8dd60245ffc8a2613a 100644 --- a/doc/cfg.texi +++ b/doc/cfg.texi @@ -89,7 +89,9 @@ @anchor{CfgSendmail} @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 diff --git a/doc/download.texi b/doc/download.texi index 4a8d4cdde97e4eb6fa84bb61e82d64309205a8c9a96e94cf1ed84739c51d54b5..529a1c4d6e578f0898cc7aca166d53e89c2a144a998708c9f96b3201805a7ef5 100644 --- a/doc/download.texi +++ b/doc/download.texi @@ -9,12 +9,12 @@ @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 @@ -22,6 +22,10 @@ @end multitable @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} diff --git a/doc/index.texi b/doc/index.texi index aa572025b6891c6cdb9d06c447d986d7abb54177899cb941743f1bd480cab1cf..2da192df8b2dee68a15c0d3c45626d50a5b345b613a4641d5308a4b54822d159 100644 --- a/doc/index.texi +++ b/doc/index.texi @@ -33,7 +33,7 @@ * Информация на русском: Русский. * Installation:: * Configuration:: * Call configuration: Call. -* Integration with Postfix: Postfix. +* Integration:: * Commands:: * Niceness:: * Chunked files: Chunked. @@ -55,7 +55,7 @@ @include russian.texi @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 index 0000000000000000000000000000000000000000..1223b606610932f02c6d24e80726a1fc6ed8747940aa67c5613b7e64a154b8b6 --- /dev/null +++ b/doc/integration.texi @@ -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 diff --git a/doc/news.ru.texi b/doc/news.ru.texi index a842a6906182c1b5c9ab9050671160e067bb25983abdba3079891f5684768af6..ba95e3abc774910bef8faef81da11954b2ca82eb99b89edbf691d32fa4d2e167 100644 --- a/doc/news.ru.texi +++ b/doc/news.ru.texi @@ -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 diff --git a/doc/news.texi b/doc/news.texi index baf73452de83ca9a928a201044d437f6b1aaafe1899a000db09d43b5dd8d29b3..db2d62cb8288a584843ab69f8f480c127ef4164ff12781d51a7194597e0f2a2d 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -3,6 +3,13 @@ @unnumbered News 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 index 8405043fa90057cfed7dcd924b2294f276aee51f0ae0dcd820e5d68953674819..0000000000000000000000000000000000000000 --- a/doc/postfix.texi +++ /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 diff --git a/doc/usecases.ru.texi b/doc/usecases.ru.texi index e32332812f070e419f6ccc71aacd0594d3691400eaf2df42965c6b8f72f1d721..51f5f247cf60dee737d73637fddb069fe0df37c809515f14c643c296db061665 100644 --- a/doc/usecases.ru.texi +++ b/doc/usecases.ru.texi @@ -122,7 +122,8 @@ показано в предыдущем разделе, но используйте переносные накопители для передачи пакетов другим узлам. Представьте, что вы послали два файла узлу @emph{bob}. Вставьте USB -устройство хранения, подмонтируйте и запустите @ref{nncp-xfer}: +устройство (SD гораздо предпочтительнее!) хранения, подмонтируйте и +запустите @ref{nncp-xfer}: @verbatim % nncp-xfer -node bob /media/usbstick @@ -206,8 +207,8 @@ воздушным зазором} может будет вашим единственным позволительным выбором. Компьютер без каких-либо модемов, проводных и беспроводных сетей. Очевидно, что единственная возможность обмениваться почтой и файлами -- использовать физически переносимые устройства хранения типа -CD-ROM, жёстких дисков, лент и USB накопителей (худший вариант, из-за -сложности подобных устройств). +CD-ROM, жёстких дисков, SD, лент и USB накопителей (@strong{худший} +вариант, из-за сложности подобных устройств). Предполагаем что у вас есть ещё один собственный узел, стоящий "до" безопасного, который делает базовые проверки полученных накопителей, diff --git a/doc/usecases.texi b/doc/usecases.texi index 12ca9bbc084eb58527accc0fa0100cedaa7ae210dd06c02854c872e86f7bd57b..aefcfb3b6f679158e7d3a645a2d3f6b4bc322fa27830f6031b20aeb40549f8d2 100644 --- a/doc/usecases.texi +++ b/doc/usecases.texi @@ -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 diff --git a/makedist.sh b/makedist.sh index 30fbc9f9c4a64544d2c6272eb1c01c088150d63f79d56c86d4bc1e2c203ed2c9..75bd97527c791b216c2992a23b21dd7d90a50315a5ed5de78817504194345c51 100755 --- a/makedist.sh +++ b/makedist.sh @@ -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 diff --git a/ports/nncp/Makefile b/ports/nncp/Makefile index bef9591dc4e714960b9639570a0d71528266fdce74c8686bdc082d5a2c8d7457..c34a535d9fddd8de26e21dbd89ea10e4d44eaca1651913d804eb7879c7853108 100644 --- a/ports/nncp/Makefile +++ b/ports/nncp/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= nncp -PORTVERSION= 0.10 +PORTVERSION= 0.12 CATEGORIES= net MASTER_SITES= http://www.nncpgo.org/download/ diff --git a/src/cypherpunks.ru/nncp/toss.go b/src/cypherpunks.ru/nncp/toss.go index adb2139accb679fef5832b9790726f0343b22ddef4445a176fc4c9b685d316ad..70a767da249861ae63d54cb5d3bca0b09fd9cde9f7ffbd53b8c187b54294b4be 100644 --- a/src/cypherpunks.ru/nncp/toss.go +++ b/src/cypherpunks.ru/nncp/toss.go @@ -98,7 +98,8 @@ decompressor, err := zlib.NewReader(pipeR) 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 @@ sendmail[1:len(sendmail)], 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")