]> Cypherpunks.ru repositories - govpn.git/blob - doc/server.texi
[DOC] Encryptionless mode
[govpn.git] / doc / server.texi
1 @node Server
2 @section Server part
3
4 Except for common @code{-stats}, @code{-egd} options server has the
5 following ones:
6
7 @table @code
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 JSON 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 JSON file with following example structure:
25
26 @verbatim
27 {
28   "stargrave": {                        <-- Peer human readable name
29     "iface": "tap10",                   <-- OPTIONAL TAP interface name
30     "mtu": 1514,                        <-- OPTIONAL overriden MTU
31     "up": "./stargrave-up.sh",          <-- OPTIONAL up-script
32     "down": "./stargrave-down.sh",      <-- OPTIONAL down-script
33     "timeout": 60,                      <-- OPTIONAL overriden timeout
34     "noise": true,                      <-- OPTIONAL noise enabler
35                                             (default: false)
36     "cpr": 64,                          <-- OPTIONAL constant packet
37                                             rate in KiB/sec
38     "encless": false,                   <-- OPTIONAL Encryptionless mode
39     "verifier": "$argon2d..."           <-- verifier received from client
40   },
41   [...]
42 }
43 @end verbatim
44
45 At least one of either @code{iface} or @code{up} must be specified. If
46 you specify @code{iface}, then it will be forcefully used to determine
47 what TAP interface will be used. If it is not specified, then up-script
48 must output interface's name to stdout (first output line).
49
50 For example up-script can be just @code{echo tap10}, or more advanced
51 like the following one:
52
53 @example
54 #!/bin/sh
55 $tap=$(ifconfig tap create)
56 ifconfig $tap inet6 fc00::1/96 mtu 1412 up
57 echo $tap
58 @end example
59
60 Each minute server rereads and refreshes peers configuration and adds
61 newly appeared identities, deletes an obsolete ones.
62
63 You can use convenient @code{utils/newclient.sh} script for new client
64 creation:
65
66 @verbatim
67 % ./utils/newclient.sh Alice
68 [...]
69 Your client verifier is: $argon2d$m=4096,t=128,p=1$bwR5VjeCYIQaa8SeaI3rqg
70
71 Place the following JSON configuration entry on the server's side:
72
73     "Alice": {
74         "up": "/path/to/up.sh",
75         "iface": "or TAP interface name",
76         "verifier": "$argon2d$m=4096,t=128,p=1$bwR5VjeCYIQaa8SeaI3rqg$KCNIqfS4DGsBTtVytamAzcISgrlEWvNxan1UfBrFu10"
77     }
78 [...]
79 @end verbatim