bin/default.do | 2 +- doc/building.texi | 11 +++++++++-- doc/cfg/general.texi | 19 +++++++++++++++++++ doc/cfg/neigh.texi | 4 ++++ doc/cmd/nncp-call.texi | 5 +++-- doc/cmd/nncp-cfgnew.texi | 5 ++++- doc/cmd/nncp-daemon.texi | 4 ++++ doc/download.texi | 21 +++++++++++++++++++++ doc/index.texi | 4 +++- doc/news.ru.texi | 14 ++++++++++++++ doc/news.texi | 13 +++++++++++++ doc/style.css | 6 +----- doc/yggdrasil.texi | 122 +++++++++++++++++++++++++++++++++++++++++++++++++++++ src/area.go | 2 +- src/call.go | 12 ++++++++++-- src/cfg.go | 6 +++++- src/cfgdir.go | 126 ++++++++++++++++++++++++++++++++++------------------- src/check.go | 2 +- src/chunked.go | 2 +- src/cmd/nncp-bundle/main.go | 2 +- src/cmd/nncp-call/main.go | 2 +- src/cmd/nncp-caller/main.go | 2 +- src/cmd/nncp-cfgdir/main.go | 2 +- src/cmd/nncp-cfgenc/main.go | 2 +- src/cmd/nncp-cfgmin/main.go | 2 +- src/cmd/nncp-cfgnew/main.go | 25 ++++++++++++++++++++++++- src/cmd/nncp-check/main.go | 2 +- src/cmd/nncp-cronexpr/main.go | 2 +- src/cmd/nncp-daemon/main.go | 47 ++++++++++++++++++++++++++++------------------- src/cmd/nncp-exec/main.go | 2 +- src/cmd/nncp-file/main.go | 2 +- src/cmd/nncp-freq/main.go | 2 +- src/cmd/nncp-hash/main.go | 2 +- src/cmd/nncp-log/main.go | 2 +- src/cmd/nncp-pkt/main.go | 2 +- src/cmd/nncp-reass/main.go | 2 +- src/cmd/nncp-rm/main.go | 2 +- src/cmd/nncp-stat/main.go | 2 +- src/cmd/nncp-toss/main.go | 2 +- src/cmd/nncp-trns/main.go | 2 +- src/cmd/nncp-xfer/main.go | 2 +- src/ctx.go | 4 +++- src/df.go | 2 +- src/df_netbsd.go | 2 +- src/dirwatch.go | 2 +- src/dirwatch_dummy.go | 2 +- src/eblob.go | 2 +- src/go.mod | 9 ++++++++- src/go.sum | 306 ++++++++++++++++++++++++++++++++++++++++++++++++++++- src/humanizer.go | 4 ++-- src/jobs.go | 2 +- src/lockdir.go | 2 +- src/log.go | 2 +- src/magic.go | 2 +- src/mcd.go | 2 +- src/mth.go | 2 +- src/mth_test.go | 2 +- src/nncp.go | 6 +++--- src/node.go | 2 +- src/pipe.go | 2 +- src/pkt.go | 2 +- src/pkt_test.go | 2 +- src/progress.go | 2 +- src/sp.go | 2 +- src/tmp.go | 2 +- src/toss.go | 2 +- src/toss_test.go | 2 +- src/tx.go | 2 +- src/tx_test.go | 2 +- src/ucspi.go | 2 +- src/via.go | 2 +- src/yggdrasil.go | 152 +++++++++++++++++++++++++++++++++++++++++++++++++++++ src/yggdrasil_dummy.go | 37 +++++++++++++++++++++++++++++++++++++ diff --git a/bin/default.do b/bin/default.do index 345e0470e3d278ea67d7bb6c29122ef9403ee9c19731fd247a01a4d74d8c9840..01d7b6647864ea633127f3a35fe02b9977356a437f2f173088ce081b59decbd7 100644 --- a/bin/default.do +++ b/bin/default.do @@ -7,4 +7,4 @@ GO_LDFLAGS="$GO_LDFLAGS -X $mod.DefaultCfgPath=$CFGPATH" GO_LDFLAGS="$GO_LDFLAGS -X $mod.DefaultSendmailPath=$SENDMAIL" GO_LDFLAGS="$GO_LDFLAGS -X $mod.DefaultSpoolPath=$SPOOLPATH" GO_LDFLAGS="$GO_LDFLAGS -X $mod.DefaultLogPath=$LOGPATH" -$GO build -o ../bin/$3 -ldflags "$GO_LDFLAGS" ./cmd/$1 +$GO build -o ../bin/$3 $GO_CFLAGS -ldflags "$GO_LDFLAGS" ./cmd/$1 diff --git a/doc/building.texi b/doc/building.texi index 926722d0afdb80d70b6a899e7fe5a00dc74d6fdde48e26e019c43823cd4ccc02..528dd5653a43168cf9ccc42848677de81dfb1d642c56855e924c71a1e2afd5c0 100644 --- a/doc/building.texi +++ b/doc/building.texi @@ -32,7 +32,8 @@ @command{redo} with @command{contrib/do} in the example above) included in tarball. Following ones are tested to work with: @url{http://www.goredo.cypherpunks.ru/, goredo} (NNCP's author creation), @url{https://redo.readthedocs.io/, apenwarr/redo} (@code{contrib/do} is -from that project), @url{https://github.com/leahneukirchen/redo-c, redo-c}. +from that project), @url{https://github.com/leahneukirchen/redo-c, redo-c}, +@url{https://github.com/gotroyb127/baredo, baredo}. There is @command{install} target respecting @env{$DESTDIR}. It will install binaries and info-documentation: @@ -45,4 +46,10 @@ NNCP depends on @code{github.com/fsnotify/fsnotify} library, that is solely relies on OS-specific mechanisms. There is possibility that you have either broken or unsupported ones. You can still build NNCP with @code{-tags nofsnotify} build option, to skip @code{fsnotify} library -usage at all. +usage at all: + +@example +$ GO_CFLAGS="-tags nofsnotify" redo ... +@end example + +You can also disable Yggdrasil support with @code{-tags noyggdrasil}. diff --git a/doc/cfg/general.texi b/doc/cfg/general.texi index 9a86d436284a95f1f9ee271a12242957ce9711afc770989e44b729b8038b17b9..a8c890d76737ebd9179c7a476c887385943882e6f12c731aa97c9acb1e763e79 100644 --- a/doc/cfg/general.texi +++ b/doc/cfg/general.texi @@ -15,6 +15,14 @@ # MultiCast Discovery mcd-listen: ["em0", "igb1"] mcd-send: {em0: 60, igb1: 5} + +# Yggdrasil aliases +yggdrasil-aliases: { + myprv: 60bb...27aa + bob-pub: 98de...ac19d + alice-endpoint: tcp://example.com:1234?key=689c...13fb + default-endpoints: tcp://[::1]:2345,alice-endpoint +} @end verbatim @table @code @@ -51,3 +59,14 @@ @item mcd-send Specifies list of network interfaces, and intervals in seconds, where @ref{nncp-daemon} will send @ref{MCD} announcements. @end table + +@anchor{CfgYggdrasilAliases} +Optional @ref{Yggdrasil}-related aliases are used for convenience and +keeping private keys away being used directly in command line. Each +@code{PUB}, @code{PRV}, @code{PEER}, @code{BIND} value in +@ref{nncp-daemon}'s @option{-yggdrasil} and in @code{yggdrasil:} +addresses is replaced with alias value. Moreover each entry in list of +@code{PUB}s, @code{PEER}s and @code{BIND} can be an alias too. Pay +attention, that all aliases ending with @code{prv} will be saved with +600 permissions when converting to @ref{Configuration directory, +directory layout}. diff --git a/doc/cfg/neigh.texi b/doc/cfg/neigh.texi index ccff1f9ca51e2290295c15a55689b0f9a76e54441abdb4662ec30099cf8db99a..54d3628a74413d85d2803e3185a61b51a7c3f58bbd68ca696a16d792df5530c7 100644 --- a/doc/cfg/neigh.texi +++ b/doc/cfg/neigh.texi @@ -127,6 +127,10 @@ Also you can pipe connection through the external command using @verb{#|some command#} format. @code{/bin/sh -c "some command"} will start and its @code{stdin}/@code{stdout} used as a connection. + To use @ref{Yggdrasil} network for connectivity, use + @verb{|yggdrasil:PUB;PRV;PEER[,...]|} format, read about + @ref{CfgYggdrasilAliases, possible aliases} usage. + May be omitted if either no direct connection exists, or @ref{nncp-call} is used with forced address specifying. diff --git a/doc/cmd/nncp-call.texi b/doc/cmd/nncp-call.texi index bd664a307fc494ebb5a2c7a599d99acc4b7dbdfc6cbb670c490e2f3374833cdc..e492857506af41d1a30362ef2ca516a795958d071ecce6863f01cc1fad7f1861 100644 --- a/doc/cmd/nncp-call.texi +++ b/doc/cmd/nncp-call.texi @@ -40,8 +40,9 @@ Each @option{NODE} can contain several uniquely identified @option{ADDR}esses in @ref{CfgAddrs, configuration} file. If you do not specify the exact one, then all will be tried until the first success. Optionally you can force @option{FORCEADDR} address usage, -instead of addresses taken from configuration file. You can specify both -@verb{|host:port|} and @verb{#|some command#} formats. +instead of addresses taken from configuration file. You can specify +@verb{|host:port|}, @verb{#|some command#} and +@verb{|yggdrasil:PUB;PRV;PEER[,...]|} formats. If you specify @option{-ucspi} option, then it is assumed that you run @command{nncp-call} command under some UCSPI-TCP compatible utility, diff --git a/doc/cmd/nncp-cfgnew.texi b/doc/cmd/nncp-cfgnew.texi index 440767e079a2ea59693f8a2a3532680480b36096a122aca89b380738c342afde..4803fa3b98b8ac20eeb4a0293a8a140758114cc79cbdda1f564ab1a0b878b044 100644 --- a/doc/cmd/nncp-cfgnew.texi +++ b/doc/cmd/nncp-cfgnew.texi @@ -2,7 +2,7 @@ @node nncp-cfgnew @section nncp-cfgnew @example -$ nncp-cfgnew [options] [-area NAME] [-nocomments] > new.hjson +$ nncp-cfgnew [options] [-area NAME] [-yggdrasil] [-nocomments] > new.hjson @end example Generate new node configuration: private keys, example configuration @@ -12,6 +12,9 @@ without descriptive huge comments -- useful for advanced users. With @option{-area} option you generate only the @ref{Area, area} related part of the configuration file. + +With @option{-yggdrasil} option only ed25519 keypair will be generated +for use with @ref{Yggdrasil}. Pay attention that private keys generation consumes an entropy from your operating system. diff --git a/doc/cmd/nncp-daemon.texi b/doc/cmd/nncp-daemon.texi index 5b54c996d282caaafc873fbd4ff6aa9e8707b5d879b3dc438fa8684590fc8f3d..d5e9d11faa6754572312babca2fcc5f67636f41b7f0a646957068bc1531bef71 100644 --- a/doc/cmd/nncp-daemon.texi +++ b/doc/cmd/nncp-daemon.texi @@ -5,6 +5,7 @@ @example $ nncp-daemon [options] [-maxconn INT] [-bind ADDR] [-ucspi] [-autotoss*] [-nock] [-mcd-once] + [-yggdrasil PRV;BIND[,...];[PUB,...];[PEER,...]] @end example Start listening TCP daemon, wait for incoming connections and run @@ -41,3 +42,6 @@ Read @ref{CfgNoCK, more} about @option{-nock} option. @option{-mcd-once} option sends @ref{MCD} announcements once and quits. Could be useful with inetd-based setup, where daemons are not running. + +With @option{-yggdrasil} option daemon acts as a @ref{Yggdrasil} +listener daemon. diff --git a/doc/download.texi b/doc/download.texi index 4a69d41338dbd52cc1b5fa8fbfb7103b2f18f731ad1e6aec29801d53f539c356..33688db2229037f4c7561b872e84f6fc8ef2af9fa474411fa293878297314c7c 100644 --- a/doc/download.texi +++ b/doc/download.texi @@ -27,8 +27,29 @@ @item @code{golang.org/x/term} @tab BSD 3-Clause @item @code{lukechampine.com/blake3} @tab MIT @end multitable +And additional ones for Yggdrasil support: + +@multitable @columnfractions .50 .50 +@headitem Library @tab Licence +@item @code{github.com/anacrolix/missinggo} @tab MIT +@item @code{github.com/anacrolix/sync} @tab Unfortunately, no licence information, probably it can be a problem +@item @code{github.com/Arceliar/ironwood} @tab MPLv2 +@item @code{github.com/Arceliar/phony} @tab MPLv2 +@item @code{github.com/gologme/log} @tab BSD 3-Clause +@item @code{github.com/huandu/xstrings} @tab MIT +@item @code{github.com/neilalexander/utp} @tab MPLv2 +@item @code{github.com/yggdrasil-network/yggdrasil-go} @tab GNU LGPLv3 +@end multitable + @multitable {XXXXX} {XXXX-XX-XX} {XXXX KiB} {meta4 link sig} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} @headitem Version @tab Date @tab Size @tab Tarball @tab SHA256 checksum + +@item @ref{Release 8_0_2, 8.0.2} @tab 2021-11-10 @tab 1204 KiB +@tab + @url{download/nncp-8.0.2.tar.xz.meta4, meta4} + @url{download/nncp-8.0.2.tar.xz, link} + @url{download/nncp-8.0.2.tar.xz.sig, sig} +@tab @code{84C6FB6C 0764DF11 5C51EE42 4EEF4B9C 84775522 4350A6CC 484F3AB3 C779B9D3} @item @ref{Release 8_0_1, 8.0.1} @tab 2021-11-09 @tab 1206 KiB @tab diff --git a/doc/index.texi b/doc/index.texi index 48631f80acb7134c2c3ac9924f280d4b6ac200f39e70d20994308f13a189a394..ada76142934f1136746281c2bba0d7dd4e49992bb41d6f770f3b974a8a9ddd48 100644 --- a/doc/index.texi +++ b/doc/index.texi @@ -6,7 +6,7 @@ @copying This manual is for NNCP (Node to Node copy) -- collection of utilities simplifying secure store-and-forward files and mail exchanging. -Copyright @copyright{} 2016-2021 @email{stargrave@@stargrave.org, Sergey Matveev} +Copyright @copyright{} 2016-2022 @email{stargrave@@stargrave.org, Sergey Matveev} @quotation Permission is granted to copy, distribute and/or modify this document @@ -56,6 +56,7 @@ * Packet format: Packet * Merkle Tree Hashing: MTH * Sync protocol: Sync * MultiCast Discovery: MCD +* Yggdrasil support: Yggdrasil * EBlob format: EBlob * Mirrors:: * Thanks:: @@ -84,6 +85,7 @@ @include pkt/index.texi @include mth.texi @include sp.texi @include mcd.texi +@include yggdrasil.texi @include eblob.texi @include mirrors.texi @include thanks.texi diff --git a/doc/news.ru.texi b/doc/news.ru.texi index 7ba7c49afcbb8d9433939b0b7095d53e4bc74b32dafa36458804bf85af1644fe..58abd7839edb431f60defdf86d9103f4d19590e68220e8acb12a4334cf53470e 100644 --- a/doc/news.ru.texi +++ b/doc/news.ru.texi @@ -1,6 +1,20 @@ @node Новости @section Новости +@node Релиз 8.1.0 +@subsection Релиз 8.1.0 +@itemize + +@item +@command{nncp-cfgdir} команда не требует обязательного наличия +@code{self} секции конфигурационного файла. + +@item +Появилась возможность работы в качестве клиента overlay сети Yggdrasil, +используя online протокол поверх неё. + +@end itemize + @node Релиз 8.0.2 @subsection Релиз 8.0.2 @itemize diff --git a/doc/news.texi b/doc/news.texi index 1f530f0125d2699d3e7449a0878acb6cf4a6c87a9c94329e6010230511e95256..02b15aab45ec4d1ca228d034059bca6696bb78cd625275817d2ac722c1dba307 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -3,6 +3,19 @@ @unnumbered News See also this page @ref{Новости, on russian}. +@node Release 8_1_0 +@section Release 8.1.0 +@itemize + +@item +@command{nncp-cfgdir} does not require @code{self} section existence in +configuration file. + +@item +Ability to act as Yggdrasil network client, using online protocol on top of it. + +@end itemize + @node Release 8_0_2 @section Release 8.0.2 @itemize diff --git a/doc/style.css b/doc/style.css index c173df6339d9f7125502e2aa55f72171fb3db53225d5e43bb6c31106d4b0e070..7b29463e7dab00907f74b58401bc74e06d55bd05fff3d7aed283a1b793c08f4c 100644 --- a/doc/style.css +++ b/doc/style.css @@ -1,8 +1,4 @@ -body { - margin: auto; - width: 80em; - background-color: #AEBECE; -} +body { background-color: #AEBECE } h1, h2, h3, h4 { text-align: center } h1, h2, h3, h4, strong { color: #900090 } pre { background-color: #CCCCCC } diff --git a/doc/yggdrasil.texi b/doc/yggdrasil.texi new file mode 100644 index 0000000000000000000000000000000000000000..2db0e493ba35f3b1a324c8c998b4e8213c5eb10210a29ba8f68df4ecf08e24a9 --- /dev/null +++ b/doc/yggdrasil.texi @@ -0,0 +1,122 @@ +@node Yggdrasil +@unnumbered Yggdrasil support + +NNCP is able to act itself as a client to +@url{https://yggdrasil-network.github.io/, Yggdrasil} overlay network. +Current IPv6 adoption for @strong{home} users is relatively bad in many +countries. That is why Yggdrasil overlay network uses dynamic spanning +tree mesh network for packets routing, making it useful for gaining +hosts high availability reachability without complex manual manipulations. +By default it creates 200::/7 IPv6 network, where each host's address is +derived from the corresponding public key. + +NNCP's Yggdrasil support is fully based on and resembles the idea taken +from @url{https://github.com/neilalexander/yggmail, yggmail} software, +that does not use Yggdrasil's full-featured IP tunnelling capabilities, +but rather uses it only as a generic packet transmission network, +greatly simplifying the whole setup, without necessity to setup separate +networking interface and operating system's routing tables with firewall. +@url{http://bittorrent.org/beps/bep_0029.html, μTP} transport protocol +is used over Yggdrasil's packet interface -- it is relatively simple and +efficient enough. + +No separate explicit Yggdrasil daemon installation is necessary, however +you should be able to interoperate with it too, using for example as an +entry point to the global Yggdrasil network. You can reuse already +existing Yggdrasil network, without colliding with its IP tunnelling +features. + +Only minor modifications were done to current NNCP's tools: + +@itemize + +@item @ref{nncp-daemon} has @option{-yggdrasil} option, making it acting +as a Yggdrasil listener network node. It can automatically connect to +other peers and participate in routing. It does not have to answer +NNCP's online protocol requests at all and just can be some intermediate +routing point in the whole mesh network. + +@item @ref{nncp-call}/@ref{nncp-caller} commands understand +@code{yggdrasil:} addresses, pointing to the desired Yggdrasil's public +key (that also acts as the destination host's address). Yggdrasil +background goroutine is automatically started, connecting to the +specified Yggdrasil entrypoints and making μTP connection with the hosts +and initiating NNCP's native @ref{Sync, online protocol} handshake on +top of that. + +@item @ref{nncp-cfgnew} is able to generate ed25519 keypair. + +@item @ref{CfgYggdrasilAliases, Configuration file} optionally contains +@code{yggdrasil-aliases} map. + +@end itemize + +How to start using NNCP through that overlay network? + +@enumerate + +@item +Generate ed25519 keypair, that will be used for identification and +authentication of your node in Yggdrasil network: + +@example +$ nncp-cfgnew -yggdrasil +Public: 4fd64130e23cf7abdbc0fabdf2ae12bbc2ab7179861efa296d2beb0181ae07ea +Private: 571fb05c81e62a572096566fd48e87ad47e706b1f600dd625ebbf86d310332624fd64130e23cf7abdbc0fabdf2ae12bbc2ab7179861efa296d2beb0181ae07ea +@end example + +You should share your public key with other NNCP peers. + +@item +Start @ref{nncp-daemon} listening on Yggdrasil's incoming connections. +You have to specify the private key (generated above), list of bind +addresses for incoming Yggdrasil's TCP connections, optional list of +allowed incoming connections, identified by a public key, and optionally +a list of another similar listening peers, through which you can route +and discover packets to the other nodes. @option{-yggdrasil} option +takes that information in form of: +@code{PRV;BIND[,...];[PUB,...];[PEER,...]}, where @code{PEER} is in +Yggdrasil's URL format, like @code{tcp://HOST:PORT} or +@code{tcp://HOST:PORT?key=PUBKEY}. + +@example +$ nncp-daemon -yggdrasil "571f...07ea;[::]:1234,[::1]:2345;;tcp://some.peer?key=ITSPUBKEY" +@end example + +Here we did not specify any allowable public key -- anyone can connect +to us and route packets through. As you can see, private key is in +command line arguments, that could be treated as a security issue. That +is why it is preferred to specify them in +@ref{CfgYggdrasilAliases, configuration}'s @code{yggdrasil-aliases} +section, where you can alias all of entities and reference them in +@option{-yggdrasil} or @code{yggdrasil:}-addresses: + +@verbatim +yggdrasil-aliases: { + myprv: 571f...07ea + bindPublic: [::]:1234 + bindLocalhost: [::1]:2345 + peerBE: tcp://some.peer.be?key=BEPUBKEY + peerRU: tcp://some.peer.ru?key=RUPUBKEY + defPeers: peerBE,peerRU + remoteAlicePub: 52be...3c14 +} +@end verbatim + +And now you can more conveniently and safely specify: + +@example +$ nncp-daemon -yggdrasil "myprv;bindPublic,bindLocalhost;;defPeers" +@end example + +@item +Make calls to that node from another ones, by using +@code{yggdrasil:}-address, that takes remote host's public key, our +host's private key and list of Yggdrasil peers entrypoints. Similarly to +@option{-yggdrasil} option, it is ";"-separated list too: + +@example +$ nncp-call alice "yggdrasil:remoteAlicePub;myprv;bindLocalhost,tcp://some.other.entrypoint" +@end example + +@end enumerate diff --git a/src/area.go b/src/area.go index fc4c6a9ea93f3e90439e8f3da078caef605073267bc68eca7141324a68330334..dd47fafe5f691dea45807ec8996f8644f63d1d10e2640c4f690cf0eddc662061 100644 --- a/src/area.go +++ b/src/area.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/call.go b/src/call.go index e0328efd6da900ac21d94b9ff51e386dc0106d2f963296d1bd6c7f12f29187be..f06c4272d9fa1d739f2be221f99b1bc349b6cf959ac70830ac96a37d12811739 100644 --- a/src/call.go +++ b/src/call.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 @@ -22,11 +22,14 @@ "errors" "fmt" "net" "os" + "strings" "time" "github.com/dustin/go-humanize" "github.com/gorhill/cronexpr" ) + +const YggdrasilPrefix = "yggdrasil:" type Call struct { Cron *cronexpr.Expression @@ -83,11 +86,16 @@ addr = UCSPITCPRemoteAddr() if addr == "" { addr = UCSPITCPClient } + } else if strings.HasPrefix(addr, YggdrasilPrefix) { + conn, err = NewYggdrasilConn( + ctx.YggdrasilAliases, + strings.TrimPrefix(addr, YggdrasilPrefix), + ) } else { conn, err = net.Dial("tcp", addr) } if err != nil { - ctx.LogD("calling", append(les, LE{"Err", err}), func(les LEs) string { + ctx.LogE("calling", les, err, func(les LEs) string { return fmt.Sprintf("Calling %s (%s)", node.Name, addr) }) continue diff --git a/src/cfg.go b/src/cfg.go index 11919ad4debca9443cc8807b646c416c77d8ac5c02a8a4a6ba3fa3a00cc3197b..8378853ac2ec807e754867165569aaf4759b95b56f09f9735ba024fd934de967 100644 --- a/src/cfg.go +++ b/src/cfg.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 @@ -146,6 +146,8 @@ Self *NodeOurJSON `json:"self"` Neigh map[string]NodeJSON `json:"neigh"` Areas map[string]AreaJSON `json:"areas,omitempty"` + + YggdrasilAliases map[string]string `json:"yggdrasil-aliases,omitempty"` } func NewNode(name string, cfg NodeJSON) (*Node, error) { @@ -542,6 +544,8 @@ Neigh: make(map[NodeId]*Node, len(cfgJSON.Neigh)), Alias: make(map[string]*NodeId), MCDRxIfis: cfgJSON.MCDRxIfis, MCDTxIfis: cfgJSON.MCDTxIfis, + + YggdrasilAliases: cfgJSON.YggdrasilAliases, } if cfgJSON.Notify != nil { if cfgJSON.Notify.File != nil { diff --git a/src/cfgdir.go b/src/cfgdir.go index b96c6faa2f78df9b1c82b9553b057a5322685912e3580a66c877ae323ca5828c..0473ae3b52da89f9026c92eaeacc6a590a19644852836bd0f6b48e6e7052a8fd 100644 --- a/src/cfgdir.go +++ b/src/cfgdir.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 @@ -168,29 +168,31 @@ } } } - if err = cfgDirMkdir(dst, "self"); err != nil { - return - } - if err = cfgDirSave(cfg.Self.Id, dst, "self", "id"); err != nil { - return - } - if err = cfgDirSave(cfg.Self.ExchPub, dst, "self", "exchpub"); err != nil { - return - } - if err = cfgDirSave(cfg.Self.ExchPrv, dst, "self", "exchprv"); err != nil { - return - } - if err = cfgDirSave(cfg.Self.SignPub, dst, "self", "signpub"); err != nil { - return - } - if err = cfgDirSave(cfg.Self.SignPrv, dst, "self", "signprv"); err != nil { - return - } - if err = cfgDirSave(cfg.Self.NoisePub, dst, "self", "noisepub"); err != nil { - return - } - if err = cfgDirSave(cfg.Self.NoisePrv, dst, "self", "noiseprv"); err != nil { - return + if cfg.Self != nil { + if err = cfgDirMkdir(dst, "self"); err != nil { + return + } + if err = cfgDirSave(cfg.Self.Id, dst, "self", "id"); err != nil { + return + } + if err = cfgDirSave(cfg.Self.ExchPub, dst, "self", "exchpub"); err != nil { + return + } + if err = cfgDirSave(cfg.Self.ExchPrv, dst, "self", "exchprv"); err != nil { + return + } + if err = cfgDirSave(cfg.Self.SignPub, dst, "self", "signpub"); err != nil { + return + } + if err = cfgDirSave(cfg.Self.SignPrv, dst, "self", "signprv"); err != nil { + return + } + if err = cfgDirSave(cfg.Self.NoisePub, dst, "self", "noisepub"); err != nil { + return + } + if err = cfgDirSave(cfg.Self.NoisePrv, dst, "self", "noiseprv"); err != nil { + return + } } for name, n := range cfg.Neigh { @@ -416,6 +418,17 @@ } } } + if len(cfg.YggdrasilAliases) > 0 { + if err = cfgDirMkdir(dst, "yggdrasil-aliases"); err != nil { + return + } + for alias, v := range cfg.YggdrasilAliases { + if err = cfgDirSave(v, dst, "yggdrasil-aliases", alias); err != nil { + return + } + } + } + return } @@ -569,29 +582,33 @@ if notify.File != nil || notify.Freq != nil || len(notify.Exec) > 0 { cfg.Notify = ¬ify } - self := NodeOurJSON{} - if self.Id, err = cfgDirLoadMust(src, "self", "id"); err != nil { - return nil, err - } - if self.ExchPub, err = cfgDirLoadMust(src, "self", "exchpub"); err != nil { - return nil, err - } - if self.ExchPrv, err = cfgDirLoadMust(src, "self", "exchprv"); err != nil { - return nil, err - } - if self.SignPub, err = cfgDirLoadMust(src, "self", "signpub"); err != nil { - return nil, err - } - if self.SignPrv, err = cfgDirLoadMust(src, "self", "signprv"); err != nil { - return nil, err - } - if self.NoisePub, err = cfgDirLoadMust(src, "self", "noisepub"); err != nil { - return nil, err - } - if self.NoisePrv, err = cfgDirLoadMust(src, "self", "noiseprv"); err != nil { + if _, err = ioutil.ReadDir(filepath.Join(src, "self")); err == nil { + self := NodeOurJSON{} + if self.Id, err = cfgDirLoadMust(src, "self", "id"); err != nil { + return nil, err + } + if self.ExchPub, err = cfgDirLoadMust(src, "self", "exchpub"); err != nil { + return nil, err + } + if self.ExchPrv, err = cfgDirLoadMust(src, "self", "exchprv"); err != nil { + return nil, err + } + if self.SignPub, err = cfgDirLoadMust(src, "self", "signpub"); err != nil { + return nil, err + } + if self.SignPrv, err = cfgDirLoadMust(src, "self", "signprv"); err != nil { + return nil, err + } + if self.NoisePub, err = cfgDirLoadMust(src, "self", "noisepub"); err != nil { + return nil, err + } + if self.NoisePrv, err = cfgDirLoadMust(src, "self", "noiseprv"); err != nil { + return nil, err + } + cfg.Self = &self + } else if !os.IsNotExist(err) { return nil, err } - cfg.Self = &self cfg.Neigh = make(map[string]NodeJSON) fis, err = ioutil.ReadDir(filepath.Join(src, "neigh")) @@ -897,6 +914,25 @@ if cfgDirExists(src, "areas", n, "allow-unknown") { area.AllowUnknown = true } cfg.Areas[n] = area + } + + fis, err = ioutil.ReadDir(filepath.Join(src, "yggdrasil-aliases")) + if err != nil && !os.IsNotExist(err) { + return nil, err + } + if len(fis) > 0 { + cfg.YggdrasilAliases = make(map[string]string, len(fis)) + } + for _, fi := range fis { + n := fi.Name() + if n[0] == '.' { + continue + } + b, err := ioutil.ReadFile(filepath.Join(src, "yggdrasil-aliases", fi.Name())) + if err != nil { + return nil, err + } + cfg.YggdrasilAliases[n] = strings.TrimSuffix(string(b), "\n") } return &cfg, nil diff --git a/src/check.go b/src/check.go index ddec761972bf66d6d77a2f541710953af3f6cf3040cf31557380ac4fffc06bf4..9f18bc8218ccae0075fe98dfe7d221e1942ff56da5aa3f90dd90eb1eaf4d8b05 100644 --- a/src/check.go +++ b/src/check.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/chunked.go b/src/chunked.go index a70c920beb4fec8f72aeee7742e514eee2cfc5fc777114768e571333f144d579..ea32e82a014e7c195890a9332679a566b76957372955258128f91cd34d5cad6f 100644 --- a/src/chunked.go +++ b/src/chunked.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-bundle/main.go b/src/cmd/nncp-bundle/main.go index d7f0b413fc25f84a73a5cb8e3614d2460490c063d797fc30de4be503be513385..f4bec5eb7e9936ad96ac9650a9b234ee29f3cf11808806abaea4d8ac0ba26513 100644 --- a/src/cmd/nncp-bundle/main.go +++ b/src/cmd/nncp-bundle/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-call/main.go b/src/cmd/nncp-call/main.go index 892b557f049ad93d10b523109f90b2e5d4d4382439f1bbc8e16f120cac2b92f4..7cc4d0a7aae004db1ddf7583babd95eedf80f7a24c4f5569998243d18fef61d2 100644 --- a/src/cmd/nncp-call/main.go +++ b/src/cmd/nncp-call/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-caller/main.go b/src/cmd/nncp-caller/main.go index f1a08ffdde3d001dad99725c117ed430ebdd6cc4e837d7dc4a2938eb6a22417f..5db9169a1792b3fe1272542837a33b6f6e78e5c8739177926d10ccdf86746cd4 100644 --- a/src/cmd/nncp-caller/main.go +++ b/src/cmd/nncp-caller/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-cfgdir/main.go b/src/cmd/nncp-cfgdir/main.go index 83e7916e52250e6a3402563b339d432191dd162ec3932da045ec6dacfc711c53..e1e143d85cbeeeef2c387a1a527aba95a49c1408286ebc223ca45bd03a73cae1 100644 --- a/src/cmd/nncp-cfgdir/main.go +++ b/src/cmd/nncp-cfgdir/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-cfgenc/main.go b/src/cmd/nncp-cfgenc/main.go index 1c438df7a96b1d5f2dcb34659b577ac9dc6059ffd487f00fcfe03c1926370489..f21cae7b7fa6fa1a6423d50c2867c79318f523a74562915d097f05000e02de72 100644 --- a/src/cmd/nncp-cfgenc/main.go +++ b/src/cmd/nncp-cfgenc/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-cfgmin/main.go b/src/cmd/nncp-cfgmin/main.go index 4f23fbee0c3ad03665eac088c11b4f101589edc876739c81713ea1bf80d58c02..de04b76a0442b8fca0bed2a29853248a61fa206895245aa01e03678f2743eb96 100644 --- a/src/cmd/nncp-cfgmin/main.go +++ b/src/cmd/nncp-cfgmin/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-cfgnew/main.go b/src/cmd/nncp-cfgnew/main.go index 0c5ad54673977f7022cc2e96f1433dd2d1b39b5410b589563454e0ae3bfb914b..1f56fac7a6c28238fd86e8835045edb5d77f462cc92ed112dbc32b4cd288abac 100644 --- a/src/cmd/nncp-cfgnew/main.go +++ b/src/cmd/nncp-cfgnew/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 @@ -19,7 +19,9 @@ // Generate new NNCP node keys and configuration file package main import ( + "crypto/ed25519" "crypto/rand" + "encoding/hex" "encoding/json" "flag" "fmt" @@ -42,6 +44,7 @@ func main() { var ( areaName = flag.String("area", "", "Generate area's keypairs") + yggdrasil = flag.Bool("yggdrasil", false, "Generate Yggdrasil keypair") noComments = flag.Bool("nocomments", false, "Do not include descriptive comments") version = flag.Bool("version", false, "Print version information") warranty = flag.Bool("warranty", false, "Print warranty information") @@ -57,6 +60,17 @@ if *version { fmt.Println(nncp.VersionGet()) return } + + if *yggdrasil { + pub, prv, err := ed25519.GenerateKey(rand.Reader) + if err != nil { + log.Fatalln(err) + } + fmt.Println("Public:", hex.EncodeToString(pub)) + fmt.Println("Private:", hex.EncodeToString(prv)) + return + } + if *areaName != "" { pub, prv, err := box.GenerateKey(rand.Reader) if err != nil { @@ -123,6 +137,7 @@ } fmt.Println(cfgRaw) return } + nodeOur, err := nncp.NewNodeGenerate() if err != nil { log.Fatalln(err) @@ -187,6 +202,14 @@ # List of interfaces where to listen for MCD announcements # mcd-listen: ["em0", "igb1"] # Interfaces and intervals (in seconds) where to send MCD announcements # mcd-send: {em0: 60, igb1: 5} + + # Yggdrasil related aliases: + # yggdrasil-aliases: { + # myprv: 60bb...27aa + # bob-pub: 98de...ac19d + # alice-endpoint: tcp://example.com:1234?key=689c...13fb + # default-endpoints: tcp://[::1]:2345,alice-endpoint + # } # Enable notification email sending # notify: { diff --git a/src/cmd/nncp-check/main.go b/src/cmd/nncp-check/main.go index b45c9507815f03588f3b7f1630d2deb33174f6dbab76723255074caf387fe787..58aefa6026f0e0a82d9a70de7decdc202be590d97bbe3b5e94840b56bdfe8f46 100644 --- a/src/cmd/nncp-check/main.go +++ b/src/cmd/nncp-check/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-cronexpr/main.go b/src/cmd/nncp-cronexpr/main.go index 2a516c769ecda43e1be0f6a4adc3bcc20f1a6d211f83af9ca3af81ffd230758c..9057caf7466fc32ebf59c930a5e2cf0e744b890db463a7eb3b3b67d8aebc7234 100644 --- a/src/cmd/nncp-cronexpr/main.go +++ b/src/cmd/nncp-cronexpr/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-daemon/main.go b/src/cmd/nncp-daemon/main.go index 167463a7e8cfe9aa62f58a6ac5d87281a5914bcd059265ab7245a5a98517b4bd..96192f560d47415cd2c47e12141a7b9334824ffa8508f64a24ae22b2109dbc1a 100644 --- a/src/cmd/nncp-daemon/main.go +++ b/src/cmd/nncp-daemon/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 @@ -111,6 +111,7 @@ niceRaw = flag.String("nice", nncp.NicenessFmt(255), "Minimal required niceness") bind = flag.String("bind", "[::]:5400", "Address to bind to") ucspi = flag.Bool("ucspi", false, "Is it started as UCSPI-TCP server") inetd = flag.Bool("inetd", false, "Obsolete, use -ucspi") + yggdrasil = flag.String("yggdrasil", "", "Start Yggdrasil listener: PRV;BIND[,...];[PUB,...];[PEER,...]") maxConn = flag.Int("maxconn", 128, "Maximal number of simultaneous connections") noCK = flag.Bool("nock", false, "Do no checksum checking") mcdOnce = flag.Bool("mcd-once", false, "Send MCDs once and quit") @@ -200,29 +201,37 @@ conn.Close() return } - cols := strings.Split(*bind, ":") - port, err := strconv.Atoi(cols[len(cols)-1]) - if err != nil { - log.Fatalln("Can not parse port:", err) - } + var ln net.Listener + if *yggdrasil != "" { + ln, err = nncp.NewYggdrasilListener(ctx.YggdrasilAliases, *yggdrasil) + if err != nil { + log.Fatalln("Can not listen:", err) + } + } else { + cols := strings.Split(*bind, ":") + port, err := strconv.Atoi(cols[len(cols)-1]) + if err != nil { + log.Fatalln("Can not parse port:", err) + } - if *mcdOnce { - for ifiName := range ctx.MCDTxIfis { - if err = ctx.MCDTx(ifiName, port, 0); err != nil { - log.Fatalln("Can not do MCD transmission:", err) + if *mcdOnce { + for ifiName := range ctx.MCDTxIfis { + if err = ctx.MCDTx(ifiName, port, 0); err != nil { + log.Fatalln("Can not do MCD transmission:", err) + } } + return } - return - } - ln, err := net.Listen("tcp", *bind) - if err != nil { - log.Fatalln("Can not listen:", err) - } + ln, err = net.Listen("tcp", *bind) + if err != nil { + log.Fatalln("Can not listen:", err) + } - for ifiName, secs := range ctx.MCDTxIfis { - if err = ctx.MCDTx(ifiName, port, time.Duration(secs)*time.Second); err != nil { - log.Fatalln("Can not run MCD transmission:", err) + for ifiName, secs := range ctx.MCDTxIfis { + if err = ctx.MCDTx(ifiName, port, time.Duration(secs)*time.Second); err != nil { + log.Fatalln("Can not run MCD transmission:", err) + } } } diff --git a/src/cmd/nncp-exec/main.go b/src/cmd/nncp-exec/main.go index 82963132980ec7eaa2fbc89d9477282283d975a404b6638ce1793c42831ac6c1..51578187c80946498801944a9668bc0ff670ced8b7093dcda6cff2ab6bc67b3d 100644 --- a/src/cmd/nncp-exec/main.go +++ b/src/cmd/nncp-exec/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-file/main.go b/src/cmd/nncp-file/main.go index 8fd2a1e44afbf62b702c5b271e7757a4d3f86a92dc1031aecf92a40e4aba9309..7e9f5cc9df75b8394231aead6813a744eef6b85149659cffdadde57286f54b77 100644 --- a/src/cmd/nncp-file/main.go +++ b/src/cmd/nncp-file/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-freq/main.go b/src/cmd/nncp-freq/main.go index 3449307cb70759735aec78636dd8ff5ea09a73ec3471abf6177cef6cf2669b6b..3a4749e17262d24d2ef4bfce845e0cac45dbf05732df15a2c60c09cbe3511656 100644 --- a/src/cmd/nncp-freq/main.go +++ b/src/cmd/nncp-freq/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-hash/main.go b/src/cmd/nncp-hash/main.go index a2554881ffb986ce37917014d6840c73a7d30dc35c073904b8cd8bea9e06ec81..3292a89e3ae8303a45348d994b1865c4a183535d900177d84f1e39d5a116052c 100644 --- a/src/cmd/nncp-hash/main.go +++ b/src/cmd/nncp-hash/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-log/main.go b/src/cmd/nncp-log/main.go index 549b25cde9679daf66c724e8dc24b76c6b3420a24be7d96f93a832fb623123ae..8f260b40261049685aa952d221d719627cf34352e010d0910d781c9e159d86db 100644 --- a/src/cmd/nncp-log/main.go +++ b/src/cmd/nncp-log/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-pkt/main.go b/src/cmd/nncp-pkt/main.go index e10e2ac69309537272d589a00e52ca4832a4581a99be6328634a5ca2da1804d1..fcc4d7351411d8e4ffcd81e18616f0dba3ce8670610537728f7ba3d6ae40f142 100644 --- a/src/cmd/nncp-pkt/main.go +++ b/src/cmd/nncp-pkt/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-reass/main.go b/src/cmd/nncp-reass/main.go index 24053962d95df85fadc7b923f2fb6717f0f1f5fa90cf470cc405adec0951d318..0da6636afe1d6356e017059356e0971d9206544ba1c16faa6dc709d036775d33 100644 --- a/src/cmd/nncp-reass/main.go +++ b/src/cmd/nncp-reass/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-rm/main.go b/src/cmd/nncp-rm/main.go index 5d0b1b9cab41af85a4a586df62cbf0fe4a2aeddf72afc1de3bdee015ab8e2e2d..4f1b3f40d8417ad23487bcb5e3e0005c331f26511a89100938d129c54cebf5e1 100644 --- a/src/cmd/nncp-rm/main.go +++ b/src/cmd/nncp-rm/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-stat/main.go b/src/cmd/nncp-stat/main.go index 57bc40ecc28d8e595f5d6f3bd34a9686b58ef24da30e9387dbfb20db4bf77ed1..3f4955f9598a53068f46ca1c7ed26f7a4daa329772e46a6feb6198b97188c326 100644 --- a/src/cmd/nncp-stat/main.go +++ b/src/cmd/nncp-stat/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-toss/main.go b/src/cmd/nncp-toss/main.go index 1733531aa9205cb10e9a08b525a21dc443d508102ffcdb4325f5cc6990efcb44..58f14be45d752c402d55bf911ba324e9ed9c74d2b6c4d421d2322f5e52b236f9 100644 --- a/src/cmd/nncp-toss/main.go +++ b/src/cmd/nncp-toss/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-trns/main.go b/src/cmd/nncp-trns/main.go index 55caf6a2c9ff2c20cdd0800700ef32f381161db50e0ab097737a1475e0d536d2..e9735baa648cfd8761326956b1acaa4ad3aa9cb6e1b9c772156a98c6cea1de34 100644 --- a/src/cmd/nncp-trns/main.go +++ b/src/cmd/nncp-trns/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/cmd/nncp-xfer/main.go b/src/cmd/nncp-xfer/main.go index 940934357e9958ebc3653394964a6a51f39ef8fb09023d193c4f2eb5365d3e00..7856822095c21d457713c61373f7a421088909cb241357a7116c2d63f37f2fe7 100644 --- a/src/cmd/nncp-xfer/main.go +++ b/src/cmd/nncp-xfer/main.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/ctx.go b/src/ctx.go index c432c58184cd04f2c9228bd42e23ccf0ff26e91589608fea5dbea66b9025ad14..991d2d31de4a19ec3ce8e601f9d58f042519a0549e5597fa98554cc5bef17e23 100644 --- a/src/ctx.go +++ b/src/ctx.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 @@ -51,6 +51,8 @@ NotifyExec map[string]*FromToJSON MCDRxIfis []string MCDTxIfis map[string]int + + YggdrasilAliases map[string]string } func (ctx *Ctx) FindNode(id string) (*Node, error) { diff --git a/src/df.go b/src/df.go index 97258a405d938e9ae8a5cc17fbc58319405165d059490afdfa102d728c062cdd..5e1add70cb296955b3a9d72bc6f17d29c3ec95026b0da068b515f3a63354f8a8 100644 --- a/src/df.go +++ b/src/df.go @@ -2,7 +2,7 @@ //go:build !netbsd // +build !netbsd // NNCP -- Node to Node copy, utilities for store-and-forward data exchange -// Copyright (C) 2016-2021 Sergey Matveev +// Copyright (C) 2016-2022 Sergey Matveev package nncp diff --git a/src/df_netbsd.go b/src/df_netbsd.go index 16c9374fef2207c9d5ba1cb2e6821c5af8310e615281c85f7a4770344f502a4d..fa6bb238698c40175ac71c54ffe7728709fffd5d10eec35f814729a2e8de83ac 100644 --- a/src/df_netbsd.go +++ b/src/df_netbsd.go @@ -2,7 +2,7 @@ //go:build netbsd // +build netbsd // NNCP -- Node to Node copy, utilities for store-and-forward data exchange -// Copyright (C) 2016-2021 Sergey Matveev +// Copyright (C) 2016-2022 Sergey Matveev package nncp diff --git a/src/dirwatch.go b/src/dirwatch.go index e8624f40f96ee1384649875c2d4aed1d088f716f8a041363be6741658c4de8f0..4bb1dc19b87a6b857102a7544d8dc8c65719cc125ce7dfb6b603420ae316098c 100644 --- a/src/dirwatch.go +++ b/src/dirwatch.go @@ -3,7 +3,7 @@ // +build !nofsnotify /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/dirwatch_dummy.go b/src/dirwatch_dummy.go index d1b80f1583332761221500979b2ad596690aaa51a917c554385536372b526c3c..75da8b4b59e9593fe72b6fd166e3430c97094d8c8f262c9cb472dfc51f43884a 100644 --- a/src/dirwatch_dummy.go +++ b/src/dirwatch_dummy.go @@ -3,7 +3,7 @@ // +build nofsnotify /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/eblob.go b/src/eblob.go index 7f5bf8e5a33203b8c4b01a7ab92bd6d7019af2ad1ebc787a66fdcda8bc2f2699..a69752f094ecb7bb11a16fb811a9ad2cf2ea2233ab2633fca59754c225e2b5cb 100644 --- a/src/eblob.go +++ b/src/eblob.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/go.mod b/src/go.mod index 6bb25060e6097c8955507cf24841ce6d1ee30222e2467768b1020e0c26851f6e..f00ba322daad5dfac1cb86c12702b5de9ba2e994de3ab99127bb9dfac06367a3 100644 --- a/src/go.mod +++ b/src/go.mod @@ -1,18 +1,25 @@ module go.cypherpunks.ru/nncp/v8 require ( + github.com/Arceliar/ironwood v0.0.0-20211125050254-8951369625d0 + github.com/anacrolix/missinggo v1.3.0 // indirect + github.com/anacrolix/missinggo/v2 v2.5.3 // indirect + github.com/anacrolix/sync v0.4.0 // indirect github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892 github.com/dustin/go-humanize v1.0.0 github.com/flynn/noise v1.0.0 github.com/fsnotify/fsnotify v1.5.1 + github.com/gologme/log v1.3.0 github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75 github.com/hjson/hjson-go v3.1.0+incompatible github.com/klauspost/compress v1.13.6 + github.com/neilalexander/utp v0.1.1-0.20210705212447-691f29ad692b + github.com/yggdrasil-network/yggdrasil-go v0.4.2 go.cypherpunks.ru/balloon v1.1.1 go.cypherpunks.ru/recfile v0.4.3 golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 golang.org/x/net v0.0.0-20210614182718-04defd469f4e - golang.org/x/sys v0.0.0-20211107104306-e0b2ad06fe42 + golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 lukechampine.com/blake3 v1.1.6 ) diff --git a/src/go.sum b/src/go.sum index 05528e20b52575e0e67b7158f33db717ceb9f0d76306e8ee1f851e0d8a5944d3..9d026415a2ca7f3a5ed50e8dc6c4676873248318c4f549aa595adaf184fbca65 100644 --- a/src/go.sum +++ b/src/go.sum @@ -1,47 +1,349 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +crawshaw.io/iox v0.0.0-20181124134642-c51c3df30797/go.mod h1:sXBiorCo8c46JlQV3oXPKINnZ8mcqnye1EkVkqsectk= +crawshaw.io/sqlite v0.3.2/go.mod h1:igAO5JulrQ1DbdZdtVq48mnZUBAPOeFzer7VhDWNtW4= +github.com/Arceliar/ironwood v0.0.0-20210619124114-6ad55cae5031/go.mod h1:RP72rucOFm5udrnEzTmIWLRVGQiV/fSUAQXJ0RST/nk= +github.com/Arceliar/ironwood v0.0.0-20211125050254-8951369625d0 h1:QUqcb7BOcBU2p7Nax7pESOb8hrZYtI0Ts6j4v4mvcQo= +github.com/Arceliar/ironwood v0.0.0-20211125050254-8951369625d0/go.mod h1:RP72rucOFm5udrnEzTmIWLRVGQiV/fSUAQXJ0RST/nk= +github.com/Arceliar/phony v0.0.0-20210209235338-dde1a8dca979 h1:WndgpSW13S32VLQ3ugUxx2EnnWmgba1kCqPkd4Gk1yQ= +github.com/Arceliar/phony v0.0.0-20210209235338-dde1a8dca979/go.mod h1:6Lkn+/zJilRMsKmbmG1RPoamiArC6HS73xbwRyp3UyI= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/RoaringBitmap/roaring v0.4.7/go.mod h1:8khRDP4HmeXns4xIj9oGrKSz7XTQiJx2zgh7AcNke4w= +github.com/RoaringBitmap/roaring v0.4.17/go.mod h1:D3qVegWTmfCaX4Bl5CrBE9hfrSrrXIr8KVNvRsDi1NI= +github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= +github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/anacrolix/envpprof v0.0.0-20180404065416-323002cec2fa/go.mod h1:KgHhUaQMc8cC0+cEflSgCFNFbKwi5h54gqtVn8yhP7c= +github.com/anacrolix/envpprof v1.0.0/go.mod h1:KgHhUaQMc8cC0+cEflSgCFNFbKwi5h54gqtVn8yhP7c= +github.com/anacrolix/envpprof v1.1.0/go.mod h1:My7T5oSqVfEn4MD4Meczkw/f5lSIndGAKu/0SM/rkf4= +github.com/anacrolix/envpprof v1.1.1 h1:sHQCyj7HtiSfaZAzL2rJrQdyS7odLqlwO6nhk/tG/j8= +github.com/anacrolix/envpprof v1.1.1/go.mod h1:My7T5oSqVfEn4MD4Meczkw/f5lSIndGAKu/0SM/rkf4= +github.com/anacrolix/log v0.3.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU= +github.com/anacrolix/log v0.6.0 h1:5y+wtTWoecbrAWWuoBCH7UuGFiD6q2jnQxrLK01RC+Q= +github.com/anacrolix/log v0.6.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU= +github.com/anacrolix/missinggo v1.1.0/go.mod h1:MBJu3Sk/k3ZfGYcS7z18gwfu72Ey/xopPFJJbTi5yIo= +github.com/anacrolix/missinggo v1.1.2-0.20190815015349-b888af804467/go.mod h1:MBJu3Sk/k3ZfGYcS7z18gwfu72Ey/xopPFJJbTi5yIo= +github.com/anacrolix/missinggo v1.2.1/go.mod h1:J5cMhif8jPmFoC3+Uvob3OXXNIhOUikzMt+uUjeM21Y= +github.com/anacrolix/missinggo v1.3.0 h1:06HlMsudotL7BAELRZs0yDZ4yVXsHXGi323QBjAVASw= +github.com/anacrolix/missinggo v1.3.0/go.mod h1:bqHm8cE8xr+15uVfMG3BFui/TxyB6//H5fwlq/TeqMc= +github.com/anacrolix/missinggo/perf v1.0.0 h1:7ZOGYziGEBytW49+KmYGTaNfnwUqP1HBsy6BqESAJVw= +github.com/anacrolix/missinggo/perf v1.0.0/go.mod h1:ljAFWkBuzkO12MQclXzZrosP5urunoLS0Cbvb4V0uMQ= +github.com/anacrolix/missinggo/v2 v2.2.0/go.mod h1:o0jgJoYOyaoYQ4E2ZMISVa9c88BbUBVQQW4QeRkNCGY= +github.com/anacrolix/missinggo/v2 v2.5.1/go.mod h1:WEjqh2rmKECd0t1VhQkLGTdIWXO6f6NLjp5GlMZ+6FA= +github.com/anacrolix/missinggo/v2 v2.5.3 h1:aaQwdyCD433yjQp3YU5ypuEDDGWH4q2XIvi9RpQ4GAs= +github.com/anacrolix/missinggo/v2 v2.5.3/go.mod h1:QQBbo8dXjlAuVYYBm/L+5Cn4GWU5ANbk471tl/2uyWg= +github.com/anacrolix/stm v0.2.0/go.mod h1:zoVQRvSiGjGoTmbM0vSLIiaKjWtNPeTvXUSdJQA4hsg= +github.com/anacrolix/sync v0.2.0/go.mod h1:BbecHL6jDSExojhNtgTFSBcdGerzNc64tz3DCOj/I0g= +github.com/anacrolix/sync v0.4.0 h1:T+MdO/u87ir/ijWsTFsPYw5jVm0SMm4kVpg8t4KF38o= +github.com/anacrolix/sync v0.4.0/go.mod h1:BbecHL6jDSExojhNtgTFSBcdGerzNc64tz3DCOj/I0g= +github.com/anacrolix/tagflag v0.0.0-20180109131632-2146c8d41bf0/go.mod h1:1m2U/K6ZT+JZG0+bdMK6qauP49QT4wE5pmhJXOKKCHw= +github.com/anacrolix/tagflag v1.0.0/go.mod h1:1m2U/K6ZT+JZG0+bdMK6qauP49QT4wE5pmhJXOKKCHw= +github.com/anacrolix/tagflag v1.1.0/go.mod h1:Scxs9CV10NQatSmbyjqmqmeQNwGzlNe0CMUMIxqHIG8= +github.com/anacrolix/utp v0.1.0/go.mod h1:MDwc+vsGEq7RMw6lr2GKOEqjWny5hO5OZXRVNaBJ2Dk= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/benbjohnson/immutable v0.2.0/go.mod h1:uc6OHo6PN2++n98KHLxW8ef4W42ylHiQSENghE1ezxI= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bradfitz/iter v0.0.0-20140124041915-454541ec3da2/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo= +github.com/bradfitz/iter v0.0.0-20190303215204-33e6a9893b0c/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo= +github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 h1:GKTyiRCL6zVf5wWaqKnf+7Qs6GbEPfd4iMOitWzXJx8= +github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8/go.mod h1:spo1JLcs67NmW1aVLEgtA8Yy1elc+X8y5SRW1sFW4Og= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cheggaaa/pb/v3 v3.0.8/go.mod h1:UICbiLec/XO6Hw6k+BHEtHeQFzzBH4i2/qk/ow1EJTA= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892 h1:qg9VbHo1TlL0KDM0vYvBG9EY0X0Yku5WYIPoFWt8f6o= github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892/go.mod h1:CTDl0pzVzE5DEzZhPfvhY/9sPFMQIxaJ9VAMs9AagrE= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20180421182945-02af3965c54e/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/flynn/noise v1.0.0 h1:DlTHqmzmvcEiKj+4RYo/imoswx/4r6iBlCMfVtrMXpQ= github.com/flynn/noise v1.0.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= +github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= +github.com/glycerine/go-unsnap-stream v0.0.0-20190901134440-81cf024a9e0a/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= +github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= +github.com/glycerine/goconvey v0.0.0-20190315024820-982ee783a72e/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= +github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/gologme/log v1.2.0/go.mod h1:gq31gQ8wEHkR+WekdWsqDuf8pXTUZA9BnnzTuPz1Y9U= +github.com/gologme/log v1.3.0 h1:l781G4dE+pbigClDSDzSaaYKtiueHCILUa/qSDsmHAo= +github.com/gologme/log v1.3.0/go.mod h1:yKT+DvIPdDdDoPtqFrFxheooyVmoqi0BAsw+erN3wA4= +github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20190309154008-847fc94819f9/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75 h1:f0n1xnMSmBLzVfsMMvriDyA75NB/oBgILX2GcHXIQzY= github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hjson/hjson-go v3.1.0+incompatible h1:DY/9yE8ey8Zv22bY+mHV1uk2yRy0h8tKhZ77hEdi0Aw= github.com/hjson/hjson-go v3.1.0+incompatible/go.mod h1:qsetwF8NlsTsOTwZTApNlTCerV+b2GjYRRcIk4JMFio= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= +github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= +github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= +github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kardianos/minwinsvc v1.0.0/go.mod h1:Bgd0oc+D0Qo3bBytmNtyRKVlp85dAloLKhfxanPFFRc= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lxn/walk v0.0.0-20210112085537-c389da54e794/go.mod h1:E23UucZGqpuUANJooIbHWCufXvOcT6E7Stq81gU+CSQ= +github.com/lxn/win v0.0.0-20210218163916-a377121e959e/go.mod h1:KxxjdtRkfNoYDCUP5ryK7XJJNTnpC8atvtmTheChOtk= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= +github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/neilalexander/utp v0.1.1-0.20210705212447-691f29ad692b h1:XNm+Ks3bVziRJxcMaIbzumWEw7l52z9Rek6cMHgln1g= +github.com/neilalexander/utp v0.1.1-0.20210705212447-691f29ad692b/go.mod h1:ylsx0342RjGHjOoVKhR/wz/7Lhiusonihfj4QLxEMcU= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46/go.mod h1:uAQ5PCi+MFsC7HjREoAz1BU+Mq60+05gifQSsHSDG/8= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/assertions v0.0.0-20190215210624-980c5ac6f3ac/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= +github.com/smartystreets/goconvey v0.0.0-20190306220146-200a235640ff/go.mod h1:KSQcGKpxUMHk3nbYzs/tIBAM2iDooCn0BmttHOJEbLs= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= +github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= +github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= +github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/yggdrasil-network/yggdrasil-go v0.4.2 h1:zqQDVyH1alUfT5ToFh8isGCBLTLNPVjO8Vz/9kpT07A= +github.com/yggdrasil-network/yggdrasil-go v0.4.2/go.mod h1:/iMJjOrXRsjlFgqhWOPhecOKi7xHmHiY4/En3A42Fog= go.cypherpunks.ru/balloon v1.1.1 h1:ypHM1DRf/XuCrp9pDkTHg00CqZX/Np/APb//iHvDJTA= go.cypherpunks.ru/balloon v1.1.1/go.mod h1:k4s4ozrIrhpBjj78Z7LX8ZHxMQ+XE7DZUWl8gP2ojCo= go.cypherpunks.ru/recfile v0.4.3 h1:ephokihmV//p0ob6gx2FWXvm28/NBDbWTOJPUNahxO8= go.cypherpunks.ru/recfile v0.4.3/go.mod h1:sR+KajB+vzofL3SFVFwKt3Fke0FaCcN1g3YPNAhU3qI= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e h1:XpT3nA5TvE525Ne3hInMh6+GETgn27Zfm9dxsThnX2Q= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200413165638-669c56c373c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201018230417-eeed37f84f13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210309040221-94ec62e08169/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210611083646-a4fc73990273/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211107104306-e0b2ad06fe42 h1:G2DDmludOQZoWbpCr7OKDxnl478ZBGMcOhrv+ooX/Q4= -golang.org/x/sys v0.0.0-20211107104306-e0b2ad06fe42/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7-0.20210503195748-5c7c50ebbd4f/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.zx2c4.com/wireguard v0.0.0-20210510202332-9844c74f67ec/go.mod h1:a057zjmoc00UN7gVkaJt2sXVK523kMJcogDTEvPIasg= +golang.zx2c4.com/wireguard v0.0.0-20210604143328-f9b48a961cd2/go.mod h1:laHzsbfMhGSobUmruXWAyMKKHSqvIcrqZJMyHD+/3O8= +golang.zx2c4.com/wireguard/windows v0.3.14/go.mod h1:3P4IEAsb+BjlKZmpUXgy74c0iX9AVwwr3WcVJ8nPgME= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= lukechampine.com/blake3 v1.1.6 h1:H3cROdztr7RCfoaTpGZFQsrqvweFLrqS73j7L7cmR5c= lukechampine.com/blake3 v1.1.6/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= diff --git a/src/humanizer.go b/src/humanizer.go index 49d1fd6ca61d7bed1147ca1b06c69af9cfb6ea724707bd20bf7e2f01e1242afc..bb155617c023c37066962577e027b6fa66f5f329a41e8ee1646101a2813e0ffa 100644 --- a/src/humanizer.go +++ b/src/humanizer.go @@ -1,6 +1,6 @@ /* -NNCP -- Node to Node copy -Copyright (C) 2016-2021 Sergey Matveev +NNCP -- Node to Node copy, utilities for store-and-forward data exchange +Copyright (C) 2016-2022 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 diff --git a/src/jobs.go b/src/jobs.go index dd988a3f6d8a6360950b35c164ff199c27f6f763df2ad6a84601d0cf0aa10764..c844de8428a9a072ef8103e09ada2b8e14484610f130d54836852d266227a7e7 100644 --- a/src/jobs.go +++ b/src/jobs.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/lockdir.go b/src/lockdir.go index 5c2c5f8c928bf97817101e3ae07eb291782d4681841cbf075cfad8456c6a27de..a8adc87f0e36b715b9a549730f46919b02d961fce04f89e713b50cc261196ff9 100644 --- a/src/lockdir.go +++ b/src/lockdir.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/log.go b/src/log.go index 6b1a821d03b400081b4bc1bc0834bf8dfa71ca1e76c764a53397fa77bcb3f74e..bf3d68ed052a7ecacbbf093486b01ba48c316bcadb344919578a0797962cee2d 100644 --- a/src/log.go +++ b/src/log.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/magic.go b/src/magic.go index 1df2cf63674fabe78a355ffcd58426b30b79f72eace009b1bfb6fe115288e41b..c313deb5cbc0ed3bf475c8b9dee9601fb94f658122f1b07f0ab200d12be47259 100644 --- a/src/magic.go +++ b/src/magic.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/mcd.go b/src/mcd.go index 5b64a476eb8ac30f57006858ba8d6f8d214ca0d79d4e1eaa6857807b707810d3..8ce8d5b163f6913863bbed5604a474ef3dd2017daba3665e8137378c0938a87e 100644 --- a/src/mcd.go +++ b/src/mcd.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/mth.go b/src/mth.go index 4572335d62ddb9d1b9458a4c08a6128ce6b1508182191107957ca63caeb59fef..22e96d11651bd77cf3cbac6557daa1828d60e06b9c2f74ccb2ba2ad99401e149 100644 --- a/src/mth.go +++ b/src/mth.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/mth_test.go b/src/mth_test.go index 2e1cfe8cee6cfa71f9382cc12bda0ff2c9c8775e5f816a5abde63c62b0034268..bcb8656052fb370dceb9a305de2cd6d8f6b5549166273880e24e1debb6d62951 100644 --- a/src/mth_test.go +++ b/src/mth_test.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/nncp.go b/src/nncp.go index 0204d9ca63d0adee61d043868dba135afc7fe9e9876e51d62eb6adc6ac8d895a..8806d4cfef56524c6f21ea4e72ac5a7526541a1c5b87693a389e2e73e82adbbc 100644 --- a/src/nncp.go +++ b/src/nncp.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 @@ -40,7 +40,7 @@ const Base32Encoded32Len = 52 var ( - Version string = "8.0.2" + Version string = "8.1.0" Base32Codec *base32.Encoding = base32.StdEncoding.WithPadding(base32.NoPadding) ) @@ -51,7 +51,7 @@ } func UsageHeader() string { return VersionGet() + ` -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 Sergey Matveev License GPLv3: GNU GPL version 3 This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. diff --git a/src/node.go b/src/node.go index e9843505c2d1eb60addbed45e02e264c1faea9cb901c1f10a5f8a01e7dfb9f19..0227a82682e0d31dc97fd07cf5830a70042ed8db83646eeddd3ad26182b12eb4 100644 --- a/src/node.go +++ b/src/node.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/pipe.go b/src/pipe.go index 4b898328f9cebfab5e1c17179c92cdd462144b8878f1bc6b650c3ea494e7f41b..a8557f955a7bcfd0009a92c852cf0c9d4cea259f50044a09ef0999606b1de8a9 100644 --- a/src/pipe.go +++ b/src/pipe.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/pkt.go b/src/pkt.go index 0732454c32b7241f8abc7962accd187a5522c4845524a85274bccd074efc181b..4af44a33a1e36b3b51dd0d4310f3d0e3e4d216146fd81438dfa7516bd57447bf 100644 --- a/src/pkt.go +++ b/src/pkt.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/pkt_test.go b/src/pkt_test.go index 08a23aa154a6c6983078335384d1a268e1186c3794e1ec94f84209ed790cf551..f1a01fdaefb20a249d222eec0e8d205b51583f367634adfa43ba4654013fa912 100644 --- a/src/pkt_test.go +++ b/src/pkt_test.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/progress.go b/src/progress.go index 07848f8a80ad323705a944a47478a95d99ac88afb13a032e5ddee3293680278f..0297b2ed10bf7dbead779b8d9231a4b35309718f66b7cfc747cc7fc9b051b27a 100644 --- a/src/progress.go +++ b/src/progress.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/sp.go b/src/sp.go index a7b699e3d8f791ba6fa5a8a78d0e89aac6985556c74dc21d1e09f52407f867bd..6fa398f27420cdd4e1234bcc1b829b235cc84361152a1abee8d878e321d00fe7 100644 --- a/src/sp.go +++ b/src/sp.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/tmp.go b/src/tmp.go index cda429463e02b503043cabb2ba1f3ab316221ee99e6e6a41659b8d61120b53fb..e1f791f0aefe2d78c50ef4000ea9d8211c55e4ab8d61d92335fa87135c1fe597 100644 --- a/src/tmp.go +++ b/src/tmp.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/toss.go b/src/toss.go index 1eb4d321f557e0470d9799e7dc7af3e39e3849d4db1f0c77f470204342fc62ce..efc320fa43832f2cda0339f26bf8e7c8cc972c574d3f3ab572b6710af1f97def 100644 --- a/src/toss.go +++ b/src/toss.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/toss_test.go b/src/toss_test.go index 08195aa6935d639dfe474cd7728de5f7fefa54c8b94319aafc70a2b979825366..6a34b0e4f8f9ef8f56b48c4084ea2550f090a402bb20d809ce96b02dd0df47ef 100644 --- a/src/toss_test.go +++ b/src/toss_test.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/tx.go b/src/tx.go index e1ca8696a23c296efb23a6dbf9991f6a367ee351ace99b92d78bdf69df5062e2..762f1e165fec997f6024cd4bab8f3d9b3b502f74593a4396dba5e912078304e7 100644 --- a/src/tx.go +++ b/src/tx.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/tx_test.go b/src/tx_test.go index 4af44bb4dd8fd45e132e8507678227758ec54b73a52563030091ed5adea6b5e8..92dc7ce4757f7686aa04d8c9be231acf3eb773383bc675eaf59dc091af52b1eb 100644 --- a/src/tx_test.go +++ b/src/tx_test.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/ucspi.go b/src/ucspi.go index 1d6e165358f5faac7d1fe830d58ef1b325aa4105c53ed0b997146f60f91d19f7..93785de4d4bbdde01740a829918f9532d39d6fa2250a6a1cf14fbd24247b9994 100644 --- a/src/ucspi.go +++ b/src/ucspi.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/via.go b/src/via.go index 1c5cd1e69a5cd50efa5e8443a3ce9866897d20267bf36b69e681f8843d973d80..16808d8fd240c561b864417c290d12a5b92933a4b2c1e47c4218d92aea04a85d 100644 --- a/src/via.go +++ b/src/via.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2022 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 diff --git a/src/yggdrasil.go b/src/yggdrasil.go new file mode 100644 index 0000000000000000000000000000000000000000..1488d33dc2bbd043e52c5fecd81042e4532f925a7cd9ea5e89ea738accd377f6 --- /dev/null +++ b/src/yggdrasil.go @@ -0,0 +1,152 @@ +//go:build !noyggdrasil +// +build !noyggdrasil + +/* +NNCP -- Node to Node copy, utilities for store-and-forward data exchange +Copyright (C) 2016-2022 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, version 3 of the License. + +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 ( + "encoding/hex" + "errors" + "log" + "net" + "strings" + + iwt "github.com/Arceliar/ironwood/types" + gologme "github.com/gologme/log" + "github.com/neilalexander/utp" + ycfg "github.com/yggdrasil-network/yggdrasil-go/src/config" + ycore "github.com/yggdrasil-network/yggdrasil-go/src/core" + "golang.org/x/crypto/ed25519" +) + +var glog *gologme.Logger + +func init() { + glog = gologme.New(log.Writer(), "yggdrasil: ", gologme.Lmsgprefix) + glog.EnableLevel("warn") + glog.EnableLevel("error") + glog.EnableLevel("info") +} + +func NewYggdrasilConn(aliases map[string]string, in string) (ConnDeadlined, error) { + // pub;prv;peer[, ...] + cols := strings.Split(in, ";") + if len(cols) < 3 { + return nil, errors.New("invalid yggdrasil: address format") + } + pubHex, prvHex, peersRaw := cols[0], cols[1], cols[2] + if v, ok := aliases[pubHex]; ok { + pubHex = v + } + if v, ok := aliases[prvHex]; ok { + prvHex = v + } + if v, ok := aliases[peersRaw]; ok { + peersRaw = v + } + peers := strings.Split(peersRaw, ",") + for i, peer := range peers { + if v, ok := aliases[peer]; ok { + peers[i] = v + } + } + addrRaw, err := hex.DecodeString(pubHex) + if err != nil { + return nil, err + } + cfg := ycfg.NodeConfig{ + PrivateKey: prvHex, + Peers: peers, + NodeInfo: map[string]interface{}{"name": "NNCP " + Version}, + NodeInfoPrivacy: true, + } + core := &ycore.Core{} + if err := core.Start(&cfg, glog); err != nil { + return nil, err + } + utpSock, err := utp.NewSocketFromPacketConnNoClose(core) + if err != nil { + return nil, err + } + addr := make(iwt.Addr, ed25519.PublicKeySize) + copy(addr, addrRaw) + return utpSock.DialAddr(addr) +} + +func NewYggdrasilListener(aliases map[string]string, in string) (net.Listener, error) { + // prv;bind[, ...];[pub, ...];[peer, ...] + cols := strings.Split(in, ";") + if len(cols) < 4 { + return nil, errors.New("invalid -yggdrasil address format") + } + prvHex, bindsRaw, pubsRaw, peersRaw := cols[0], cols[1], cols[2], cols[3] + if v, ok := aliases[prvHex]; ok { + prvHex = v + } + if v, ok := aliases[bindsRaw]; ok { + bindsRaw = v + } + binds := strings.Split(bindsRaw, ",") + for i, bind := range binds { + if v, ok := aliases[bind]; ok { + binds[i] = v + } + } + if v, ok := aliases[pubsRaw]; ok { + pubsRaw = v + } + pubs := strings.Split(pubsRaw, ",") + if len(pubs) == 1 && pubs[0] == "" { + pubs = nil + } + for i, pub := range pubs { + if v, ok := aliases[pub]; ok { + pubs[i] = v + } + } + if v, ok := aliases[peersRaw]; ok { + peersRaw = v + } + peers := strings.Split(peersRaw, ",") + if len(peers) == 1 && peers[0] == "" { + peers = nil + } + for i, peer := range peers { + if v, ok := aliases[peer]; ok { + peers[i] = v + } + } + cfg := ycfg.NodeConfig{ + PrivateKey: prvHex, + Listen: binds, + AllowedPublicKeys: pubs, + Peers: peers, + NodeInfo: map[string]interface{}{"name": "NNCP " + Version}, + NodeInfoPrivacy: true, + } + core := &ycore.Core{} + if err := core.Start(&cfg, glog); err != nil { + return nil, err + } + utpSock, err := utp.NewSocketFromPacketConnNoClose(core) + if err != nil { + return nil, err + } + return utpSock, nil +} diff --git a/src/yggdrasil_dummy.go b/src/yggdrasil_dummy.go new file mode 100644 index 0000000000000000000000000000000000000000..05242addfde80f1c7c399e708765be55e26187f73658bf78b7ec494faabb09d4 --- /dev/null +++ b/src/yggdrasil_dummy.go @@ -0,0 +1,37 @@ +//go:build noyggdrasil +// +build noyggdrasil + +/* +NNCP -- Node to Node copy, utilities for store-and-forward data exchange +Copyright (C) 2016-2022 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, version 3 of the License. + +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 ( + "errors" + "net" +) + +var NoYggdrasil = errors.New("no Yggdrasil support is compiled in") + +func NewYggdrasilConn(aliases map[string]string, in string) (ConnDeadlined, error) { + return nil, NoYggdrasil + +} + +func NewYggdrasilListener(aliases map[string]string, in string) (net.Listener, error) { + return nil, NoYggdrasil +}