From: Sergey Matveev Date: Sun, 4 Sep 2022 14:24:40 +0000 (+0300) Subject: Merge branch 'develop' X-Git-Tag: v8.8.0^0 X-Git-Url: http://www.git.cypherpunks.ru/?p=nncp.git;a=commitdiff_plain;h=5a45432e26b921c4f1a9c118e4a3f9ab184a5f7d;hp=b6f19d6d9bad1d7d501253a158cf80dc37c43025 Merge branch 'develop' --- diff --git a/doc/.well-known/openpgpkey/nncpgo.org/hu/i4cdqgcarfjdjnba6y4jnf498asg8c6p.asc b/doc/.well-known/openpgpkey/nncpgo.org/hu/i4cdqgcarfjdjnba6y4jnf498asg8c6p.asc index e8cad95..5615567 100644 --- a/doc/.well-known/openpgpkey/nncpgo.org/hu/i4cdqgcarfjdjnba6y4jnf498asg8c6p.asc +++ b/doc/.well-known/openpgpkey/nncpgo.org/hu/i4cdqgcarfjdjnba6y4jnf498asg8c6p.asc @@ -16,6 +16,8 @@ ozgKpXzt9bi10a1hthKluWcZD6Zc4InqQhAGXb2JB2a5wRTs8CkJtHadwBOD3JEt HjfhBAoZMYmhOBeHt87AG5OjFNRIOJ2rRacnRDA3E4h1BBARCAAdFiEEz2Domlkj HnbiY2QirhqBCeSYV+8FAlh0lxYACgkQrhqBCeSYV+9i1QD/bdLAY67nf5giI/wQ i6K7v6PTPFwG6TtG6jj68Cy13RgA/iMuKw7niLwyPWRKzWcMIG1YhVyCNCgKQvFL -vdr6yKbN -=R8E0 +vdr6yKbNiHUEEBYKAB0WIQQSrTJonGYNQmln/XXLggVjIQetigUCYuo7ggAKCRDL +ggVjIQetipd7AQCDFrOVsnUUz0erg3Xja0AwEbaFvlCszMqw4WrER7N76wEAkPhR +LTpxZzCiX0XH91+xCQVU+m5idln1affz7Dntnw4= +=7iHk -----END PGP PUBLIC KEY BLOCK----- diff --git a/doc/download.texi b/doc/download.texi index 8cd1678..e88a98c 100644 --- a/doc/download.texi +++ b/doc/download.texi @@ -14,12 +14,12 @@ Tarballs include all necessary required libraries: @multitable @columnfractions .50 .50 @headitem Library @tab Licence @item @code{github.com/davecgh/go-xdr} @tab ISC -@item @code{github.com/dustin/go-humanize} @tab MIT +@item @code{github.com/dustin/go-humanize} @tab Expat @item @code{github.com/flynn/noise} @tab BSD 3-Clause @item @code{github.com/fsnotify/fsnotify} @tab BSD 3-Clause @item @code{github.com/gorhill/cronexpr} @tab GNU GPLv3 -@item @code{github.com/gosuri/uilive} @tab MIT -@item @code{github.com/hjson/hjson-go} @tab MIT +@item @code{github.com/gosuri/uilive} @tab Expat +@item @code{github.com/hjson/hjson-go} @tab Expat @item @code{github.com/klauspost/compress} @tab BSD 3-Clause @item @code{github.com/klauspost/cpuid} @tab BSD 3-Clause @item @code{go.cypherpunks.ru/balloon} @tab GNU LGPLv3 @@ -29,7 +29,7 @@ Tarballs include all necessary required libraries: @item @code{golang.org/x/sys} @tab BSD 3-Clause @item @code{golang.org/x/term} @tab BSD 3-Clause @item @code{golang.org/x/time} @tab BSD 3-Clause -@item @code{lukechampine.com/blake3} @tab MIT +@item @code{lukechampine.com/blake3} @tab Expat @end multitable And additional ones for Yggdrasil support: @@ -40,15 +40,22 @@ And additional ones for Yggdrasil support: @item @code{github.com/Arceliar/phony} @tab MPLv2 @item @code{github.com/gologme/log} @tab BSD 3-Clause @item @code{github.com/google/btree} @tab Apache 2.0 -@item @code{github.com/huandu/xstrings} @tab MIT +@item @code{github.com/huandu/xstrings} @tab Expat @item @code{github.com/yggdrasil-network/yggdrasil-go} @tab GNU LGPLv3 @item @code{golang.org/x/term} @tab BSD 3-Clause -@item @code{inet.af/netstack} @tab Apache 2.0 +@item @code{gvisor.dev/gvisor} @tab Apache 2.0 @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_7_2, 8.7.2} @tab 2022-03-13 @tab 1673 KiB +@tab + @url{download/nncp-8.7.2.tar.xz.meta4, meta4} + @url{download/nncp-8.7.2.tar.xz, link} + @url{download/nncp-8.7.2.tar.xz.sig, sig} +@tab @code{A0EEC9B0 F33059DE 33F13084 599805D0 F4A1C8C3 79E925BA CFE8DC94 D1DDC23D} + @item @ref{Release 8_7_1, 8.7.1} @tab 2022-03-09 @tab 1669 KiB @tab @url{download/nncp-8.7.1.tar.xz.meta4, meta4} diff --git a/doc/install.texi b/doc/install.texi index e948d81..6850354 100644 --- a/doc/install.texi +++ b/doc/install.texi @@ -40,7 +40,7 @@ NNCP should run on any POSIX-compatible operating system. @pindex go @pindex texinfo NNCP is written on @url{https://go.dev/, Go} programming language -and you have to install Go compiler 1.13+ version. +and you have to install Go compiler 1.17+ version. @url{http://cr.yp.to/redo.html, redo} build system is recommended for convenience. @url{https://www.gnu.org/software/texinfo/, Texinfo} is used for building documentation (although tarballs already include it). diff --git a/doc/integration/warc.texi b/doc/integration/warc.texi index 4c58729..f449ed5 100644 --- a/doc/integration/warc.texi +++ b/doc/integration/warc.texi @@ -64,6 +64,10 @@ $ wget [--page-requisites] [--recursive] \ [@dots{}] http://www.example.com/ @end example +@pindex crawl +Or even more simpler @url{https://git.jordan.im/crawl/tree/README.md, crawl} +utility written on Go too. + @pindex tofuproxy That command will create @file{www.example.com-XXX.warc} web archive. It could produce specialized segmented diff --git a/doc/integrity.texi b/doc/integrity.texi index 7ece02c..fcc114a 100644 --- a/doc/integrity.texi +++ b/doc/integrity.texi @@ -27,7 +27,7 @@ uid NNCP releases @item @example $ gpg --auto-key-locate dane --locate-keys releases at nncpgo dot org -$ gpg --auto-key-locate wkd --locate-keys releases at nncpgo dot org +$ gpg --auto-key-locate wkd --locate-keys releases at nncpgo dot org @end example @item diff --git a/doc/mirrors.texi b/doc/mirrors.texi index 315543a..f5f514f 100644 --- a/doc/mirrors.texi +++ b/doc/mirrors.texi @@ -3,10 +3,9 @@ @unnumbered Mirrors Main NNCP website is hosted on two geographically distant servers -located in Moscow region, Russian Federation. One of server's IPv6 -connectivity is provided by Hurricane Electric tunnel broker. Only one -of those servers supports TLS and another just proxies the traffic to -it. So TLS-capable version has less availability. +located in Moscow region, Russian Federation. Only one of those servers +supports TLS and another just proxies the traffic to it. So TLS-capable +version has less availability. @cindex DANE @cindex DNSCurve @@ -18,7 +17,7 @@ in turn can be authenticated with @url{https://dnscurve.org/, DNSCurve}-secured @url{http://www.stargrave.org/Trust-anchor.html, trust anchors}. Both @code{ca.cypherpunks.ru} and DNSCurve trust anchors are -signed with @code{CF60 E89A 5923 1E76 E263 6422 AE1A 8109 E498 57EF} +signed with @code{12AD 3268 9C66 0D42 6967 FD75 CB82 0563 2107 AD8A} @url{https://en.wikipedia.org/wiki/OpenPGP, OpenPGP} @url{http://www.stargrave.org/Contacts.html, public key}. @@ -30,12 +29,12 @@ accessible address: @url{http://y.www.nncpgo.org/}. @cindex quux.org @item @url{https://nncp.mirrors.quux.org/} -Its creation @url{http://lists.cypherpunks.ru/archive/nncp-devel/2108/0310.html, announcement}. +Its creation @url{http://lists.cypherpunks.ru/archive/nncp-devel/87lf5fjvwb.fsf@@complete.org/T/, announcement}. Mirror of the whole NNCP's website with all tarballs, made by John Goerzen. It uses @url{https://letsencrypt.org/, Let's Encrypt} certificate authority, so can be more easily accessible for some people. If you have got NNCP-peering with -@url{http://lists.cypherpunks.ru/archive/nncp-devel/2108/0283.html, nncp.quux.org} +@url{http://lists.cypherpunks.ru/archive/nncp-devel/20210731121239.j3grg2di22vfc6ne@@faeroes.freeshell.org/T/, nncp.quux.org} node, then you can also @ref{nncp-freq, freq} the @ref{Tarballs, tarballs} from it. diff --git a/doc/news.ru.texi b/doc/news.ru.texi index bfc287c..e305914 100644 --- a/doc/news.ru.texi +++ b/doc/news.ru.texi @@ -1,6 +1,21 @@ @node Новости @section Новости +@node Релиз 8.8.0 +@subsection Релиз 8.8.0 +@itemize + +@item +Исправлена невозможность сборки под Go 1.19. + +@item +Минимальная требуемая версия Go 1.17. + +@item +Обновлены зависимые библиотеки. + +@end itemize + @node Релиз 8.7.2 @subsection Релиз 8.7.2 @itemize diff --git a/doc/news.texi b/doc/news.texi index 326308a..c640a99 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -4,6 +4,21 @@ See also this page @ref{Новости, on russian}. +@node Release 8_8_0 +@section Release 8.8.0 +@itemize + +@item +Fixed buildability under Go 1.19. + +@item +Minimal required Go version is 1.17. + +@item +Updated dependencies. + +@end itemize + @node Release 8_7_2 @section Release 8.7.2 @itemize @@ -412,7 +427,7 @@ the check in infinite cycle. @itemize @item -Minimal required Go version 1.13. +Minimal required Go version is 1.13. @item Merkle Tree-based Hashing with BLAKE3 (MTH) is used instead of BLAKE2b. diff --git a/doc/yggdrasil.texi b/doc/yggdrasil.texi index 6492375..054da5e 100644 --- a/doc/yggdrasil.texi +++ b/doc/yggdrasil.texi @@ -109,8 +109,8 @@ $ nncp-daemon -yggdrasil "yggdrasils://571f...07ea:6789"\ "&pub=c6b7...9469"\ "&pub=eb2d...ca07"\ "&peer=tcp://example.com:2345"\ -"&peer=tcp://another.peer:3456%3Fkey=f879...2e9b" -"&mcast=.*:5400" +"&peer=tcp://another.peer:3456%3Fkey=f879...2e9b"\ +"&mcast=.*:5400"\ "&mcast=lo0" @end example diff --git a/makedist.sh b/makedist.sh index 00c1bb0..245ae6c 100755 --- a/makedist.sh +++ b/makedist.sh @@ -19,7 +19,7 @@ rm -r \ github.com/hjson/hjson-go/build_release.sh \ github.com/klauspost/compress/gen.sh \ github.com/klauspost/compress/gzhttp \ - github.com/klauspost/compress/internal \ + github.com/klauspost/compress/internal/snapref \ github.com/klauspost/compress/s2* \ github.com/klauspost/compress/snappy \ github.com/klauspost/compress/zstd/snappy.go \ @@ -36,7 +36,7 @@ find . \( \ -name .gitattributes \) -delete mkdir contrib -cp ~/work/redo/minimal/do contrib/do +cp ~/work/redo/apenwarr/minimal/do contrib/do cat > doc/download.texi <.` const Base32Encoded32Len = 52 var ( - Version string = "8.7.2" + Version string = "8.8.0" Base32Codec *base32.Encoding = base32.StdEncoding.WithPadding(base32.NoPadding) ) diff --git a/src/toss.go b/src/toss.go index 79cc50f..d6c74c4 100644 --- a/src/toss.go +++ b/src/toss.go @@ -1063,7 +1063,7 @@ func (ctx *Ctx) Toss( sharedKey, _, _, err = PktEncRead( ctx.Self, ctx.Neigh, - bufio.NewReader(fd), + bufio.NewReaderSize(fd, MTHBlockSize), pipeWB, sharedKey == nil, sharedKey, diff --git a/src/tx.go b/src/tx.go index e38084e..f7f099b 100644 --- a/src/tx.go +++ b/src/tx.go @@ -388,7 +388,9 @@ func prepareTxFile(srcPath string) ( fd.Close() return w.CloseWithError(err) } - if _, err = io.Copy(tarWr, bufio.NewReader(fd)); err != nil { + if _, err = io.Copy( + tarWr, bufio.NewReaderSize(fd, MTHBlockSize), + ); err != nil { fd.Close() return w.CloseWithError(err) } @@ -441,7 +443,7 @@ func (ctx *Ctx) TxFile( _, finalSize, pktName, err := ctx.Tx( node, pkt, nice, srcSize, minSize, maxSize, - bufio.NewReader(reader), dstPath, areaId, + bufio.NewReaderSize(reader, MTHBlockSize), dstPath, areaId, ) les := LEs{ {"Type", "file"}, @@ -469,7 +471,7 @@ func (ctx *Ctx) TxFile( return err } - br := bufio.NewReader(reader) + br := bufio.NewReaderSize(reader, MTHBlockSize) var sizeFull int64 var chunkNum int checksums := [][MTHSize]byte{} diff --git a/src/yggdrasil/tcpip.go b/src/yggdrasil/tcpip.go index b602dc1..a1a71ac 100644 --- a/src/yggdrasil/tcpip.go +++ b/src/yggdrasil/tcpip.go @@ -31,13 +31,13 @@ import ( iwt "github.com/Arceliar/ironwood/types" yaddr "github.com/yggdrasil-network/yggdrasil-go/src/address" "golang.org/x/crypto/ed25519" - "inet.af/netstack/tcpip" - "inet.af/netstack/tcpip/adapters/gonet" - "inet.af/netstack/tcpip/buffer" - "inet.af/netstack/tcpip/header" - "inet.af/netstack/tcpip/network/ipv6" - "inet.af/netstack/tcpip/stack" - "inet.af/netstack/tcpip/transport/tcp" + "gvisor.dev/gvisor/pkg/bufferv2" + "gvisor.dev/gvisor/pkg/tcpip" + "gvisor.dev/gvisor/pkg/tcpip/adapters/gonet" + "gvisor.dev/gvisor/pkg/tcpip/header" + "gvisor.dev/gvisor/pkg/tcpip/network/ipv6" + "gvisor.dev/gvisor/pkg/tcpip/stack" + "gvisor.dev/gvisor/pkg/tcpip/transport/tcp" ) const IPv6HdrSize = 40 @@ -68,13 +68,9 @@ func (*TCPIPEndpoint) LinkAddress() tcpip.LinkAddress { return "" } func (*TCPIPEndpoint) Wait() {} -func (e *TCPIPEndpoint) WritePacket( - _ stack.RouteInfo, - _ tcpip.NetworkProtocolNumber, - pkt *stack.PacketBuffer, -) tcpip.Error { - vv := buffer.NewVectorisedView(pkt.Size(), pkt.Views()) - n, err := vv.Read(e.writeBuf) +func (e *TCPIPEndpoint) WritePacket(pkt *stack.PacketBuffer) tcpip.Error { + v := pkt.ToView() + n, err := v.Read(e.writeBuf) if err != nil { log.Println(err) return &tcpip.ErrAborted{} @@ -93,12 +89,14 @@ func (e *TCPIPEndpoint) WritePacket( return nil } -func (e *TCPIPEndpoint) WritePackets( - stack.RouteInfo, - stack.PacketBufferList, - tcpip.NetworkProtocolNumber, -) (int, tcpip.Error) { - panic("not implemented") +func (e *TCPIPEndpoint) WritePackets(pbs stack.PacketBufferList) (int, tcpip.Error) { + for i, pb := range pbs.AsSlice() { + err := e.WritePacket(pb) + if err != nil { + return i + 1, err + } + } + return len(pbs.AsSlice()), nil } func (e *TCPIPEndpoint) WriteRawPacket(*stack.PacketBuffer) tcpip.Error { @@ -107,13 +105,7 @@ func (e *TCPIPEndpoint) WriteRawPacket(*stack.PacketBuffer) tcpip.Error { func (*TCPIPEndpoint) ARPHardwareType() header.ARPHardwareType { return header.ARPHardwareNone } -func (e *TCPIPEndpoint) AddHeader( - tcpip.LinkAddress, - tcpip.LinkAddress, - tcpip.NetworkProtocolNumber, - *stack.PacketBuffer, -) { -} +func (e *TCPIPEndpoint) AddHeader(*stack.PacketBuffer) {} func convertToFullAddr(ip net.IP, port int) (tcpip.FullAddress, tcpip.NetworkProtocolNumber) { return tcpip.FullAddress{ @@ -193,11 +185,9 @@ func NewTCPIPEndpoint( e.ipToAddr[ip] = from } pkb := stack.NewPacketBuffer(stack.PacketBufferOptions{ - Data: buffer.NewVectorisedView(n, []buffer.View{ - buffer.NewViewFromBytes(e.readBuf[:n]), - }), + Payload: bufferv2.MakeWithData(e.readBuf[:n]), }) - e.d.DeliverNetworkPacket("", "", ipv6.ProtocolNumber, pkb) + e.d.DeliverNetworkPacket(ipv6.ProtocolNumber, pkb) } }() return &e, nil