README | 2 +- README.RU | 2 +- doc/cfg/index.texi | 8 ++++---- doc/cmd/index.texi | 6 ++++-- doc/contacts.texi | 2 +- doc/download.texi | 6 ++++++ doc/news.ru.texi | 14 ++++++++++++++ doc/news.texi | 13 +++++++++++++ makedist | 5 ++--- ports/nncp/Makefile | 32 -------------------------------- ports/nncp/files/nncp-caller.in | 27 --------------------------- ports/nncp/files/nncp-daemon.in | 30 ------------------------------ ports/nncp/files/nncp-toss.in | 30 ------------------------------ ports/nncp/files/nncp.newsyslog.conf.sample | 1 - ports/nncp/files/pkg-deinstall.in | 9 --------- ports/nncp/files/pkg-install.in | 5 ----- ports/nncp/files/pkg-message.in | 21 --------------------- ports/nncp/pkg-descr | 15 --------------- ports/nncp/pkg-plist | 25 ------------------------- src/ctx.go | 81 ++++++++++++++++++++++++++++++++++++----------------- src/log.go | 10 ++++------ src/nncp.go | 2 +- src/tx.go | 3 --- diff --git a/README b/README index 85a3db2babc07c394fe16c5ec58ea977ab84a2c3aba3eca99f08b1a42fbd42a3..2aafb3e7dcb9aa856bbbee1d2a99f2aca4c49b4f49f4101e1a0128685310d4e4 100644 --- a/README +++ b/README @@ -22,7 +22,7 @@ Home page: http://www.nncpgo.org/ Please send questions regarding the use of NNCP, bug reports and patches to nncp-devel mailing list: -http://lists.cypherpunks.su/nncp_002ddevel.html +http://lists.cypherpunks.su/nncp-devel.html Development Git source code repository currently is located here: http://www.git.cypherpunks.su/?p=nncp.git;a=summary diff --git a/README.RU b/README.RU index bc9f6d52ab47eea3d9db832be082d99a537242b8d1be92112d8f455ed6143428..ea5622f0bcb45479f6cdc78ea6a2345dfccf5c6586a81b2a080faed2b78dcf84 100644 --- a/README.RU +++ b/README.RU @@ -27,7 +27,7 @@ Домашняя страница: http://www.nncpgo.org/ Пожалуйста все вопросы касающиеся использования NNCP, отчёты об ошибках и патчи отправляйте в nncp-devel почтовую рассылку: -http://lists.cypherpunks.su/nncp_002ddevel.html +http://lists.cypherpunks.su/nncp-devel.html Исходный код для разработчика находится в Git репозитории: http://www.git.cypherpunks.su/?p=nncp.git;a=summary diff --git a/doc/cfg/index.texi b/doc/cfg/index.texi index 0a4775805686af8659704c5ad3cd815baf7b4ed3607e70c25541a2115c01822b..a3cdfa2d7e9d5210596eee3da2d1b7236a0f484c5fd83deaf72c434c756abb85 100644 --- a/doc/cfg/index.texi +++ b/doc/cfg/index.texi @@ -3,10 +3,10 @@ @cindex configuration file @unnumbered Configuration file @cindex Hjson -NNCP uses single file configuration file in @url{https://hjson.org/, -Hjson} format (see also section about @ref{Configuration directory, -directory layout}) . Initially it is created with @command{@ref{nncp-cfgnew}} -command and at minimum it can look like this: +NNCP uses single file configuration file in @url{https://hjson.org/, Hjson} +format (see also section about @ref{Configuration directory, directory layout}). +Initially it is created with @command{@ref{nncp-cfgnew}} command and at +minimum it can look like this: @verbatim spool: /var/spool/nncp diff --git a/doc/cmd/index.texi b/doc/cmd/index.texi index 0b8f30360136a1c4df93d5a704045d7f7520df5d9662a0fa8cba21c066b8acde..3aea7f203ee18df9cb792c8f2941ef689130ab484d72ea1d6cba406b6e507392 100644 --- a/doc/cmd/index.texi +++ b/doc/cmd/index.texi @@ -8,8 +8,10 @@ @table @option @vindex NNCPCFG @item -cfg Path to configuration file. May be overridden by @env{$NNCPCFG} - environment variable. If file file is an encrypted @ref{EBlob, - eblob}, then ask for passphrase to decrypt it first. + environment variable. If file file is an encrypted @ref{EBlob, eblob}, + then ask for passphrase to decrypt it first. + If it equals to @code{FD:x}, then read configration file from opened + file descriptor @code{x}. @item -debug Print debug messages. Normally this option should not be used. @item -minsize diff --git a/doc/contacts.texi b/doc/contacts.texi index 1347e7bb1219591335130ffce57d62d65df133326dd23731dd2b1931a2a16a7d..ad91a0c7ba9b702c839b3155fe8405ceec7c9d72322b5092eeb236e9c51d21d5 100644 --- a/doc/contacts.texi +++ b/doc/contacts.texi @@ -6,7 +6,7 @@ @cindex Matrix @unnumbered Contacts Please send questions regarding the use of NNCP, bug reports and patches to -@url{http://lists.cypherpunks.su/nncp_002ddevel.html, nncp-devel} +@url{http://lists.cypherpunks.su/nncp-devel.html, nncp-devel} mailing list. Announcements also go to this mailing list. There are also community-supported @code{#nncp:matrix.org} Matrix diff --git a/doc/download.texi b/doc/download.texi index a2d80d62a20d44c65c18cc0d95115e367c7b6b2a5752d9becab6721044886aab..23f39526d050af6f54b43be9db7e3563e418dc333888b5940d1bccb447c63860 100644 --- a/doc/download.texi +++ b/doc/download.texi @@ -50,6 +50,12 @@ @multitable {XXXXX} {XXXX-XX-XX} {XXXX KiB} {meta4 tar pgp ssh} @headitem Version @tab Date @tab Size @tab Tarball +@item @ref{Release 8_12_1, 8.12.1} @tab 2025-09-20 @tab 2600 KiB @tab +@url{download/nncp-8.12.1.tar.xz.meta4, meta4} +@url{download/nncp-8.12.1.tar.xz, tar} +@url{download/nncp-8.12.1.tar.xz.asc, pgp} +@url{download/nncp-8.12.1.tar.xz.sig, ssh} + @item @ref{Release 8_12_0, 8.12.0} @tab 2025-09-19 @tab 2601 KiB @tab @url{download/nncp-8.12.0.tar.xz.meta4, meta4} @url{download/nncp-8.12.0.tar.xz, tar} diff --git a/doc/news.ru.texi b/doc/news.ru.texi index 119a80254d60d8e9020823a26ce6a2ae65ec8a4d7ac67aaa8ca9cc7a9bff559b..3f9dea016d9e5dc357f56677fc4ef4d5b2a51c6d81c66ae64792dd21a4ada9ec 100644 --- a/doc/news.ru.texi +++ b/doc/news.ru.texi @@ -1,6 +1,20 @@ @node Новости @section Новости +@node Релиз 8.13.0 +@subsection Релиз 8.13.0 +@itemize + +@item +Возможно передавать конфигурационный факт через открытый файловый +дескриптор (@env{$NNCPCFG=FD:0} например для чтения из stdin). + +@item +Убрано излишнее требование наличия приватного ключа мультивещательной +рассылки для отправки в неё. + +@end itemize + @node Релиз 8.12.1 @subsection Релиз 8.12.1 @itemize diff --git a/doc/news.texi b/doc/news.texi index a2306b3467c4a3b054e5093e89cad13fec3788cc402615ca0366c09d1feef945..4bb8e839f1119cd60eabdda6de788a51e20f2f490564f74e6041b0426e448dcf 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -4,6 +4,19 @@ @unnumbered News See also this page @ref{Новости, in russian}. +@node Release 8_13_0 +@section Release 8.13.0 +@itemize + +@item +Ability to pass configuration file through opened file descriptor +(@env{$NNCPCFG=FD:0} for example to read it from stdin). + +@item +Removed excess requirement of having area's private key to send to it. + +@end itemize + @node Release 8_12_1 @section Release 8.12.1 @itemize diff --git a/makedist b/makedist index 4055b224ed95646a848dc3d5a89f1984ddc9eb78d0143081a123c43e17bc3c7e..011320c42aaf4fa52925bda2551b9d6d1f0ca0d6c5f4d6e5db92c38f6ed1dd64 100755 --- a/makedist +++ b/makedist @@ -29,7 +29,6 @@ golang.org/x/sys/windows find github.com/klauspost/compress golang.org/x/sys -name "*_test.go" -delete find . -type d -exec rmdir {} + 2>/dev/null || : cd ../.. -rm -r ports find . \( \ -name .gitignore -o \ -name .travis.yml -o \ @@ -184,7 +183,7 @@ There are mirrors where you can also get the source code tarballs: http://www.nncpgo.org/Mirrors.html Please send questions regarding the use of NNCP, bug reports and patches -to mailing list: http://lists.cypherpunks.su/nncp_002ddevel.html +to mailing list: http://lists.cypherpunks.su/nncp-devel.html EOF echo mutt -s \"[EN] NNCP $release release announcement\" \ nncp-devel@lists.cypherpunks.su \ @@ -241,7 +240,7 @@ http://www.nncpgo.org/Mirrors.html Пожалуйста, все вопросы касающиеся использования NNCP, отчёты об ошибках и патчи отправляйте в nncp-devel почтовую рассылку: -http://lists.cypherpunks.su/nncp_002ddevel.html +http://lists.cypherpunks.su/nncp-devel.html EOF echo mutt -s \"[RU] Состоялся релиз NNCP $release\" \ nncp-devel@lists.cypherpunks.su \ diff --git a/ports/nncp/Makefile b/ports/nncp/Makefile deleted file mode 100644 index b73142fe830009075c5f52733539d12ceeaf27af833adc8cf8133c1f443cc53f..0000000000000000000000000000000000000000 --- a/ports/nncp/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -PORTNAME= nncp -DISTVERSION= 8.8.1 -CATEGORIES= net -MASTER_SITES= http://www.nncpgo.org/download/ - -MAINTAINER= stargrave@stargrave.org -COMMENT= Utilities for secure store-and-forward files, mail, command exchanging -WWW= http://www.nncpgo.org/ - -LICENSE= GPLv3 -LICENSE_FILE= ${WRKSRC}/COPYING - -USES= go:modules,no_targets tar:xz - -USE_RC_SUBR= nncp-caller nncp-daemon nncp-toss - -MAKE_ARGS= INFODIR=${STAGEDIR}${PREFIX}/${INFO_PATH} -MAKE_ENV= ${GO_ENV} -INSTALL_TARGET= install-strip - -SUB_FILES= pkg-message pkg-install pkg-deinstall - -INFO= nncp -PORTDOCS= AUTHORS NEWS NEWS.RU README README.RU THANKS - -OPTIONS_DEFINE= DOCS - -post-install: - ${MKDIR} ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d - ${INSTALL_DATA} ${FILESDIR}/nncp.newsyslog.conf.sample ${STAGEDIR}${PREFIX}/etc/nncp.conf.sample - -.include diff --git a/ports/nncp/files/nncp-caller.in b/ports/nncp/files/nncp-caller.in deleted file mode 100644 index 187103301f277389631046571b4e3e6542274ad98281ca04e8339326863ffc00..0000000000000000000000000000000000000000 --- a/ports/nncp/files/nncp-caller.in +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -# PROVIDE: nncp-caller -# REQUIRE: DAEMON NETWORKING FILESYSTEMS -# KEYWORD: shutdown -# -# Add these lines to /etc/rc.conf.local or /etc/rc.conf -# to enable this service: -# -# nncp_caller_enable (bool): Set to NO by default. -# Set it to YES to enable nncp-caller. -# nncp_caller_config (path): Set to %%PREFIX%%/etc/nncp.hjson by default. - -. /etc/rc.subr - -name=nncp_caller -rcvar=nncp_caller_enable - -load_rc_config $name - -: ${nncp_caller_enable:="NO"} -: ${nncp_caller_config="%%PREFIX%%/etc/nncp.hjson"} - -command=%%PREFIX%%/bin/nncp-caller -command_args="-quiet -cfg $nncp_caller_config &" - -run_rc_command "$1" diff --git a/ports/nncp/files/nncp-daemon.in b/ports/nncp/files/nncp-daemon.in deleted file mode 100644 index 6908e27f197a0d98784a0150590e8886e9b7b3097b11a2c88d7b6beb72940a1b..0000000000000000000000000000000000000000 --- a/ports/nncp/files/nncp-daemon.in +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -# PROVIDE: nncp-daemon -# REQUIRE: DAEMON NETWORKING FILESYSTEMS -# KEYWORD: shutdown -# -# Add these lines to /etc/rc.conf.local or /etc/rc.conf -# to enable this service: -# -# nncp_daemon_enable (bool): Set to NO by default. -# Set it to YES to enable nncp-daemon. -# nncp_daemon_config (path): Set to %%PREFIX%%/etc/nncp.hjson by default. -# nncp_daemon_bind (string): Address:port to bind to -# Default is "[::]:5400". - -. /etc/rc.subr - -name=nncp_daemon -rcvar=nncp_daemon_enable - -load_rc_config $name - -: ${nncp_daemon_enable:="NO"} -: ${nncp_daemon_config="%%PREFIX%%/etc/nncp.hjson"} -: ${nncp_daemon_bind="[::]:5400"} - -command=%%PREFIX%%/bin/nncp-daemon -command_args="-quiet -bind $nncp_daemon_bind -cfg $nncp_daemon_config &" - -run_rc_command "$1" diff --git a/ports/nncp/files/nncp-toss.in b/ports/nncp/files/nncp-toss.in deleted file mode 100644 index f2128783e995a64221c5decac312bd7b0f735b0f7177d9d8efdc0b14ba906637..0000000000000000000000000000000000000000 --- a/ports/nncp/files/nncp-toss.in +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -# PROVIDE: nncp-toss -# REQUIRE: DAEMON NETWORKING FILESYSTEMS -# KEYWORD: shutdown -# -# Add these lines to /etc/rc.conf.local or /etc/rc.conf -# to enable this service: -# -# nncp_toss_enable (bool): Set to NO by default. -# Set it to YES to enable nncp-toss. -# nncp_toss_config (path): Set to %%PREFIX%%/etc/nncp.hjson by default. -# nncp_toss_cycle (int): Repeat tossing after that number of seconds. -# Default is "60". - -. /etc/rc.subr - -name=nncp_toss -rcvar=nncp_toss_enable - -load_rc_config $name - -: ${nncp_toss_enable:="NO"} -: ${nncp_toss_config="%%PREFIX%%/etc/nncp.hjson"} -: ${nncp_toss_cycle="60"} - -command=%%PREFIX%%/bin/nncp-toss -command_args="-quiet -cycle $nncp_toss_cycle -cfg $nncp_toss_config &" - -run_rc_command "$1" diff --git a/ports/nncp/files/nncp.newsyslog.conf.sample b/ports/nncp/files/nncp.newsyslog.conf.sample deleted file mode 100644 index 3cb86ac791c51a8553b475f30633e3dd1ed86de37c474161a00f7ec750fe0649..0000000000000000000000000000000000000000 --- a/ports/nncp/files/nncp.newsyslog.conf.sample +++ /dev/null @@ -1 +0,0 @@ -/var/spool/nncp/log 644 7 100 * BCYN diff --git a/ports/nncp/files/pkg-deinstall.in b/ports/nncp/files/pkg-deinstall.in deleted file mode 100644 index 5174cff0f50e3319e92da30b210da6607056a957b37f31430f921166f664812d..0000000000000000000000000000000000000000 --- a/ports/nncp/files/pkg-deinstall.in +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -[ "$2" = "POST-DEINSTALL" ] || exit 0 - -if [ -e %%PREFIX%%/etc/nncp.hjson ]; then - echo "%%PREFIX%%/etc/nncp.hjson with your private keys is not removed!" -fi - -exec rmdir /var/spool/nncp diff --git a/ports/nncp/files/pkg-install.in b/ports/nncp/files/pkg-install.in deleted file mode 100644 index de68d76d3ad7b164dec50cc9477f14c5f82a87c53dcdea176690407058e52076..0000000000000000000000000000000000000000 --- a/ports/nncp/files/pkg-install.in +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -[ "$2" = "POST-INSTALL" ] || exit 0 - -[ -e /var/spool/nncp ] || exec mkdir -p /var/spool/nncp diff --git a/ports/nncp/files/pkg-message.in b/ports/nncp/files/pkg-message.in deleted file mode 100644 index 78e49dab63b9b3333c33347fd90de0d1823ed0c0da91577b30703673662b899b..0000000000000000000000000000000000000000 --- a/ports/nncp/files/pkg-message.in +++ /dev/null @@ -1,21 +0,0 @@ -[ -{ type: install - message: <%%PREFIX%%/etc/nncp.hjson -EOM -} -] diff --git a/ports/nncp/pkg-descr b/ports/nncp/pkg-descr deleted file mode 100644 index 24614d695ba927cdf5b5a459cf29292fd973e4c4345aaf54b4f1cbd289258c3b..0000000000000000000000000000000000000000 --- a/ports/nncp/pkg-descr +++ /dev/null @@ -1,15 +0,0 @@ -NNCP (Node to Node copy) is a collection of utilities simplifying -secure store-and-forward files, mail and commands exchanging. - -This utilities are intended to help build up small size (dozens of -nodes) ad-hoc friend-to-friend (F2F) statically routed darknet -delay-tolerant networks for fire-and-forget secure reliable files, file -requests, Internet mail and commands transmission. All packets are -integrity checked, end-to-end encrypted (E2EE), explicitly authenticated -by known participants public keys. Onion encryption is applied to -relayed packets. Each node acts both as a client and server, can use -push and poll behaviour model. Also there is multicasting areas support. - -Out-of-box offline sneakernet/floppynet, dead drops, sequential and -append-only CD-ROM/tape storages, air-gapped computers support. But -online TCP daemon with full-duplex resumable data transmission exists. diff --git a/ports/nncp/pkg-plist b/ports/nncp/pkg-plist deleted file mode 100644 index 870d907478f49b702bbbb66457df6ddd4b98e6ee6e6d8526464f9fcc9af17d82..0000000000000000000000000000000000000000 --- a/ports/nncp/pkg-plist +++ /dev/null @@ -1,25 +0,0 @@ -bin/nncp-ack -bin/nncp-bundle -bin/nncp-call -bin/nncp-caller -bin/nncp-cfgdir -bin/nncp-cfgenc -bin/nncp-cfgmin -bin/nncp-cfgnew -bin/nncp-check -bin/nncp-cronexpr -bin/nncp-daemon -bin/nncp-exec -bin/nncp-file -bin/nncp-freq -bin/nncp-hash -bin/nncp-log -bin/nncp-pkt -bin/nncp-reass -bin/nncp-rm -bin/nncp-stat -bin/nncp-toss -bin/nncp-trns -bin/nncp-xfer -@dir etc/newsyslog.conf.d -@sample etc/nncp.conf.sample etc/newsyslog.conf.d/nncp.conf diff --git a/src/ctx.go b/src/ctx.go index 4d9f03c0c8e42218612ea59f7c2c243893a02a2a157260bbb8a42cd981c31fec..6afb7888f01076a2ff59594fdf97abe29f757bd7a97ee06cfa31e31334ac44a6 100644 --- a/src/ctx.go +++ b/src/ctx.go @@ -18,6 +18,7 @@ import ( "errors" "fmt" + "io" "io/fs" "os" "path/filepath" @@ -26,6 +27,8 @@ "strings" "syscall" ) + +const FdPrefix = "FD:" type Ctx struct { Self *NodeOur @@ -95,6 +98,21 @@ } return err } +func openPossibleFd(pth, name string) (*os.File, error) { + if !strings.HasPrefix(pth, FdPrefix) { + return nil, nil + } + ptr, err := strconv.ParseUint(strings.TrimPrefix(pth, FdPrefix), 10, 64) + if err != nil { + return nil, err + } + fd := os.NewFile(uintptr(ptr), name) + if fd == nil { + err = fmt.Errorf("can not open: %s: %s", name, pth) + } + return fd, err +} + func CtxFromCmdline( cfgPath, spoolPath, logPath string, quiet, showPrgrs, omitPrgrs, debug bool, @@ -105,26 +123,42 @@ cfgPath = env } if showPrgrs && omitPrgrs { return nil, errors.New("simultaneous -progress and -noprogress") - } - fi, err := os.Stat(cfgPath) - if err != nil { - return nil, err } var cfg *CfgJSON - if fi.IsDir() { - cfg, err = DirToCfg(cfgPath) - if err != nil { - return nil, err + if fd, err := openPossibleFd(cfgPath, CfgPathEnv); err == nil { + if fd == nil { + fi, err := os.Stat(cfgPath) + if err != nil { + return nil, err + } + if fi.IsDir() { + cfg, err = DirToCfg(cfgPath) + if err != nil { + return nil, err + } + } else { + cfgRaw, err := os.ReadFile(cfgPath) + if err != nil { + return nil, err + } + cfg, err = CfgParse(cfgRaw) + if err != nil { + return nil, err + } + } + } else { + cfgRaw, err := io.ReadAll(fd) + fd.Close() + if err != nil { + return nil, err + } + cfg, err = CfgParse(cfgRaw) + if err != nil { + return nil, err + } } } else { - cfgRaw, err := os.ReadFile(cfgPath) - if err != nil { - return nil, err - } - cfg, err = CfgParse(cfgRaw) - if err != nil { - return nil, err - } + return nil, err } ctx, err := Cfg2Ctx(cfg) if err != nil { @@ -146,17 +180,12 @@ } } else { ctx.LogPath = logPath } - if strings.HasPrefix(ctx.LogPath, LogFdPrefix) { - ptr, err := strconv.ParseUint( - strings.TrimPrefix(ctx.LogPath, LogFdPrefix), 10, 64, - ) - if err != nil { - return nil, err + if fd, err := openPossibleFd(ctx.LogPath, CfgLogEnv); err == nil { + if fd != nil { + LogFd = fd } - LogFd = os.NewFile(uintptr(ptr), CfgLogEnv) - if LogFd == nil { - return nil, errors.New("can not open:" + ctx.LogPath) - } + } else { + return nil, err } if showPrgrs { ctx.ShowPrgrs = true diff --git a/src/log.go b/src/log.go index 5e0b679b2395830223b10dd60bdce127ebcced7f3da154f8a9430e3562fb587f..2a530624259539a3ca701bcb4ebf7446b09bbc52cd7415ae5ac416a773bdb2ca 100644 --- a/src/log.go +++ b/src/log.go @@ -26,8 +26,6 @@ "go.cypherpunks.su/recfile/v3" "golang.org/x/sys/unix" ) -const LogFdPrefix = "FD:" - var ( LogFd *os.File LogFdLock sync.Mutex @@ -47,7 +45,7 @@ if err != nil { panic(err) } _, err = w.WriteFields(recfile.Field{ - F: "When", + F: "When", V: time.Now().UTC().Format(time.RFC3339Nano), }) if err != nil { @@ -57,12 +55,12 @@ for _, le := range les { switch v := le.V.(type) { case int, int8, uint8, int64, uint64: _, err = w.WriteFields(recfile.Field{ - F: le.K, + F: le.K, V: fmt.Sprintf("%d", v), }) case bool: _, err = w.WriteFields(recfile.Field{ - F: le.K, + F: le.K, V: fmt.Sprintf("%v", v), }) case []string: @@ -71,7 +69,7 @@ _, err = w.WriteField(le.K, v) } default: _, err = w.WriteFields(recfile.Field{ - F: le.K, + F: le.K, V: fmt.Sprintf("%s", v), }) } diff --git a/src/nncp.go b/src/nncp.go index 62b933fa3b9cc3979cffca138bf03a43830a4ba24716e21d5954070dd0670f2c..79746f3b860568a1873d80b8a273dc598153fb21a1d79476066ec99df1ad0442 100644 --- a/src/nncp.go +++ b/src/nncp.go @@ -39,7 +39,7 @@ Base32Encoded32Len = 52 ) var ( - Version string = "8.12.1" + Version string = "8.13.0" Base32Codec *base32.Encoding = base32.StdEncoding.WithPadding(base32.NoPadding) ) diff --git a/src/tx.go b/src/tx.go index 79b058afd17e660c68a1610798a96f909162285190e6b6cb032a97cf1fbb2eed..55087542a25fa1e04a8249db29f0a054dd523ad148f09907a7b4e8ce3398e3db 100644 --- a/src/tx.go +++ b/src/tx.go @@ -59,9 +59,6 @@ ) (*Node, int64, string, error) { var area *Area if areaId != nil { area = ctx.AreaId2Area[*areaId] - if area.Prv == nil { - return nil, 0, "", errors.New("area has no encryption keys") - } } hops := make([]*Node, 0, 1+len(node.Via)) hops = append(hops, node)