@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.
Then you could verify tarballs signature:
@verbatim
-% gpg --verify nncp-3.0.tar.xz.sig nncp-3.0.tar.xz
+% gpg --verify nncp-3.1.tar.xz.sig nncp-3.1.tar.xz
@end verbatim
@node Новости
@section Новости
+@node Релиз 3.1
+@subsection Релиз 3.1
+@itemize
+@item
+Возможность отключать пересылку через промежуточные ноды используя
+@verb{|-via -|} опцию командной строки.
+@end itemize
+
@node Релиз 3.0
@subsection Релиз 3.0
@itemize
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
Look @ref{Integrity, here} for finding public keys for tarball authentication.
@verbatim
-% wget http://www.nncpgo.org/download/nncp-3.0.tar.xz
-% wget http://www.nncpgo.org/download/nncp-3.0.tar.xz.sig
-% gpg --verify nncp-3.0.tar.xz.sig nncp-3.0.tar.xz
-% xz -d nncp-3.0.tar.xz
-% tar xf nncp-3.0.tar
-% make -C nncp-3.0 all
+% wget http://www.nncpgo.org/download/nncp-3.1.tar.xz
+% wget http://www.nncpgo.org/download/nncp-3.1.tar.xz.sig
+% gpg --verify nncp-3.1.tar.xz.sig nncp-3.1.tar.xz
+% xz -d nncp-3.1.tar.xz
+% tar xf nncp-3.1.tar
+% make -C nncp-3.1 all
@end verbatim
There is @command{install} target respecting @env{DESTDIR}. It will
follow @ref{General, general} installation instructions
@verbatim
-# make -C nncp-3.0 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-3.0.tar.xz
-% wget http://www.nncpgo.org/download/nncp-3.0.tar.xz.sig
-% gpg --verify nncp-3.0.tar.xz.sig nncp-3.0.tar.xz
-% tar xf nncp-3.0.tar.xz
-% PATH=/usr/lib/go-1.6/bin:$PATH make -C nncp-3.0 all
-# make -C nncp-3.0 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
# $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/
"io/ioutil"
"log"
"os"
- "strings"
"cypherpunks.ru/nncp"
)
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 {
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 {
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 {
--- /dev/null
+/*
+NNCP -- Node to Node copy, utilities for store-and-forward data exchange
+Copyright (C) 2016-2018 Sergey Matveev <stargrave@stargrave.org>
+
+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 <http://www.gnu.org/licenses/>.
+*/
+
+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
+}