VERSION | 2 +- doc/download.texi | 4 ++++ doc/news.texi | 4 ++++ doc/usecases.texi | 17 +++++++++++++++++ makedist.sh | 1 + src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go | 2 +- src/cypherpunks.ru/nncp/jobs.go | 3 +-- src/cypherpunks.ru/nncp/sp.go | 6 +++--- diff --git a/VERSION b/VERSION index 66985cfb1a8eafd4882ca0374a3ee3ac10c567239e63920b2ad6fc302bc1ddaa..cae6c688f13ebc7d1fe765a26e8091edf1c44c934d3bab97d4345973be03b3eb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2 +0.3 diff --git a/doc/download.texi b/doc/download.texi index 8c4b13227f3589eab08fae75bfe25cb912129628402ae0788c2b769ba49329dc..11d0fbf55370672d1a020969264f66c50529f89b418fe986d62d18aa69e8a1aa 100644 --- a/doc/download.texi +++ b/doc/download.texi @@ -27,4 +27,8 @@ @item 0.1 @tab 720 KiB @tab @url{download/nncp-0.1.tar.xz, link} @url{download/nncp-0.1.tar.xz.sig, sign} @tab @code{8F71D65B 70865EBF FE802CDF A5C14D00 A9FD6559 FD722E60 5D97E82C 5E2412C2} +@item @ref{Release 0.2, 0.2} @tab 740 KiB +@tab @url{download/nncp-0.2.tar.xz, link} @url{download/nncp-0.2.tar.xz.sig, sign} +@tab @code{00BEAC5A 0C4083B0 42E3152B ACA6FF20 12768B82 CE24D716 8E04279C ECE14DB7} + @end multitable diff --git a/doc/news.texi b/doc/news.texi index 8dd8f7e8b4f18a235bbd6c69533c884dbf2baf03efcf0b8e278a3b320ff41bee..1fbe18da5de053a8712b4164a00e8b699c1377f92225e1b532e9ac7988cc7e40 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -20,3 +20,7 @@ allowable online connection aliveness time. @item @ref{nncp-caller} command appeared: cron-ed TCP daemon caller. @item @ref{nncp-pkt} command can decompress the data. @end itemize + +@node Release 0.3 +@section Release 0.3 +Fixed compatibility with Go 1.6. diff --git a/doc/usecases.texi b/doc/usecases.texi index 8714b13ac19c69d6a95ad69ef3655f22c9242241a0834cc124deae5ba616d9d0..38b23b03548c1eda2eb42283c9bf5c3cb6f02f649337ebd6327cbf7d18e58d0f 100644 --- a/doc/usecases.texi +++ b/doc/usecases.texi @@ -3,6 +3,7 @@ @unnumbered Use cases @menu * Occasional connection to mail server: UsecaseMail. +* Lightweight fast POP3/IMAP4 replacement: UsecasePOP. * Unreliable/expensive communication link: UsecaseUnreliable. * Slow/expensive link for high-volume data, bad QoS: UsecaseQoS. * Extreme terrestrial environments, no link: UsecaseNoLink. @@ -37,6 +38,22 @@ Look @ref{Postfix, here} for further information. All mail will be stored in NNCP @ref{Spool, spool}, that after exchanging and tossing will call local @command{sendmail} command to deliver them just like that happened on the same machine. + +@node UsecasePOP +@section Lightweight fast POP3/IMAP4 replacement + +@ref{nncp-daemon} can be connected with @ref{nncp-caller} for a long +time -- it can create TCP connection that lasts for many hours. When +SMTP server receives mail, it will call @ref{nncp-mail} creating an +outbound encrypted packet. Daemon checks outbound directory each second +and immediately sends notification about undelivered packets to remote +side, that also downloads it at once. + +There are only dozens of bytes notifying about incoming packets, dozens +of bytes telling to download those packets. Mail packets are compressed +(POP3 and IMAP4 as a rule do not). You have lightweight, compressed, +low-delay, reliable link for the mail with strong encryption and mutual +sides authentication! @node UsecaseUnreliable @section Unreliable/expensive communication link diff --git a/makedist.sh b/makedist.sh index 0a5bd8eafdf2d64d7d36b211cdb28c7cbe4afb4a04627a7629480b0500096fda..4c0a81352796c5e5715f18c0d4d97e8ad86eb482d664fe1a20beb8bca68e8fc6 100755 --- a/makedist.sh +++ b/makedist.sh @@ -75,6 +75,7 @@ rm -r doc/.well-known doc/nncp.html/.well-known find . -name .git -type d | xargs rm -fr find . -name .gitignore -delete +rm .gitmodules cd .. tar cvf nncp-"$release".tar nncp-"$release" diff --git a/src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go b/src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go index 6b5023137751fdd783e3b53f8252359e7d458236888aa817c22a628baace2129..091f5c9f52db7c07baf04131b2e46cae1bf720eb414aa8eb30d93ed5b8ca69ac 100644 --- a/src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go +++ b/src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go @@ -184,7 +184,7 @@ ctx.LogD("nncp-xfer", sds, "too nice") fd.Close() continue } - fd.Seek(0, io.SeekStart) + fd.Seek(0, 0) tmp, err := ctx.NewTmpFileWHash() if err != nil { log.Fatalln(err) diff --git a/src/cypherpunks.ru/nncp/jobs.go b/src/cypherpunks.ru/nncp/jobs.go index 37f84b43b043a74c1d42003e6f8d9c0d323962e926fc4f22b9a5401428e46f95..f93463916445f4585cbca79d9ec42d3705d7b1d0aca6761e4d23b6d9358e9bd5 100644 --- a/src/cypherpunks.ru/nncp/jobs.go +++ b/src/cypherpunks.ru/nncp/jobs.go @@ -19,7 +19,6 @@ package nncp import ( - "io" "os" "path/filepath" "strconv" @@ -69,7 +68,7 @@ if _, err = xdr.Unmarshal(fd, &pktEnc); err != nil || pktEnc.Magic != MagicNNCPEv1 { fd.Close() continue } - fd.Seek(0, io.SeekStart) + fd.Seek(0, 0) ctx.LogD("jobs", SDS{ "xx": string(xx), "node": pktEnc.Sender, diff --git a/src/cypherpunks.ru/nncp/sp.go b/src/cypherpunks.ru/nncp/sp.go index 2d714f1ea099f0e95ce0456cb679204f69fb12120e81ceda95e6348e9dac0a84..5b0213376dffe90bfa03a9c5286879a7f4d224ffc8520283037edc371112afa5 100644 --- a/src/cypherpunks.ru/nncp/sp.go +++ b/src/cypherpunks.ru/nncp/sp.go @@ -571,7 +571,7 @@ fullSize := uint64(fi.Size()) var buf []byte if freq.Offset < fullSize { state.ctx.LogD("sp-file", sdsp, "seeking") - if _, err = fd.Seek(int64(freq.Offset), io.SeekStart); err != nil { + if _, err = fd.Seek(int64(freq.Offset), 0); err != nil { state.ctx.LogE("sp-file", SdsAdd(sdsp, SDS{"err": err}), "") break } @@ -813,7 +813,7 @@ "sp-file", SdsAdd(sdsp, SDS{"offset": strconv.FormatInt(int64(file.Offset), 10)}), "seeking", ) - if _, err = fd.Seek(int64(file.Offset), io.SeekStart); err != nil { + if _, err = fd.Seek(int64(file.Offset), 0); err != nil { state.ctx.LogE("sp-file", SdsAdd(sdsp, SDS{"err": err}), "") fd.Close() return nil, err @@ -841,7 +841,7 @@ return } state.wg.Add(1) defer state.wg.Done() - fd.Seek(0, io.SeekStart) + fd.Seek(0, 0) state.ctx.LogD("sp-file", sdsp, "checking") gut, err := Check(fd, file.Hash[:]) fd.Close()