]> Cypherpunks.ru repositories - govpn.git/blob - doc/server.texi
Add time synchronization requirement option
[govpn.git] / doc / server.texi
1 @node Server
2 @cindex Server
3 @cindex Server part
4 @cindex Server configuration
5 @cindex Server side
6 @cindex govpn-server
7 @section Server part
8
9 Except for common @code{-stats}, @code{-egd} options server has the
10 following ones:
11
12 @table @code
13
14 @item -proto
15 @ref{Network, network protocol} to use. Can be @emph{udp} (default),
16 @emph{tcp} or @emph{all}.
17
18 @item -bind
19 Address (@code{host:port} format) we must bind to.
20
21 @item -conf
22 Path to YAML file with the configuration.
23
24 @item -proxy
25 Start trivial HTTP @ref{Proxy} server on specified @emph{host:port}.
26
27 @end table
28
29 @cindex YAML
30 @cindex YAML configuration
31 @cindex Configuration file
32 Configuration file is YAML file with following example structure:
33
34 @verbatim
35 stargrave: {                        <-- Peer human readable name
36     iface: tap10                    <-- OPTIONAL TAP interface name
37     mtu: 1514                       <-- OPTIONAL overriden MTU
38     up: ./stargrave-up.sh           <-- OPTIONAL up-script
39     down: ./stargrave-down.sh       <-- OPTIONAL down-script
40     timeout: 60                     <-- OPTIONAL overriden timeout
41     timesync: 0                     <-- OPTIONAL time synchronization requirement
42     noise: No                       <-- OPTIONAL noise enabler
43     cpr: 64                         <-- OPTIONAL constant packet rate, KiB/sec
44     encless: No                     <-- OPTIONAL Encryptionless mode
45     verifier: $argon2d...           <-- verifier received from client
46 [...]
47 @end verbatim
48
49 At least one of either @code{iface} or @code{up} must be specified. If
50 you specify @code{iface}, then it will be forcefully used to determine
51 what TAP interface will be used. If it is not specified, then up-script
52 must output interface's name to stdout (first output line).
53
54 For example up-script can be just @code{echo tap10}, or more advanced
55 like the following one:
56
57 @cindex up-script
58
59 @example
60 #!/bin/sh
61 $tap=$(ifconfig tap create)
62 ifconfig $tap inet6 fc00::1/96 mtu 1412 up
63 echo $tap
64 @end example
65
66 Each minute server rereads and refreshes peers configuration and adds
67 newly appeared identities, deletes an obsolete ones.
68
69 You can use convenient @code{utils/newclient.sh} script for new client
70 creation:
71
72 @verbatim
73 % ./utils/newclient.sh Alice
74 [...]
75 Your client verifier is: $argon2d$m=4096,t=128,p=1$bwR5VjeCYIQaa8SeaI3rqg
76
77 Place the following YAML configuration entry on the server's side:
78
79     Alice:
80         up: /path/to/up.sh
81         iface: or TAP interface name
82         verifier: $argon2d$m=4096,t=128,p=1$bwR5VjeCYIQaa8SeaI3rqg$KCNIqfS4DGsBTtVytamAzcISgrlEWvNxan1UfBrFu10
83 @end verbatim
84
85 Example configuration file:
86 @verbatim
87 stargrave:
88     iface: tap0
89     verifier: $argon2d$m=4096,t=128,p=1$VMirzcshcHuG2V4jhUsEjw$X5fC07L8k61h3S1Oro/rC76+m0oGDTA9Bq+aWJ1uOgY
90 slow:
91     iface: tap1
92     encless: Yes
93     mtu: 9000
94     cpr: 384
95     verifier: $argon2d$m=4096,t=128,p=1$YbIA5garDqCOhtI/2EZVNg$gOo5vcEGynmpeepNscwclicfZsWxzgYFRLbgG21EZ1U
96 @end verbatim