Example YAML configuration file:
spool: /var/spool/nncp log: /var/spool/nncp/log notify: file: from: nncp@localhost to: email@example.com freq: from: nncp@localhost to: firstname.lastname@example.org self: id: TIJQL...2NGIA exchpub: CYVGQ...PSEWQ exchprv: 65PUY...MPZ3Q signpub: 2NMVC...CMH5Q signprv: 555JD...RGD6Y noiseprv: D62XU...NKYPA noisepub: KIBKK...ESM7Q neigh: self: id: TIJQL...2NGIA exchpub: CYVGQ...PSEWQ signpub: 2NMVC...CMH5Q noisepub: KIBKK...ESM7Q exec: sendmail: [/usr/sbin/sendmail] alice: id: XJZBK...65IJQ exchpub: MJACJ...FAI6A signpub: T4AFC...N2FRQ noisepub: UBM5K...VI42A exec: flag: ["/usr/bin/touch", "-t"] incoming: /home/alice/incoming onlinedeadline: 1800 maxonlinetime: 3600 addrs: lan: "[fe80::1234%igb0]:5400" internet: alice.com:3389 calls: - cron: "*/2 * * * *" bob: id: 2IZNP...UYGYA exchpub: WFLMZ...B7NHA signpub: GTGXG...IE3OA exec: sendmail: [/usr/sbin/sendmail] warcer: [/path/to/warcer.sh] wgeter: [/path/to/wgeter.sh] freq: /home/bob/pub freqchunked: 1024 freqminsize: 2048 via: [alice] rxrate: 10 txrate: 20
spool field contains an absolute path to spool directory. log field contains an absolute path to log file.
notify section contains notification settings for successfully tossed file and freq packets. Corresponding from and to fields will be substituted in notification email message. neigh/self/exec/sendmail will be used as a local mailer. You can omit either of those two from/to sections to omit corresponding notifications, or the whole section at once.
self section contains our node’s private keypairs. exch* and sign* are used during encrypted packet creation. noise* are used during synchronization protocol working in nncp-call/nncp-daemon.
neigh section contains all known neighbours information. It always has self neighbour that is copy of our node’s public data (public keys). It is useful for copy-paste sharing with your friends. Each section’s key is a human-readable name of the neighbour.
Except for id, exchpub and signpub each neighbour node has the following fields:
If present, then node can be online called using synchronization protocol. Contains authentication public key.
Dictionary consisting of handles and corresponding command line
arguments. In example above there are
flag one. Remote node
can queue some handle execution with providing additional command line
arguments and the body fed to command’s stdin.
sendmail: ["/usr/sbin/sendmail", "-t"] handle, when called by echo hello world | nncp-exec OURNODE sendmail ARG0 ARG1 ARG2 command, will execute:
echo hello world | NNCP_SELF=OURNODE \ NNCP_SENDER=REMOTE \ NNCP_NICE=64 \ /usr/sbin/sendmail -t ARG0 ARG1 ARG2
Full path to directory where all file uploads will be saved. May be omitted to forbid file uploading on that node.
Full path to directory from where file requests will queue files for transmission. May be omitted to forbid freqing from that node.
If set, then enable chunked file transmission during freqing. This is the desired chunk size in KiBs.
If set, then apply -minsize option during file transmission.
An array of node identifiers that will be used as a relay to that node. For example [foo,bar] means that packet can reach current node by transitioning through foo and then bar nodes. May be omitted if direct connection exists and no relaying is required.
Dictionary containing known network addresses of the node. Each key is human-readable name of the link/address. Values are addr:port pairs pointing to nncp-daemon’s listening instance. May be omitted if either no direct connection exists, or nncp-call is used with forced address specifying.
If greater than zero, then at most *rate packets per second will be sent/received after the handshake. It could be used as crude bandwidth traffic shaper: each packet has at most 64 KiB payload size. Could be omitted at all – no rate limits.
Online connection deadline of node inactivity in seconds. It is the time connection considered dead after not receiving/sending any packets and node must disconnect. By default it is set to 10 seconds – that means disconnecting after 10 seconds when no packets received and transmitted. This can be set to rather high values to keep connection alive (to reduce handshake overhead and delays), wait for appearing packets ready to send and notifying remote side about their appearance.
If greater than zero, then it is maximal amount of time connect could be alive. Forcefully disconnect if it is exceeded.
List of call configurations. Can be omitted if nncp-caller won’t be used to call that node.