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