2 @unnumbered Configuration file
4 Example YAML configuration file:
8 log: /var/spool/nncp/log
12 to: user+file@example.com
15 to: user+freq@example.com
18 exchpub: CYVGQ...PSEWQ
19 exchprv: 65PUY...MPZ3Q
20 signpub: 2NMVC...CMH5Q
21 signprv: 555JD...RGD6Y
22 noiseprv: D62XU...NKYPA
23 noisepub: KIBKK...ESM7Q
27 exchpub: CYVGQ...PSEWQ
28 signpub: 2NMVC...CMH5Q
29 noisepub: KIBKK...ESM7Q
31 sendmail: [/usr/sbin/sendmail]
34 exchpub: MJACJ...FAI6A
35 signpub: T4AFC...N2FRQ
36 noisepub: UBM5K...VI42A
38 flag: ["/usr/bin/touch", "-t"]
39 incoming: /home/alice/incoming
43 lan: "[fe80::1234%igb0]:5400"
44 internet: alice.com:3389
50 exchpub: WFLMZ...B7NHA
51 signpub: GTGXG...IE3OA
53 sendmail: [/usr/sbin/sendmail]
54 warcer: [/path/to/warcer.sh]
55 wgeter: [/path/to/wgeter.sh]
62 @strong{spool} field contains an absolute path to @ref{Spool, spool}
63 directory. @strong{log} field contains an absolute path to @ref{Log,
67 @strong{notify} section contains notification settings for successfully
68 tossed file and freq packets. Corresponding @strong{from} and
69 @strong{to} fields will be substituted in notification email message.
70 @emph{neigh/self/exec/sendmail} will be used as a local mailer. You can
71 omit either of those two @emph{from}/@emph{to} sections to omit
72 corresponding notifications, or the whole section at once.
74 @strong{self} section contains our node's private keypairs.
75 @strong{exch*} and @strong{sign*} are used during @ref{Encrypted,
76 encrypted} packet creation. @strong{noise*} are used during @ref{Sync,
77 synchronization protocol} working in @ref{nncp-call}/@ref{nncp-daemon}.
79 @strong{neigh} section contains all known neighbours information. It
80 always has @strong{self} neighbour that is copy of our node's public
81 data (public keys). It is useful for copy-paste sharing with your
82 friends. Each section's key is a human-readable name of the neighbour.
84 Except for @emph{id}, @emph{exchpub} and @emph{signpub} each neighbour
85 node has the following fields:
90 If present, then node can be online called using @ref{Sync,
91 synchronization protocol}. Contains authentication public key.
95 Dictionary consisting of handles and corresponding command line
96 arguments. In example above there are @command{sendmail} handles,
97 @command{warcer}, @command{wgeter} and @command{flag} one. Remote node
98 can queue some handle execution with providing additional command line
99 arguments and the body fed to command's stdin.
101 @verb{|sendmail: ["/usr/sbin/sendmail", "-t"]|} handle, when called by
102 @verb{|echo hello world | nncp-exec OURNODE sendmail ARG0 ARG1 ARG2|}
103 command, will execute:
110 /usr/sbin/sendmail -t ARG0 ARG1 ARG2
115 Full path to directory where all file uploads will be saved. May be
116 omitted to forbid file uploading on that node.
120 Full path to directory from where file requests will queue files for
121 transmission. May be omitted to forbid freqing from that node.
124 If set, then enable @ref{Chunked, chunked} file transmission during
125 freqing. This is the desired chunk size in KiBs.
128 If set, then apply @ref{OptMinSize, -minsize} option during file
133 An array of node identifiers that will be used as a relay to that node.
134 For example @verb{|[foo,bar]|} means that packet can reach current node
135 by transitioning through @emph{foo} and then @emph{bar} nodes. May be
136 omitted if direct connection exists and no relaying is required.
140 Dictionary containing known network addresses of the node. Each key is
141 human-readable name of the link/address. Values are @verb{|addr:port|}
142 pairs pointing to @ref{nncp-daemon}'s listening instance. May be omitted
143 if either no direct connection exists, or @ref{nncp-call} is used with
144 forced address specifying.
146 @anchor{CfgOnlineDeadline}
148 Online connection deadline of node inactivity in seconds. It is the time
149 connection considered dead after not receiving/sending any packets and
150 node must disconnect. By default it is set to 10 seconds -- that means
151 disconnecting after 10 seconds when no packets received and transmitted.
152 This can be set to rather high values to keep connection alive (to
153 reduce handshake overhead and delays), wait for appearing packets ready
154 to send and notifying remote side about their appearance.
156 @anchor{CfgMaxOnlineTime}
158 If greater than zero, then it is maximal amount of time connect could be
159 alive. Forcefully disconnect if it is exceeded.
163 List of @ref{Call, call configuration}s. Can be omitted if
164 @ref{nncp-caller} won't be used to call that node.