]> Cypherpunks.ru repositories - govpn.git/blob - doc/server.texi
Replace -noncediff with the hash keeping up to 256 seen nonces
[govpn.git] / doc / server.texi
1 @node Server part
2 @section Server part
3
4 Except for common @code{-mtu}, @code{-stats}, @code{-egd} options server
5 has the following ones:
6
7 @table @code
8 @item -bind
9 Address (@code{host:port} format) we must bind to.
10 @item -peers
11 Path to the directory containing peers information, database.
12 @end table
13
14 Peers directory must contain subdirectories with the names of client's
15 identities in hexadecimal notation. Each subdirectory has the following
16 files:
17
18 @table @code
19
20 @item verifier
21 @strong{Required}. Contains corresponding verifier used to authenticate
22 the client in hexadecimal notation. See @ref{Verifier} for how
23 to create it.
24
25 @item up.sh
26 @strong{Required}. up-script executes each time connection with the
27 client is established. It's @emph{stdout} output must contain TAP
28 interface name on the first string. This script can be simple
29 @code{echo tap10}, or maybe more advanced like this:
30     @example
31     #!/bin/sh
32     $tap=$(ifconfig tap create)
33     ifconfig $tap inet6 fc00::1/96 mtu 1412 up
34     echo $tap
35     @end example
36
37 @item down.sh
38 Optional. Same as @code{up.sh} above, but executes when connection is
39 lost.
40
41 @item name
42 Optional. Contains human readable username. Used to beauty output of
43 @ref{Stats}.
44
45 @item timeout
46 Optional. Contains @ref{Timeout} setting (decimal notation) in seconds.
47 Otherwise default minute timeout will be used.
48
49 @item noise
50 Optional. Contains either "1" (enable @ref{Noise} adding), or "0".
51
52 @item cpr
53 Optional. Contains @ref{CPR} setting (decimal notation) in KiB/sec.
54
55 @end table
56
57 Each minute server refreshes peers directory contents and adds newly
58 appeared identities, deletes an obsolete ones.
59
60 You can use convenient @code{utils/newclient.sh} script for new client
61 creation:
62
63 @example
64 % ./utils/newclient.sh Alice
65 Place verifier to peers/9b40701bdaf522f2b291cb039490312/verifier
66 @end example
67
68 @code{9b40701bdaf522f2b291cb039490312} is client's identification.
69 @code{peers/9b40701bdaf522f2b291cb039490312/name} contains @emph{Alice},
70 @code{peers/9b40701bdaf522f2b291cb039490312/verifier} contains dummy
71 verifier and @code{peers/9b40701bdaf522f2b291cb039490312/up.sh} contains
72 currently dummy empty up-script.