README | 2 -- README.RU | 2 -- VERSION | 2 +- doc/cmds.texi | 1 + doc/contacts.texi | 4 +--- doc/download.texi | 6 ++++-- doc/install.texi | 2 +- doc/integration.texi | 2 +- doc/integrity.texi | 2 +- doc/news.ru.texi | 8 ++++++++ doc/news.texi | 7 +++++++ doc/platforms.texi | 42 +++++++++++++++--------------------------- doc/sources.texi | 16 ++++++++++++++++ makedist.sh | 5 +---- ports/nncp/Makefile | 2 +- src/cypherpunks.ru/nncp/cmd/nncp-exec/main.go | 13 +------------ src/cypherpunks.ru/nncp/cmd/nncp-file/main.go | 12 +----------- src/cypherpunks.ru/nncp/cmd/nncp-freq/main.go | 12 +----------- src/cypherpunks.ru/nncp/via.go | 44 ++++++++++++++++++++++++++++++++++++++++++++ diff --git a/README b/README index 946dc2ff08c5cff3582d560152b31dcd85f9122ac21b67c99fea942cd4179311..9d5db5e404a5adf39db249a4afab5dec123345fe224f0edcb2d413be4b7bc543 100644 --- a/README +++ b/README @@ -19,8 +19,6 @@ conditions. It should work on all POSIX-compatible systems. Easy integration with existing SMTP servers. Single YAML configuration file. Home page: http://www.nncpgo.org/ -Also available as I2P service: -http://ryeyslcg6oajmyruje3weqayepze5e5oglxndhkavzfatgnxcd7q.b32.i2p/ Please send questions regarding the use of NNCP, bug reports and patches to nncp-devel mailing list: diff --git a/README.RU b/README.RU index 73e844ba5b53dd4b5a4c830b4336a3639a69f9cf656f631975b6eb2d3f0bd4ba..dafde9c98875bd17d88a4de6269d0f93ad0fbe390f24339824c8f5bbc070e7f6 100644 --- a/README.RU +++ b/README.RU @@ -24,8 +24,6 @@ системах. Лёгкая интеграция с существующими SMTP серверами. Единственный конфигурационный YAML файл. Домашняя страница: http://www.nncpgo.org/ -Также доступная как I2P сервис: -http://ryeyslcg6oajmyruje3weqayepze5e5oglxndhkavzfatgnxcd7q.b32.i2p/ Пожалуйста все вопросы касающиеся использования NNCP, отчёты об ошибках и патчи отправляйте в nncp-devel почтовую рассылку: diff --git a/VERSION b/VERSION index a233cfcdb584133924ee353c0e37f95386fd922c8fe14b78fef107e3d103bae5..eac7f115ab4ad1209330f28ff2c5bc44db822d0dd059bf1863830486cb93ffd4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0 +3.1 diff --git a/doc/cmds.texi b/doc/cmds.texi index 2d3b9d17af4d0c179120b8bdb630b3d8bfb3a4eeb9659b05c8dbb88ed64c9f16..5aae007cb1d65205547250e43b141b07a808b53300a33dcca20a4005f6728eb3 100644 --- a/doc/cmds.texi +++ b/doc/cmds.texi @@ -27,6 +27,7 @@ Process only single specified node. @item -via Override @ref{CfgVia, via} configuration option for destination node. Specified nodes must be separated with comma: @verb{|NODE1,NODE2|}. + With @verb{|-via -|} you can disable relaying at all. @item -spool Override path to spool directory. May be specified by @env{NNCPSPOOL} environment variable. diff --git a/doc/contacts.texi b/doc/contacts.texi index 8e6e8076bcac60702ccfabcb44b6ecbec1445e9ea2cedfc455c2e79158bc327e..6e0969825a3060beefa8b3e565f5ef638ff708324afbb656363eb095d7c27827 100644 --- a/doc/contacts.texi +++ b/doc/contacts.texi @@ -5,6 +5,4 @@ Please send questions regarding the use of NNCP, bug reports and patches to @url{https://lists.cypherpunks.ru/pipermail/nncp-devel/, nncp-devel} mailing list. Announcements also go to this mailing list. -Official website is @url{http://www.nncpgo.org/}, also available as -@url{https://geti2p.net/en/, I2P} service -@url{http://ryeyslcg6oajmyruje3weqayepze5e5oglxndhkavzfatgnxcd7q.b32.i2p/}. +Official website is @url{http://www.nncpgo.org/}. diff --git a/doc/download.texi b/doc/download.texi index cc2c0c70ccfc3e73e90fcd12011f427209cdc818ccfad0a833739137c5edec88..b914cff9297fad610997a5ee19c0181786dd888f36983e72b9fd6283676f8efa 100644 --- a/doc/download.texi +++ b/doc/download.texi @@ -23,6 +23,10 @@ @multitable {XXXXX} {XXXX KiB} {link sign} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} @headitem Version @tab Size @tab Tarball @tab SHA256 checksum +@item @ref{Release 3.0, 3.0} @tab 993 KiB +@tab @url{download/nncp-3.0.tar.xz, link} @url{download/nncp-3.0.tar.xz.sig, sign} +@tab @code{248B2257 2F576E79 A19672E9 B82EB649 18FC95A9 194408C0 67EA4DD3 0468286D} + @item @ref{Release 2.0, 2.0} @tab 986 KiB @tab @url{download/nncp-2.0.tar.xz, link} @url{download/nncp-2.0.tar.xz.sig, sign} @tab @code{BEF31B13 FB25381E A511FB77 067798AB 27409238 BDF5600F E2EADB29 E5E78996} @@ -81,5 +85,3 @@ @tab @url{download/nncp-0.1.tar.xz, link} @url{download/nncp-0.1.tar.xz.sig, sign} @tab @code{8F71D65B 70865EBF FE802CDF A5C14D00 A9FD6559 FD722E60 5D97E82C 5E2412C2} @end multitable - -Also you can try its @ref{Contacts, .i2p} version. diff --git a/doc/install.texi b/doc/install.texi index c9e6e643f73fdc09a8bd9c7ecf8e5b9b3476b447aa4a77c02c5bd45d06af85b8..33eba0bbd29f1dafa6cadb5fa71331435f38a1e2af3b373e289380ba68ca768f 100644 --- a/doc/install.texi +++ b/doc/install.texi @@ -4,8 +4,8 @@ Possibly NNCP package already exists for your distribution: @itemize -@item @url{https://github.com/voidlinux/void-packages/blob/master/srcpkgs/nncp/template, Void Linux} @item @url{https://www.freshports.org/net/nncp/, FreeBSD ports} +@item @url{https://github.com/voidlinux/void-packages/blob/master/srcpkgs/nncp/template, Void Linux} @end itemize NNCP should run on any POSIX-compatible operating system. diff --git a/doc/integration.texi b/doc/integration.texi index 8b5bcb4affce756d7f35af8ac6291f9b0cd5e8a58bc1c9e3166a54bd18941226..7d9ec9d660231a1639135aad7973ef2ecb8d8f3a06f45ec71dad8c148a856b5a 100644 --- a/doc/integration.texi +++ b/doc/integration.texi @@ -17,7 +17,7 @@ @node Postfix @section Integration with Postfix -This section is taken from @url{http://www.postfix.org/nncp_README.html, +This section is taken from @url{http://www.postfix.org/UUCP_README.html, Postfix and UUCP} manual and just replaces UUCP-related calls with NNCP ones. diff --git a/doc/integrity.texi b/doc/integrity.texi index 88b3ff3110c79fb90025337d42fffafc2ab98927d5243a331996cf856d37cf1f..409df9651861c4cc7aed1362fc09698e26b0f995bb22f556b29d95ad3910559f 100644 --- a/doc/integrity.texi +++ b/doc/integrity.texi @@ -33,5 +33,5 @@ @end itemize Then you could verify tarballs signature: @verbatim -% gpg --verify nncp-0.1.tar.xz.sig nncp-0.1.tar.xz +% gpg --verify nncp-3.1.tar.xz.sig nncp-3.1.tar.xz @end verbatim diff --git a/doc/news.ru.texi b/doc/news.ru.texi index 372f15d2e76d3d1cd3da7443247efdb294828ee7cc7d771e2110b281ac6a787b..6d2d4f0e1213d163bc8c04ecbc515f277e3702d0ade5b55ae2b46a2901a89209 100644 --- a/doc/news.ru.texi +++ b/doc/news.ru.texi @@ -1,6 +1,14 @@ @node Новости @section Новости +@node Релиз 3.1 +@subsection Релиз 3.1 +@itemize +@item +Возможность отключать пересылку через промежуточные ноды используя +@verb{|-via -|} опцию командной строки. +@end itemize + @node Релиз 3.0 @subsection Релиз 3.0 @itemize diff --git a/doc/news.texi b/doc/news.texi index 140f5b3fece0549f2240fe70daa9cc90f7f16daf60f56ba4270feb7787aefb5c..16aa63237c348bedff88475624f64db1ef3db799b0e1302a3ae339fef058c1aa 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -3,6 +3,13 @@ @unnumbered News See also this page @ref{Новости, on russian}. +@node Release 3.1 +@section Release 3.1 +@itemize +@item +Ability to disable relaying at all using @verb{|-via -|} command line option. +@end itemize + @node Release 3.0 @section Release 3.0 @itemize diff --git a/doc/platforms.texi b/doc/platforms.texi index 523b68dd5aa8099e8d69b7b9e6943ea28ca26c48e6eacd60684c10a15927cb99..3ca9283520a32f18d5fb255fcd40cfab1925c1fdda47b2c3f916c40eef79fba6 100644 --- a/doc/platforms.texi +++ b/doc/platforms.texi @@ -4,31 +4,19 @@ @node General @subsection General installation instructions -@verbatim -% wget http://www.nncpgo.org/download/nncp-0.1.tar.xz -% wget http://www.nncpgo.org/download/nncp-0.1.tar.xz.sig -% gpg --verify nncp-0.1.tar.xz.sig nncp-0.1.tar.xz -% tar xf nncp-0.1.tar.xz -% make -C nncp-0.1 all -@end verbatim - -There is @command{install} target respecting @env{DESTDIR}. It will -install binaries and info-documentation. - -@node FreeBSD -@subsection FreeBSD installation instructions - Look @ref{Integrity, here} for finding public keys for tarball authentication. @verbatim -# pkg install go +% 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 -follow @ref{General, general} installation instructions - -@verbatim -# make -C nncp-0.1 install -@end verbatim +There is @command{install} target respecting @env{DESTDIR}. It will +install binaries and info-documentation. @node Ubuntu @subsection Ubuntu installation instructions @@ -45,19 +33,19 @@ follow @ref{General, general} installation instructions @verbatim -# make -C nncp-0.1 install PREFIX=/usr +# make -C nncp-3.1 install PREFIX=/usr @end verbatim @item Ubuntu 14.04 @verbatim # apt-get install golang-1.6 -% wget http://www.nncpgo.org/download/nncp-0.1.tar.xz -% wget http://www.nncpgo.org/download/nncp-0.1.tar.xz.sig -% gpg --verify nncp-0.1.tar.xz.sig nncp-0.1.tar.xz -% tar xf nncp-0.1.tar.xz -% PATH=/usr/lib/go-1.6/bin:$PATH make -C nncp-0.1 all -# make -C nncp-0.1 install PREFIX=/usr +% 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 @end table diff --git a/doc/sources.texi b/doc/sources.texi index f2b8eb666866107b09d6e13f452e84caab85d101a0aaaf2c4ea5b7d0dcf4ab31..8ca726370adbfcfe630c099b0058d76f4c7823b1dd973211d339c4fe15a4c648 100644 --- a/doc/sources.texi +++ b/doc/sources.texi @@ -16,3 +16,19 @@ % cd nncp % git checkout develop % git submodule update --init @end verbatim + +Also there is mirror of dependent libraries for safety if their native +repositories will be unavailable (they are seldom updated): + +@multitable @columnfractions .50 .50 +@headitem Software/library @tab Mirror +@item @code{github.com/davecgh/go-xdr} @tab @url{git://git.cypherpunks.ru/go-xdr.git} +@item @code{github.com/dustin/go-humanize} @tab @url{git://git.cypherpunks.ru/go-humanize.git} +@item @code{github.com/flynn/noise} @tab @url{git://git.cypherpunks.ru/noise.git} +@item @code{github.com/gorhill/cronexpr} @tab @url{git://git.cypherpunks.ru/cronexpr.git} +@item @code{golang.org/x/crypto} @tab @url{git://git.cypherpunks.ru/crypto.git} +@item @code{golang.org/x/net} @tab @url{git://git.cypherpunks.ru/net.git} +@item @code{golang.org/x/sys} @tab @url{git://git.cypherpunks.ru/sys.git} +@item @code{gopkg.in/check.v1} @tab @url{git://git.cypherpunks.ru/check.git} +@item @code{gopkg.in/yaml.v2} @tab @url{git://git.cypherpunks.ru/yaml.git} +@end multitable diff --git a/makedist.sh b/makedist.sh index ee15af83c94f26347162ef41c6d051130df3267ddb615be9056b9f99f9b249d8..2a96bd9a46bbe9e725c204caf15d69b9c694554108956e0ecdd716dc8eea25bc 100755 --- a/makedist.sh +++ b/makedist.sh @@ -34,6 +34,7 @@ golang.org/x/crypto/blake2s golang.org/x/crypto/chacha20poly1305 golang.org/x/crypto/curve25519 golang.org/x/crypto/ed25519 +golang.org/x/crypto/internal/chacha20 golang.org/x/crypto/nacl golang.org/x/crypto/poly1305 golang.org/x/crypto/salsa20 @@ -124,8 +125,6 @@ ------------------------ >8 ------------------------ NNCP's home page is: http://www.nncpgo.org/ -Also available as I2P service: -http://ryeyslcg6oajmyruje3weqayepze5e5oglxndhkavzfatgnxcd7q.b32.i2p/ Source code and its signature for that version can be found here: @@ -174,8 +173,6 @@ ------------------------ >8 ------------------------ Домашняя страница NNCP: http://www.nncpgo.org/ -Также доступная как I2P сервис: -http://ryeyslcg6oajmyruje3weqayepze5e5oglxndhkavzfatgnxcd7q.b32.i2p/ Коротко об утилитах: http://www.nncpgo.org/Ob-utilitakh.html Исходный код и его подпись для этой версии находятся здесь: diff --git a/ports/nncp/Makefile b/ports/nncp/Makefile index 078575ddd2e4a19789503d7fcbdf6e2a44eab5ee669bf471407a07770330ccd8..77157708c2bc9233f1bdf0b3941cba4aca96743e50ecaf7104318cb5df7745b8 100644 --- a/ports/nncp/Makefile +++ b/ports/nncp/Makefile @@ -1,7 +1,7 @@ # $FreeBSD: head/net/nncp/Makefile 460314 2018-01-29 16:17:45Z yuri $ PORTNAME= nncp -DISTVERSION= 3.0 +DISTVERSION= 3.1 CATEGORIES= net MASTER_SITES= http://www.nncpgo.org/download/ diff --git a/src/cypherpunks.ru/nncp/cmd/nncp-exec/main.go b/src/cypherpunks.ru/nncp/cmd/nncp-exec/main.go index 4bdc2490c28fee082b9fd9f2d5334635d8b4b97512bd6f26545e840eea65d270..38262f09e937d8a2d95bc30ccce3b866ed07abcb9c0e61adceb9d6ec15a9fe7c 100644 --- a/src/cypherpunks.ru/nncp/cmd/nncp-exec/main.go +++ b/src/cypherpunks.ru/nncp/cmd/nncp-exec/main.go @@ -26,7 +26,6 @@ "fmt" "io/ioutil" "log" "os" - "strings" "cypherpunks.ru/nncp" ) @@ -88,17 +87,7 @@ if err != nil { log.Fatalln("Invalid NODE specified:", err) } - if *viaOverride != "" { - vias := make([]*nncp.NodeId, 0, strings.Count(*viaOverride, ",")+1) - for _, via := range strings.Split(*viaOverride, ",") { - foundNodeId, err := ctx.FindNode(via) - if err != nil { - log.Fatalln("Invalid Via node specified:", err) - } - vias = append(vias, foundNodeId.Id) - } - node.Via = vias - } + nncp.ViaOverride(*viaOverride, ctx, node) body, err := ioutil.ReadAll(bufio.NewReader(os.Stdin)) if err != nil { diff --git a/src/cypherpunks.ru/nncp/cmd/nncp-file/main.go b/src/cypherpunks.ru/nncp/cmd/nncp-file/main.go index 2b7244f7f8a7b8312b15e48e086701e08f866ee95d75df5e49e07672c04d36ee..d968bd12a35378e051f7714c123b5302302c55a95bb55a484a776fbe717392eb 100644 --- a/src/cypherpunks.ru/nncp/cmd/nncp-file/main.go +++ b/src/cypherpunks.ru/nncp/cmd/nncp-file/main.go @@ -93,17 +93,7 @@ if err != nil { log.Fatalln("Invalid NODE specified:", err) } - if *viaOverride != "" { - vias := make([]*nncp.NodeId, 0, strings.Count(*viaOverride, ",")+1) - for _, via := range strings.Split(*viaOverride, ",") { - foundNodeId, err := ctx.FindNode(via) - if err != nil { - log.Fatalln("Invalid Via node specified:", err) - } - vias = append(vias, foundNodeId.Id) - } - node.Via = vias - } + nncp.ViaOverride(*viaOverride, ctx, node) var minSize int64 if *argMinSize < 0 { diff --git a/src/cypherpunks.ru/nncp/cmd/nncp-freq/main.go b/src/cypherpunks.ru/nncp/cmd/nncp-freq/main.go index 606e938d8bf6e566a2335d86e8ab2cb3455310ccbe717adb7c6e38fe4bc2e1e2..db7960ea26e7eb43e4c23945809f1153d2ea0075e7aef2c9a17f4557ee672701 100644 --- a/src/cypherpunks.ru/nncp/cmd/nncp-freq/main.go +++ b/src/cypherpunks.ru/nncp/cmd/nncp-freq/main.go @@ -92,17 +92,7 @@ if err != nil { log.Fatalln("Invalid NODE specified:", err) } - if *viaOverride != "" { - vias := make([]*nncp.NodeId, 0, strings.Count(*viaOverride, ",")+1) - for _, via := range strings.Split(*viaOverride, ",") { - foundNodeId, err := ctx.FindNode(via) - if err != nil { - log.Fatalln("Invalid Via node specified:", err) - } - vias = append(vias, foundNodeId.Id) - } - node.Via = vias - } + nncp.ViaOverride(*viaOverride, ctx, node) var dst string if flag.NArg() == 2 { diff --git a/src/cypherpunks.ru/nncp/via.go b/src/cypherpunks.ru/nncp/via.go new file mode 100644 index 0000000000000000000000000000000000000000..cae9e32a767fddee26b070fb363827bbf7d22663898536f4be674785629ecf55 --- /dev/null +++ b/src/cypherpunks.ru/nncp/via.go @@ -0,0 +1,44 @@ +/* +NNCP -- Node to Node copy, utilities for store-and-forward data exchange +Copyright (C) 2016-2018 Sergey Matveev + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +package nncp + +import ( + "log" + "strings" +) + +// Helper function for parsing -via command line option +func ViaOverride(argValue string, ctx *Ctx, node *Node) { + if argValue == "" { + return + } + if argValue == "-" { + node.Via = make([]*NodeId, 0) + return + } + vias := make([]*NodeId, 0, strings.Count(argValue, ",")+1) + for _, via := range strings.Split(argValue, ",") { + foundNodeId, err := ctx.FindNode(via) + if err != nil { + log.Fatalln("Invalid Via node specified:", err) + } + vias = append(vias, foundNodeId.Id) + } + node.Via = vias +}