]> Cypherpunks.ru repositories - nncp.git/commitdiff
Merge branch 'develop' v7.4.0
authorSergey Matveev <stargrave@stargrave.org>
Mon, 19 Jul 2021 16:51:46 +0000 (19:51 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Mon, 19 Jul 2021 16:51:46 +0000 (19:51 +0300)
25 files changed:
doc/admin.texi
doc/building.texi
doc/call.texi
doc/cfg/index.texi
doc/cfg/neigh.texi
doc/cmd/nncp-toss.texi
doc/download.texi
doc/index.texi
doc/install.texi
doc/integration.texi
doc/multicast.texi
doc/news.ru.texi
doc/news.texi
doc/nncp.html.do
doc/nncp.info.do
doc/pkt/index.texi
doc/russian.texi
doc/usecases.ru.texi
doc/usecases.texi
makedist.sh
ports/nncp/Makefile
src/cmd/nncp-cfgnew/main.go
src/go.sum
src/mcd.go
src/nncp.go

index 7c8420230db141c3bd3ea794d6ed2cd026f99a0f..ff978e6e5ef5bc7ebdfddd6362fe75c2dd9503b8 100644 (file)
@@ -20,6 +20,10 @@ NNCP uses following files/directories you should be aware of:
     Partly transferred files are stored with @file{.part} suffix. And
     possibly they also require cleanup if they are completely lost.
 
+    It can contain @file{.nock} files: fully downloaded, but still not
+    checksummed. Can be checksummed (with @file{.nock} extension removing)
+    with @command{nncp-check -nock}.
+
     Also it can contain @file{.seen} files, that should be cleaned too
     from time to time.
 
@@ -60,8 +64,8 @@ $ echo 'umask: "007"' >> /usr/local/etc/nncp.hjson
 
 @item
     Possibly long running @ref{nncp-daemon}, @ref{nncp-caller},
-    @ref{nncp-toss} daemons. As all software, they can fail and you
-    should place them under some supervisor control.
+    @ref{nncp-toss}, @ref{nncp-check} daemons. As all software, they can
+    fail and you should place them under some supervisor control.
 
     For example you can use @url{http://cr.yp.to/daemontools.html,
     daemontools} for that task to run them under probably existing
index 30376dce8a449b9fa0b65e3155d91772b9c2ffe9..5bb5888367c93bd6931dc446cb6664e24a46c38c 100644 (file)
@@ -17,9 +17,14 @@ $ gpg --verify nncp-@value{VERSION}.tar.xz.sig nncp-@value{VERSION}.tar.xz
 $ xz --decompress --stdout nncp-@value{VERSION}.tar.xz | tar xf -
 $ cd nncp-@value{VERSION}
 $ redo all
-# look for bin/nncp-* binaries (and possibly hjson-cli one)
 @end example
 
+After that you should get various @command{bin/nncp-*} binaries and
+@command{bin/hjson-cli} command (only for your convenience, not
+necessary installation). Documentation for example for
+@command{nncp-bundle} command can be get with
+@command{info doc/nncp.info -n nncp-bundle}.
+
 It uses @url{http://cr.yp.to/redo.html, redo} build system for that
 examples. You can use either dozen of various implementations, or at
 least minimalistic POSIX shell @command{contrib/do} (just replace
index 83f43ea5fe206e9b4dc36a559b32e91be70d2500..3f9076076fd7fb172dfb10e93510b4ee65894f3a 100644 (file)
@@ -14,7 +14,7 @@ calls: [
 
         autotoss: true
         autotoss-doseen: true
-    },
+    }
     {
         cron: "30 * * * SAT,SUN"
         onlinedeadline: 1800
@@ -22,18 +22,18 @@ calls: [
         nice: NORMAL
         rxrate: 10
         txrate: 20
-    },
+    }
     {
         cron: "0 * * * SAT,SUN"
         xx: rx
         addr: lan
-    },
+    }
     {
         cron: "*/5 * * * * * *"
         when-tx-exists: true
         nock: true
         mcd-ignore: true
-    },
+    }
 ]
 @end verbatim
 
index b1261a894ddd7dc8424785001e7869e67d735976..f9844eaff5c962526ec9b496ee128d5a6bb9d16a 100644 (file)
@@ -44,11 +44,11 @@ need to add single key to the @code{neigh} section similar to the "self".
 Whole configuration file can be separated on five sections:
 
 @menu
-* General options: CfgGeneral.
-* Self-node keypairs: CfgSelf.
-* Notifications: CfgNotify.
-* Neighbours: CfgNeigh.
-* Areas: CfgAreas.
+* General options: CfgGeneral
+* Self-node keypairs: CfgSelf
+* Notifications: CfgNotify
+* Neighbours: CfgNeigh
+* Areas: CfgAreas
 
 You can optionally convert it to directory layout
 * Configuration directory::
index 53eed465317da22ac9b18f11d17ab42bfdce3169..ababdf911cc7f574fb2139ea9664864afb91c45c 100644 (file)
@@ -32,7 +32,7 @@ neigh: {
     calls: [
       {
         cron: "*/2 * * * *"
-      },
+      }
     ]
   }
   bob: {
index 703c291f4a529cdb8c2c4cc61b9357114bdb2abf..fe7680160c521d6bb1405121cea5e7f61b73cdc9 100644 (file)
@@ -29,4 +29,4 @@ inbound packets that has been already seen, processed and tossed. This
 is helpful to prevent duplicates.
 
 @option{-nofile}, @option{-nofreq}, @option{-noexec}, @option{-notrns},
-@option{-noarea} options allow to disable any kind of packet types processing.
+@option{-noarea} options allow disabling any kind of packet types processing.
index 808f9daacb9005db9c1bff0ec9cb11c412e74f64..54c5217266eeeef33bb2e10270ee6b8f94dd79c1 100644 (file)
@@ -28,6 +28,10 @@ Tarballs include all necessary required libraries:
 @multitable {XXXXX} {XXXX-XX-XX} {XXXX KiB} {link sign} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
 @headitem Version @tab Date @tab Size @tab Tarball @tab SHA256 checksum
 
+@item @ref{Release 7_3_2, 7.3.2} @tab 2021-07-12 @tab 1141 KiB
+@tab @url{download/nncp-7.3.2.tar.xz, link} @url{download/nncp-7.3.2.tar.xz.sig, sign}
+@tab @code{65F6A230 04189D3F 307D160C AE97F99A 620DDA23 52821652 15DDC946 F6CC4B7F}
+
 @item @ref{Release 7_3_1, 7.3.1} @tab 2021-07-11 @tab 1142 KiB
 @tab @url{download/nncp-7.3.1.tar.xz, link} @url{download/nncp-7.3.1.tar.xz.sig, sign}
 @tab @code{8611DC6A 3EAC7FFA A6A1C688 2073AB4D A4E93D36 C864F050 C5F880FE 10FCFC46}
index 000dab98299de5b0af5842b3bcd76892eb4b0792..fb19da8383be91d43a7e9832bf2e456f4e76f4fc 100644 (file)
@@ -17,7 +17,7 @@ A copy of the license is included in the section entitled "Copying conditions".
 @end copying
 
 @node Top
-@top
+@top NNCP
 
 @verbatiminclude pedro.txt
 
@@ -39,27 +39,27 @@ There are also articles about its usage outside this website:
 * Use cases::
 * Workflow::
 * News::
-* Информация на русском: Русский.
+* Информация на русском: Русский
 * Installation::
 * Configuration::
-* Call configuration: Call.
-* Multicast areas: Multicast.
+* Call configuration: Call
+* Multicast areas: Multicast
 * Integration::
 * Commands::
 * Administration::
 * Niceness::
-* Chunked files: Chunked.
+* Chunked files: Chunked
 * Bundles::
-* Spool directory: Spool.
-* Log format: Log.
-* Packet format: Packet.
-* Merkle Tree Hashing: MTH.
-* Sync protocol: Sync.
-* MultiCast Discovery: MCD.
-* EBlob format: EBlob.
+* Spool directory: Spool
+* Log format: Log
+* Packet format: Packet
+* Merkle Tree Hashing: MTH
+* Sync protocol: Sync
+* MultiCast Discovery: MCD
+* EBlob format: EBlob
 * Thanks::
-* Contacts and feedback: Contacts.
-* Copying conditions: Copying.
+* Contacts and feedback: Contacts
+* Copying conditions: Copying
 @end menu
 
 @include comparison.texi
index a8189f18092a1a783371bafe6831ee1d49cd7ce6..722170d39f2ff8b15f63637aa819136bc7ff70e1 100644 (file)
@@ -14,10 +14,10 @@ Possibly NNCP package already exists for your distribution:
 NNCP should run on any POSIX-compatible operating system.
 
 NNCP is written on @url{https://golang.org/, Go} programming language
-and you have to install Go compiler 1.13+ version. @command{Make} (BSD
-and GNU versions are fine) is recommended for convenient building.
-@url{https://www.gnu.org/software/texinfo/, Texinfo} is used for
-building documentation (although tarballs already include it).
+and you have to install Go compiler 1.13+ version.
+@url{http://cr.yp.to/redo.html, redo} build system is recommended for
+convenience. @url{https://www.gnu.org/software/texinfo/, Texinfo} is
+used for building documentation (although tarballs already include it).
 
 In general you must get @ref{Tarballs, the tarball}, check its
 @ref{Integrity, integrity and authenticity} and run @command{make}.
@@ -25,10 +25,10 @@ Look for general and platform-specific @ref{Build-instructions, build
 instructions}.
 
 @menu
-* Prepared tarballs: Tarballs.
-* Tarballs integrity check: Integrity.
-* Build instructions: Build-instructions.
-* Development source code: Sources.
+* Prepared tarballs: Tarballs
+* Tarballs integrity check: Integrity
+* Build instructions: Build-instructions
+* Development source code: Sources
 @end menu
 
 @include download.texi
index 2c24c19fad9db83859b786e5f90a65d99f967f19..b7fa15f843dce8f7624b33d86e7a8dbc029464a2 100644 (file)
@@ -5,15 +5,15 @@ Here is some examples of how you can solve popular tasks with NNCP,
 making them store-and-forward friendly.
 
 @menu
-* Index files for freqing: FreqIndex.
+* Index files for freqing: FreqIndex
 * Postfix::
 * Exim::
-* Web feeds: Feeds.
-* Web pages: WARCs.
-* BitTorrent and huge files: BitTorrent.
-* Downloading service: DownloadService.
+* Web feeds: Feeds
+* Web pages: WARCs
+* BitTorrent and huge files: BitTorrent
+* Downloading service: DownloadService
 * Git::
-* Multimedia streaming: Multimedia.
+* Multimedia streaming: Multimedia
 @end menu
 
 @node FreqIndex
index 36e8bf9d53390523881d81337294c1e9105cf658..15554f28451af6cd19c862c35adc505ad96bdf48 100644 (file)
@@ -10,7 +10,7 @@ networks).
 Each multicast group is identified by so-called @strong{area}. Area
 consists of private/public Curve25519 keypairs for @ref{Encrypted area,
 packets encryption}, identity (BLAKE2b-256 hash of the public key) and
-possible subscribers.
+possible subscribers. Areas are created with @ref{nncp-cfgnew} command.
 
 You can make either file or exec transmissions to the areas. Those
 ordinary file/exec packets are double wrapped in:
index 47aff54c5ccd967782be0eb09b08a9db6a5d3218..8d0bca9c0c072d2782cda1f739d09cf233df277d 100644 (file)
@@ -1,59 +1,15 @@
 @node Новости
 @section Новости
 
-@menu
-* Релиз 7.3.2::
-* Релиз 7.3.1::
-* Релиз 7.3.0::
-* Релиз 7.2.1::
-* Релиз 7.2.0::
-* Релиз 7.1.1::
-* Релиз 7.1.0::
-* Релиз 7.0.0::
-* Релиз 6.6.0::
-* Релиз 6.5.0::
-* Релиз 6.4.0::
-* Релиз 6.3.0::
-* Релиз 6.2.1::
-* Релиз 6.2.0::
-* Релиз 6.1.0::
-* Релиз 6.0.0::
-* Релиз 5.6.0::
-* Релиз 5.5.1::
-* Релиз 5.5.0::
-* Релиз 5.4.1::
-* Релиз 5.4.0::
-* Релиз 5.3.3::
-* Релиз 5.3.2::
-* Релиз 5.3.1::
-* Релиз 5.3.0::
-* Релиз 5.2.1::
-* Релиз 5.2.0::
-* Релиз 5.1.2::
-* Релиз 5.1.1::
-* Релиз 5.1.0::
-* Релиз 5.0.0::
-* Релиз 4.1::
-* Релиз 4.0::
-* Релиз 3.4::
-* Релиз 3.3::
-* Релиз 3.2::
-* Релиз 3.1::
-* Релиз 3.0::
-* Релиз 2.0::
-* Релиз 1.0::
-* Релиз 0.12::
-* Релиз 0.11::
-* Релиз 0.10::
-* Релиз 0.9::
-* Релиз 0.8::
-* Релиз 0.7::
-* Релиз 0.6::
-* Релиз 0.5::
-* Релиз 0.4::
-* Релиз 0.3::
-* Релиз 0.2::
-@end menu
+@node Релиз 7.4.0
+@subsection Релиз 7.4.0
+@itemize
+
+@item
+Исправлена работоспособность MCD при одновременном использовании
+@command{nncp-daemon} и @command{nncp-caller}.
+
+@end itemize
 
 @node Релиз 7.3.2
 @subsection Релиз 7.3.2
index 2d5ad81607a2ab81464b8075dd151156119df4c3..c9106f8c7b52b049abbec7ad649a60e4ba3644d1 100644 (file)
@@ -3,59 +3,14 @@
 
 See also this page @ref{Новости, on russian}.
 
-@menu
-* Release 7.3.2: Release 7_3_2.
-* Release 7.3.1: Release 7_3_1.
-* Release 7.3.0: Release 7_3_0.
-* Release 7.2.1: Release 7_2_1.
-* Release 7.2.0: Release 7_2_0.
-* Release 7.1.1: Release 7_1_1.
-* Release 7.1.0: Release 7_1_0.
-* Release 7.0.0: Release 7_0_0.
-* Release 6.6.0: Release 6_6_0.
-* Release 6.5.0: Release 6_5_0.
-* Release 6.4.0: Release 6_4_0.
-* Release 6.3.0: Release 6_3_0.
-* Release 6.2.1: Release 6_2_1.
-* Release 6.2.0: Release 6_2_0.
-* Release 6.1.0: Release 6_1_0.
-* Release 6.0.0: Release 6_0_0.
-* Release 5.6.0: Release 5_6_0.
-* Release 5.5.1: Release 5_5_1.
-* Release 5.5.0: Release 5_5_0.
-* Release 5.4.1: Release 5_4_1.
-* Release 5.4.0: Release 5_4_0.
-* Release 5.3.3: Release 5_3_3.
-* Release 5.3.2: Release 5_3_2.
-* Release 5.3.1: Release 5_3_1.
-* Release 5.3.0: Release 5_3_0.
-* Release 5.2.1: Release 5_2_1.
-* Release 5.2.0: Release 5_2_0.
-* Release 5.1.2: Release 5_1_2.
-* Release 5.1.1: Release 5_1_1.
-* Release 5.1.0: Release 5_1_0.
-* Release 5.0.0: Release 5_0_0.
-* Release 4.1: Release 4_1.
-* Release 4.0: Release 4_0.
-* Release 3.4: Release 3_4.
-* Release 3.3: Release 3_3.
-* Release 3.2: Release 3_2.
-* Release 3.1: Release 3_1.
-* Release 3.0: Release 3_0.
-* Release 2.0: Release 2_0.
-* Release 1.0: Release 1_0.
-* Release 0.12: Release 0_12.
-* Release 0.11: Release 0_11.
-* Release 0.10: Release 0_10.
-* Release 0.9: Release 0_9.
-* Release 0.8: Release 0_8.
-* Release 0.7: Release 0_7.
-* Release 0.6: Release 0_6.
-* Release 0.5: Release 0_5.
-* Release 0.4: Release 0_4.
-* Release 0.3: Release 0_3.
-* Release 0.2: Release 0_2.
-@end menu
+@node Release 7_4_0
+@section Release 7.4.0
+@itemize
+
+@item
+Fixed simultaneous @command{nncp-daemon} and @command{nncp-caller} MCD work.
+
+@end itemize
 
 @node Release 7_3_2
 @section Release 7.3.2
index 2a123c4c4fc8fce1d138ca5110e21d806a25a5d3..6ef5085ac3c40eea2b876d728903267bcd4ca596 100644 (file)
@@ -3,6 +3,5 @@ MAKEINFO_OPTS="$MAKEINFO_OPTS --html --css-include style.css"
 MAKEINFO_OPTS="$MAKEINFO_OPTS --set-customization-variable FORMAT_MENU=menu"
 MAKEINFO_OPTS="$MAKEINFO_OPTS --set-customization-variable SHOW_TITLE=0"
 MAKEINFO_OPTS="$MAKEINFO_OPTS --set-customization-variable DATE_IN_HEADER=1"
-MAKEINFO_OPTS="$MAKEINFO_OPTS --set-customization-variable TOP_NODE_UP_URL=index.html"
 MAKEINFO_OPTS="$MAKEINFO_OPTS" . nncp.info.do
 cp -r .well-known $3
index 6eb4e48e4e8d4c6e828814183d8b76d2fd6c7935..e33623878f1e887ef24704e5450e1a13ef6cd7e5 100644 (file)
@@ -1,8 +1,18 @@
-redo-ifchange ../config ../VERSION *.texi sp.plantuml.txt pedro.txt
+redo-ifchange \
+    ../config \
+    ../VERSION \
+    *.texi \
+    cfg/*.texi \
+    cmd/*.texi \
+    pkt/*.texi \
+    sp.plantuml.txt \
+    pedro.txt
 . ../config
 ${MAKEINFO:-makeinfo} \
     -D "VERSION `cat ../VERSION`" \
     $MAKEINFO_OPTS \
+    --set-customization-variable SECTION_NAME_IN_TITLE=1 \
+    --set-customization-variable TREE_TRANSFORMATIONS=complete_tree_nodes_menus \
     --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
     --set-customization-variable OPEN_QUOTE_SYMBOL=\" \
     --output $3 index.texi
index 7d299467eb8112e1833a845dc6053799a76cea18..f19d1ca377fd8dbc5185b9217961427c689ba641 100644 (file)
@@ -5,9 +5,9 @@ All packets are
 @url{https://tools.ietf.org/html/rfc4506, XDR}-encoded structures.
 
 @menu
-* Plain packet: Plain.
-* Encrypted packet: Encrypted.
-* Encrypted area packet: Encrypted area.
+* Plain packet: Plain
+* Encrypted packet: Encrypted
+* Encrypted area packet: Encrypted area
 @end menu
 
 @include pkt/plain.texi
index 6c726683f145fe148ce5471dff247808f76eccda..8be9438e26fa7ada2904467122367a9a69f91f67 100644 (file)
@@ -2,9 +2,9 @@
 @unnumbered Информация на русском
 
 @menu
-* Подробнее об утилитах NNCP: Об утилитах.
-* Сравнение с существующими решениями: Сравнение.
-* Сценарии использования: Сценарии.
+* Подробнее об утилитах NNCP: Об утилитах
+* Сравнение с существующими решениями: Сравнение
+* Сценарии использования: Сценарии
 * Новости::
 @end menu
 
index 8f12cd1da474035cff8efd88f78fbdb7d9515482..860f4013685250d155293f6c4eab4519e917bb72 100644 (file)
@@ -2,18 +2,19 @@
 @section Сценарии использования
 
 @menu
-* Доступность почтового сервера время от времени: UsecaseMailRU.
-* Легковесная и быстрая замена POP3/IMAP4: UsecasePOPRU.
-* Ненадёжный/дорогой канал связи: UsecaseUnreliableRU.
-* Медленная/дорогая связь для больших объёмов данных, плохой QoS: UsecaseQoSRU.
-* Экстремальные наземные окружающие условия, нет связи: UsecaseNoLinkRU.
-* Односторонняя широковещательная связь: UsecaseBroadcastRU.
-* Спутниковые каналы связи: UsecaseSatelliteLinksRU.
-* Частные, изолированные MitM/Sybil-устойчивые сети: UsecaseF2FRU.
-* Высоко защищённые изолированные компьютеры с воздушным зазором: UsecaseAirgapRU.
-* Обход сетевой цензуры, здоровье: UsecaseCensorRU.
-* Разведка, шпионаж, тайная агентура: UsecaseSpyRU.
-* Дешёвая ночная связь: UsecaseCallerRU.
+* Доступность почтового сервера время от времени: UsecaseMailRU
+* Легковесная и быстрая замена POP3/IMAP4: UsecasePOPRU
+* Ненадёжный/дорогой канал связи: UsecaseUnreliableRU
+* Медленная/дорогая связь для больших объёмов данных, плохой QoS: UsecaseQoSRU
+* Экстремальные наземные окружающие условия, нет связи: UsecaseNoLinkRU
+* Односторонняя широковещательная связь: UsecaseBroadcastRU
+* Спутниковые каналы связи: UsecaseSatelliteLinksRU
+* Частные, изолированные MitM/Sybil-устойчивые сети: UsecaseF2FRU
+* Высоко защищённые изолированные компьютеры с воздушным зазором: UsecaseAirgapRU
+* Обход сетевой цензуры, здоровье: UsecaseCensorRU
+* Разведка, шпионаж, тайная агентура: UsecaseSpyRU
+* Дешёвая ночная связь: UsecaseCallerRU
+* Мультивещательная flooding рассылка: UsecaseMulticastRU
 @end menu
 
 @node UsecaseMailRU
@@ -257,6 +258,9 @@ $ nncp-call bob
 пакеты и получить от него. Все прерванные передачи будут автоматически
 возобновлены.
 
+А наличие возможности @ref{MCD, multicast обнаружения} участников сети в
+IPv6 сетях позволяет вообще не возиться с заданием сетевых адресов.
+
 @node UsecaseAirgapRU
 @subsection Высокозащищённые изолированные компьютеры с воздушным зазором
 
@@ -393,21 +397,105 @@ neigh: {
         addr: lan
         nice: MAX
         onlinedeadline: 3600
-      },
+      }
       {
         cron: "*/10 * * * *"
         addr: wan
         nice: PRIORITY
         xx: rx
-      },
+      }
       {
         cron: "*/1 0-7 * * *"
         addr: wan
         nice: BULK
         onlinedeadline: 3600
         maxonlinetime: 3600
-      },
+      }
     ]
   }
 }
 @end verbatim
+
+@node UsecaseMulticastRU
+@subsection Мультивещательная flooding рассылка
+
+Необходимо разослать одно и то же почтовое сообщение или файл многим
+участникам? Например обновления какой либо программы, списка участников
+сети или доступных файлов? Но при этом вы не соединены лично с каждым из
+них:
+
+@verbatim
+   A-------->E---->F    A <-> B C E
+  / \        |\    ^    C <-> H J
+ /   \       |  \  |    E <-> D F G
+v     v      v    \v    D <-> G
+B     C      D---->G    J <-> K
+     / \     ^    /     K <-> D G
+    /   \    |   /
+   v     v   v  /
+   H     J<->K<-
+@end verbatim
+
+В NNCP есть особые @ref{Multicast, мультивещательные} форматы пакетов
+позволяющие организовывать эффективную передачу одно единственного
+пакета сразу нескольким получателям (flooding алгоритм). @strong{A}
+отправляет пакет трём получателям. @strong{C} в свою очередь отсылает
+ещё двум, а @strong{E} трём. Некоторые участники сети получат несколько
+копий одного и того же пакета, как например @strong{D}, @strong{J},
+@strong{G}, @strong{F}, но копии будут просто проигнорированы. Если
+@strong{B} отошлёт пакет единственному ему известному @strong{A}, то
+этот пакет распространится по всей сети подписантов широковещательной
+зоны и дальше.
+
+Более того, мультивещательные пакеты зашифрованы и для прочтения требуют
+знание ключей. Но это не мешает их обрабатывать для дальнейшей пересылки!
+Кроме того, совершенно не обязательно знать ключи отправителя. Таким
+образом можно создать эхоконференцию для передачи файлов или команд
+(например доставки почтовых сообщений).
+
+Создаём ключи для мультивещательной зоны:
+
+@example
+$ nncp-cfgnew -area filelists -nocomments
+areas: @{
+  filelists: @{
+    id: TOU5TKOW4JBIZJBX63D4776C72FMWDAUAUSZNJX4DFOITVYQ5ZQA
+    pub: DSHL5O6BK2R3QKJAIJ7BC4UIGE73EC2LJPOV3VTS44KYOTUQYZLA
+    prv: AYD5FAA4GDDSAD5N65NJLLFS6TG2NSPQ46KAQO5U722JLVG34SOQ
+  @}
+@}
+@end example
+
+и отправляем ключевую пару всем кто может и хочет читать данную зону.
+Посредникам, готовым участвовать в переотправке пакетов подписантам, но
+которым не стоит "читать" пакеты, достаточно отправить только
+идентификатор зоны. Например @strong{A} добавляет себе в конфигурацию:
+
+@example
+areas: @{
+  filelists: @{
+    id: TOU...
+    pub: DSH...
+    prv: AYD...
+    subs: ["B", "C", "E"]
+    incoming: /home/A/areas/filelists
+  @}
+@end example
+
+а @strong{E}, являющимся (как было решено) просто посредником:
+
+@example
+areas: @{
+  filelists: @{
+    id: TOU...
+    subs: ["D", "F", "G"]
+  @}
+@end example
+
+После распространения знания о @code{filelists} мультивещательной зоне
+можно обмениваться @ref{FreqIndex, списками файлов}:
+
+@example
+$ nncp-file tree-of-A-20210715.txt.zst area:filelists:
+$ nncp-toss -node self
+@end example
index 0a42c8a4948ecd04eb01056cce02edf22620fd58..f676e890fbfe4b33240266aec5ecf4e01c4c28f6 100644 (file)
@@ -4,18 +4,19 @@
 See also this page @ref{Сценарии, on russian}.
 
 @menu
-* Occasional connection to mail server: UsecaseMail.
-* Lightweight fast POP3/IMAP4 replacement: UsecasePOP.
-* Unreliable/expensive communication link: UsecaseUnreliable.
-* Slow/expensive link for high-volume data, bad QoS: UsecaseQoS.
-* Extreme terrestrial environments, no link: UsecaseNoLink.
-* One-way broadcasting communications: UsecaseBroadcast.
-* Satellite links: UsecaseSatelliteLinks.
-* Private, isolated MitM/Sybil-resistant networks: UsecaseF2F.
-* Highly secure isolated air-gap computers: UsecaseAirgap.
-* Network censorship bypassing, health: UsecaseCensor.
-* Reconnaissance, spying, intelligence, covert agents: UsecaseSpy.
-* Cheap night transfers: UsecaseCaller.
+* Occasional connection to mail server: UsecaseMail
+* Lightweight fast POP3/IMAP4 replacement: UsecasePOP
+* Unreliable/expensive communication link: UsecaseUnreliable
+* Slow/expensive link for high-volume data, bad QoS: UsecaseQoS
+* Extreme terrestrial environments, no link: UsecaseNoLink
+* One-way broadcasting communications: UsecaseBroadcast
+* Satellite links: UsecaseSatelliteLinks
+* Private, isolated MitM/Sybil-resistant networks: UsecaseF2F
+* Highly secure isolated air-gap computers: UsecaseAirgap
+* Network censorship bypassing, health: UsecaseCensor
+* Reconnaissance, spying, intelligence, covert agents: UsecaseSpy
+* Cheap night transfers: UsecaseCaller
+* Multicast flooding transmission: UsecaseMulticast
 @end menu
 
 @node UsecaseMail
@@ -244,6 +245,9 @@ configuration file) and send all related outbound packets and retrieve
 those the Bob has. All interrupted transfers will be automatically
 resumed.
 
+Ability to do @ref{MCD, multicast nodes discovery} of participant in
+IPv6 networks allows complete ignorance of network addresses specifying.
+
 @node UsecaseAirgap
 @section Highly secure isolated air-gap computers
 
@@ -371,21 +375,103 @@ neigh: {
         addr: lan
         nice: MAX
         onlinedeadline: 3600
-      },
+      }
       {
         cron: "*/10 * * * *"
         addr: wan
         nice: PRIORITY
         xx: rx
-      },
+      }
       {
         cron: "*/1 0-7 * * *"
         addr: wan
         nice: BULK
         onlinedeadline: 3600
         maxonlinetime: 3600
-      },
+      }
     ]
   }
 }
 @end verbatim
+
+@node UsecaseMulticast
+@section Multicast flooding transmission
+
+Do you need to send single mail message or file to many recipients at
+once? For example an update of some program, network participants list
+or available files for freqing? But you are not connected directly to
+each of them?
+
+@verbatim
+   A-------->E---->F    A -> B C E
+  / \        |\    ^    C -> H J
+ /   \       |  \  |    E -> D F G
+v     v      v    \v    D -> G
+B     C      D---->G    J -> K
+     / \     ^    /     K -> D G
+    /   \    |   /
+   v     v   v  /
+   H     J<->K<-
+@end verbatim
+
+NNCP has @ref{Multicast, multicast} packets format, allowing you to
+flood transmission of the single packet to multiple recipients.
+@strong{A} sends packet to three destinations. @strong{C} sends it to
+the two nodes next. @strong{E} sends it to three. Some participants may
+receive multiple copies of the same packet, like @strong{D}, @strong{J},
+@strong{G}, @strong{F}, but that copies will be just ignored. If
+@strong{B} sends packet to single known to him @strong{A}, then that
+packet will be distributed among all other multicast area subscribers.
+
+Moreover those multicast packets are encrypted and require key knowledge
+for reading. But that does not prevent their relaying! Also you are not
+required to know sender's public keys. That way you can easily create
+echo-conferences for files or commands (like mail message delivering)
+transmission.
+
+Let's create keys for the new multicast area:
+
+@example
+$ nncp-cfgnew -area filelists -nocomments
+areas: @{
+  filelists: @{
+    id: TOU5TKOW4JBIZJBX63D4776C72FMWDAUAUSZNJX4DFOITVYQ5ZQA
+    pub: DSHL5O6BK2R3QKJAIJ7BC4UIGE73EC2LJPOV3VTS44KYOTUQYZLA
+    prv: AYD5FAA4GDDSAD5N65NJLLFS6TG2NSPQ46KAQO5U722JLVG34SOQ
+  @}
+@}
+@end example
+
+and send that keypair everybody who wants to read that area.
+For intermediaries willing to relay packets on, but that should not read
+them, you just need to send area's identity. For example @strong{A} adds
+to his configuration:
+
+@example
+areas: @{
+  filelists: @{
+    id: TOU...
+    pub: DSH...
+    prv: AYD...
+    subs: ["B", "C", "E"]
+    incoming: /home/A/areas/filelists
+  @}
+@end example
+
+and @strong{E}, that will be relaying intermediary (as we decided):
+
+@example
+areas: @{
+  filelists: @{
+    id: TOU...
+    subs: ["D", "F", "G"]
+  @}
+@end example
+
+After you distributed the knowledge about @code{nodelist} multicast
+area, you can share @ref{FreqIndex, file lists}:
+
+@example
+$ nncp-file tree-of-A-20210715.txt.zst area:filelists:
+$ nncp-toss -node self
+@end example
index 94f95c9b6487ce2c5c5352e35419086c330dabf5..4fa4796db0fc4e6381268816f10d1c2e08c1339d 100755 (executable)
@@ -104,9 +104,9 @@ perl -i -npe "s/GO test/GO test -mod=vendor/" test.do
 rm makedist.sh VERSION.do
 rm -r .git
 redo-cleanup full
-find . -type d -exec chmod 755 {} \;
-find . -type f -exec chmod 644 {} \;
-find . -type f -name "*.sh" -exec chmod +x {} \;
+find . -type d -exec chmod 755 {} +
+find . -type f -exec chmod 644 {} +
+find . -type f -name "*.sh" -exec chmod +x {} +
 chmod +x contrib/do
 
 cd ..
index c0022f087e2a1734e24dd3e29b43e6447a5bf397..70b6311792ce8f43b267f56dc762cfb9ab99ad0f 100644 (file)
@@ -1,5 +1,5 @@
 PORTNAME=      nncp
-DISTVERSION=   7.3.0
+DISTVERSION=   7.4.0
 CATEGORIES=    net
 MASTER_SITES=  http://www.nncpgo.org/download/
 
index 74f9ae6d430efe84e8829aa8b43755762dbe56c0..30bdaa9077270f686ae0957b4e360424d0808542 100644 (file)
@@ -303,7 +303,7 @@ func main() {
     #   #     autotoss-nofreq: true
     #   #     autotoss-noexec: true
     #   #     autotoss-notrns: true
-    #   #   },
+    #   #   }
     #   # ]
     # }
   }
index cc42083d02bd406bac67980daf299c6e552bb02a..48b6e3b1c18993f95b3e73bb441288149cad0db0 100644 (file)
@@ -31,11 +31,9 @@ golang.org/x/net v0.0.0-20210614182718-04defd469f4e h1:XpT3nA5TvE525Ne3hInMh6+GE
 golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4=
 golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 h1:RqytpXGR1iVNX7psjB3ff8y7sNFinVFvkx1c8SjBkio=
 golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE=
 golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
index be40f42de1edd50f03e0a1bc5d045ce88bf76bb5..60ca6a5521010933c3b62a5cc0dd61bf368fed37 100644 (file)
@@ -176,20 +176,24 @@ func (ctx *Ctx) MCDRx(ifiName string) error {
 }
 
 func (ctx *Ctx) MCDTx(ifiName string, port int, interval time.Duration) error {
-       conn, err := net.DialUDP("udp",
-               &net.UDPAddr{Port: port, Zone: ifiName},
-               &net.UDPAddr{IP: mcdIP, Port: MCDPort, Zone: ifiName},
-       )
+       ifi, err := net.InterfaceByName(ifiName)
+       if err != nil {
+               return err
+       }
+       addr := &net.UDPAddr{IP: mcdIP, Port: port, Zone: ifiName}
+       conn, err := net.ListenMulticastUDP("udp", ifi, addr)
        if err != nil {
                return err
        }
+
+       dst := &net.UDPAddr{IP: mcdIP, Port: MCDPort, Zone: ifiName}
        var buf bytes.Buffer
        mcd := MCD{Magic: MagicNNCPDv1.B, Sender: ctx.Self.Id}
        if _, err := xdr.Marshal(&buf, mcd); err != nil {
                panic(err)
        }
        if interval == 0 {
-               _, err = conn.Write(buf.Bytes())
+               _, err = conn.WriteTo(buf.Bytes(), dst)
                return err
        }
        go func() {
@@ -201,7 +205,7 @@ func (ctx *Ctx) MCDTx(ifiName string, port int, interval time.Duration) error {
                                        ifiName, MCDPort, port,
                                )
                        })
-                       _, err = conn.Write(buf.Bytes())
+                       _, err = conn.WriteTo(buf.Bytes(), dst)
                        if err != nil {
                                ctx.LogE("mcd", les, err, func(les LEs) string {
                                        return fmt.Sprintf("MCD on %s/%d/%d", ifiName, MCDPort, port)
index 67c0ae947db460dfca93867fdcf94698f21dacc3..64489bc27fbe7c9df87b435bfd8458cd95c7578d 100644 (file)
@@ -40,7 +40,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.`
 const Base32Encoded32Len = 52
 
 var (
-       Version string = "7.3.1"
+       Version string = "7.4.0"
 
        Base32Codec *base32.Encoding = base32.StdEncoding.WithPadding(base32.NoPadding)
 )