]> Cypherpunks.ru repositories - nncp.git/commitdiff
Merge branch 'develop' 0.3
authorSergey Matveev <stargrave@stargrave.org>
Tue, 17 Jan 2017 19:04:36 +0000 (22:04 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 17 Jan 2017 19:04:36 +0000 (22:04 +0300)
VERSION
doc/download.texi
doc/news.texi
doc/usecases.texi
makedist.sh
src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go
src/cypherpunks.ru/nncp/jobs.go
src/cypherpunks.ru/nncp/sp.go

diff --git a/VERSION b/VERSION
index 3b04cfb60da13a716867848ebeb2191a164887d9..be586341736ee60d6ca2be0f3762a307e8fe79f9 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.2
+0.3
index 7b346042cf5fb96c3d82414ac082833563b665b8..f3029af6860ff1b14ec6f61b7dc740e308f7c89a 100644 (file)
@@ -27,4 +27,8 @@ Tarballs include all necessary required libraries:
 @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
index ce921bbface85d7fcc97150bd09d38925185d3bb..912e2d4a5512d71ea7bbf4162f731e2499e8a011 100644 (file)
@@ -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.
index 8067a93ba6e23f60473f9b178e0bea14d8340bfb..d45eeb4ddf3bac8cc038cc79fcc3ac2cd6336404 100644 (file)
@@ -3,6 +3,7 @@
 
 @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.
@@ -38,6 +39,22 @@ 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
 
index 896e9f0263500badd6275816babd45b25f6b4b3a..ef8f17adf2dcae87bf216749d06cb7a38c1aee06 100755 (executable)
@@ -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"
index 940d8f54549948993299b14ceee7597c5ede2187..9c2b5e211efd96eaaa8acd1fbed765e3bcb41403 100644 (file)
@@ -184,7 +184,7 @@ func main() {
                                fd.Close()
                                continue
                        }
-                       fd.Seek(0, io.SeekStart)
+                       fd.Seek(0, 0)
                        tmp, err := ctx.NewTmpFileWHash()
                        if err != nil {
                                log.Fatalln(err)
index 2bbde622895d3469b0adc51b3027fc38c21377ac..1f3afd1e4f93534347b1826b73e28a62c48c16e1 100644 (file)
@@ -19,7 +19,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 package nncp
 
 import (
-       "io"
        "os"
        "path/filepath"
        "strconv"
@@ -69,7 +68,7 @@ func (ctx *Ctx) Jobs(nodeId *NodeId, xx TRxTx) chan Job {
                                fd.Close()
                                continue
                        }
-                       fd.Seek(0, io.SeekStart)
+                       fd.Seek(0, 0)
                        ctx.LogD("jobs", SDS{
                                "xx":   string(xx),
                                "node": pktEnc.Sender,
index 9a46961aad78c6494f28208f228d0a8b7fbe9e5b..17f62c5aa5ddbba4faf533daec6a7bb6166e2b43 100644 (file)
@@ -571,7 +571,7 @@ func (state *SPState) StartWorkers(conn net.Conn, infosPayloads [][]byte, payloa
                                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 @@ func (state *SPState) ProcessSP(payload []byte) ([][]byte, error) {
                                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 @@ func (state *SPState) ProcessSP(payload []byte) ([][]byte, error) {
                                }
                                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()