]> Cypherpunks.ru repositories - nncp.git/blob - doc/cfg/neigh.texi
Add various documentation indices
[nncp.git] / doc / cfg / neigh.texi
1 @node CfgNeigh
2 @cindex neighbour configuration options
3 @section Configuration neighbour options
4
5 @vindex neigh
6 @strong{neigh} section contains all known neighbours information. It
7 always has @strong{self} neighbour that is copy of our node's public
8 data (public keys). It is useful for copy-paste sharing with your
9 friends. Each section's key is a human-readable name of the neighbour.
10
11 @verbatim
12 neigh: {
13   self: {
14     id: RKOLY...KAMXQ
15     exchpub: 2NZKH...CMI7A
16     signpub: EXD7M...YAOFA
17     noisepub: MIXYN...BGNDQ
18     exec: {sendmail: ["/usr/sbin/sendmail"]}
19   }
20   alice: {
21     id: "XJZBK...65IJQ"
22     exchpub: MJACJ...FAI6A
23     signpub: T4AFC...N2FRQ
24     noisepub: UBM5K...VI42A
25     exec: {flag: ["/usr/bin/touch", "-t"]}
26     incoming: "/home/alice/incoming"
27     onlinedeadline: 1800
28     maxonlinetime: 3600
29     addrs: {
30       lan: "[fe80::1234%igb0]:5400"
31       internet: alice.com:3389
32       proxied: "|ssh remote.host nncp-daemon -ucspi"
33     }
34     calls: [
35       {
36         cron: "*/2 * * * *"
37       }
38     ]
39   }
40   bob: {
41     id: 2IZNP...UYGYA
42     exchpub: WFLMZ...B7NHA
43     signpub: GTGXG...IE3OA
44     exec: {
45       sendmail: ["/usr/sbin/sendmail"]
46       warcer: ["/path/to/warcer.sh"]
47       wgeter: ["/path/to/wgeter.sh"]
48     }
49     freq: {
50       path: "/home/bob/pub"
51       chunked: 1024
52       minsize: 2048
53     }
54     via: ["alice"]
55     rxrate: 10
56     txrate: 20
57   }
58 }
59 @end verbatim
60
61 Except for @code{id}, @code{exchpub} and @code{signpub} each neighbour
62 node has the following fields:
63
64 @table @code
65
66 @item noisepub
67     If present, then node can be online called using @ref{Sync,
68     synchronization protocol}. Contains authentication public key.
69
70 @vindex exec
71 @pindex sendmail
72 @anchor{CfgExec}
73 @item exec
74     Dictionary consisting of handles and corresponding command line
75     arguments. In example above there are @command{sendmail} handles,
76     @command{warcer}, @command{wgeter} and @command{flag} one. Remote
77     node can queue some handle execution with providing additional
78     command line arguments and the body fed to command's @code{stdin}.
79
80     @verb{|sendmail: ["/usr/sbin/sendmail", "-t"]|} handle, when called by
81     @verb{|echo hello world | nncp-exec self sendmail ARG0 ARG1 ARG2|}
82     command, will execute:
83
84 @example
85 NNCP_SELF=OURNODE \
86 NNCP_SENDER=REMOTE \
87 NNCP_NICE=64 \
88 /usr/sbin/sendmail -t ARG0 ARG1 ARG2
89 @end example
90
91     feeding @verb{|hello world\n|} to that started @command{sendmail}
92     process.
93
94 @vindex incoming
95 @anchor{CfgIncoming}
96 @item incoming
97     Full path to directory where all file uploads will be saved. May be
98     omitted to forbid file uploading on that node.
99
100 @vindex freq
101 @anchor{CfgFreq}
102 @item freq
103     @table @code
104     @item path
105         Full path to directory from where file requests will queue files
106         for transmission. May be omitted to forbid freqing from that node.
107
108     @item chunked
109         If set, then enable @ref{Chunked, chunked} file transmission
110         during freqing. This is the desired chunk size in KiBs.
111
112     @item minsize
113         If set, then apply @ref{OptMinSize, -minsize} option during file
114         transmission.
115     @end table
116
117 @vindex via
118 @anchor{CfgVia}
119 @item via
120     An array of node identifiers that will be used as a relay to that
121     node. For example @verb{|["foo","bar"]|} means that packet can reach
122     current node by transitioning through @code{foo} and then @code{bar}
123     nodes. May be omitted if direct connection exists and no relaying is
124     required.
125
126 @vindex addrs
127 @anchor{CfgAddrs}
128 @item addrs
129     Dictionary containing known network addresses of the node. Each key
130     is human-readable name of the address. For direct TCP connections
131     use @verb{|host:port|} format, pointing to @ref{nncp-daemon}'s
132     listening instance.
133
134     Also you can pipe connection through the external command using
135     @verb{#|some command#} format. @code{/bin/sh -c "some command"} will
136     start and its @code{stdin}/@code{stdout} used as a connection.
137
138     To use @ref{Yggdrasil} network for connectivity, use
139     @verb{|yggdrasil:PUB;PRV;PEER[,...]|} format, read about
140     @ref{CfgYggdrasilAliases, possible aliases} usage.
141
142     May be omitted if either no direct connection exists, or
143     @ref{nncp-call} is used with forced address specifying.
144
145 @vindex rxrate
146 @vindex txrate
147 @anchor{CfgXxRate}
148 @item rxrate/txrate
149     If greater than zero, then at most *rate packets per second will be
150     sent/received after the handshake. It could be used as crude
151     bandwidth traffic shaper: each packet has at most 64 KiB payload
152     size. If omitted -- no rate limits.
153
154 @vindex onlinedeadline
155 @anchor{CfgOnlineDeadline}
156 @item onlinedeadline
157     Online connection deadline of nodes inactivity in seconds. It is the
158     time connection considered dead after not receiving/sending any
159     packets (except for PINGs) and connection must be terminated. By
160     default it is set to 10 seconds. This can be set to rather high
161     values to keep connection alive (to reduce handshake overhead and
162     delays), wait for appearing packets ready to send and notifying
163     remote side about their appearance.
164
165 @vindex maxonlinetime
166 @anchor{CfgMaxOnlineTime}
167 @item maxonlinetime
168     If greater than zero, then it is maximal time of single connection.
169     Forcefully disconnect if it is exceeded.
170
171 @anchor{CfgCalls}
172 @item calls
173     List of @ref{Call, call configuration}s.
174     Can be omitted if @ref{nncp-caller} won't be used to call that node.
175
176 @end table