]> Cypherpunks.ru repositories - nncp.git/blob - doc/cfg.texi
Documentation updates
[nncp.git] / doc / cfg.texi
1 @node Configuration
2 @unnumbered Configuration file
3
4 Example YAML configuration file:
5
6 @verbatim
7 spool: /var/spool/nncp
8 log: /var/spool/nncp/log
9 notify:
10   file:
11     from: nncp@localhost
12     to: user+file@example.com
13   freq:
14     from: nncp@localhost
15     to: user+freq@example.com
16 self:
17   id: TIJQL...2NGIA
18   exchpub: CYVGQ...PSEWQ
19   exchprv: 65PUY...MPZ3Q
20   signpub: 2NMVC...CMH5Q
21   signprv: 555JD...RGD6Y
22   noiseprv: D62XU...NKYPA
23   noisepub: KIBKK...ESM7Q
24 neigh:
25   self:
26     id: TIJQL...2NGIA
27     exchpub: CYVGQ...PSEWQ
28     signpub: 2NMVC...CMH5Q
29     noisepub: KIBKK...ESM7Q
30     sendmail: [/usr/sbin/sendmail]
31   alice:
32     id: XJZBK...65IJQ
33     exchpub: MJACJ...FAI6A
34     signpub: T4AFC...N2FRQ
35     noisepub: UBM5K...VI42A
36     sendmail: [/bin/sh, -c, false]
37     incoming: /home/alice/incoming
38     addrs:
39       lan: "[fe80::1234%igb0]:5400"
40       internet: alice.com:3389
41   bob:
42     id: 2IZNP...UYGYA
43     exchpub: WFLMZ...B7NHA
44     signpub: GTGXG...IE3OA
45     noisepub: EQAZM...J3NBA
46     sendmail: [/usr/sbin/sendmail]
47     freq: /home/bob/pub
48     via: [alice]
49 @end verbatim
50
51 @strong{spool} field contains an absolute path to @ref{Spool, spool}
52 directory. @strong{log} field contains an absolute path to @ref{Log,
53 log} file.
54
55 @strong{notify} section contains notification settings for successfully
56 tossed file and file request packets. Corresponding @strong{from} and
57 @strong{to} fields will substituted in notification email message.
58 @emph{neigh/self/sendmail} will be used as a local mailer. If
59 either of @emph{from}/@emph{to} fields are omitted, then no notification
60 will be sent.
61
62 @strong{self} section contains our node's private keypairs.
63 @strong{exch*} and @strong{sign*} are used during @ref{Encrypted,
64 encrypted} packet creation. @strong{noise*} are used during @ref{Sync,
65 sync protocol} working in @ref{nncp-call}/@ref{nncp-daemon}.
66
67 @strong{neigh} section contains all known neighbours information. It
68 always has @strong{self} neighbour that is copy of our node's public
69 data (public keys). It is useful for copy-paste sharing with your
70 friends. Each section's key is a human-readable name of the neighbour.
71
72 Except for @emph{id}, @emph{exchpub} and @emph{signpub} each node has
73 the following fields:
74
75 @table @strong
76 @item noisepub
77 Must be present, but can be dummy (only zeros) if no online
78 communication using @ref{Sync, sync protocol} will be used.
79
80 @item sendmail
81 An array containing path to executable and its command line arguments
82 that is called for mail sending.
83
84 @item incoming
85 Full path to directory where all file uploads will be saved. May be
86 omitted to forbid file uploading on that node.
87
88 @item freq
89 Full path to directory from where file requests will queue files for
90 transmission. May be omitted to forbid freqing from that node.
91
92 @item via
93 An array of node identifiers that will be used as a relay to that node.
94 For example @code{[foo,bar]} means that packet can reach current node by
95 transitioning through @code{foo} and then @code{bar} nodes. May be
96 omitted if direct connection exists and no relaying is required.
97
98 @item addrs
99 Dictionary containing known network addresses of the node. Each key is
100 human-readable name of the link/address. Values are @code{addr:port}
101 pairs pointing to @ref{nncp-daemon}'s listening instance. May be omitted
102 if either no direct connection exists, or @ref{nncp-call} is used with
103 forced address specifying.
104 @end table