@node Server @section Server part Except for common @code{-mtu}, @code{-stats}, @code{-egd} options server has the following ones: @table @code @item -proto @ref{Network, network protocol} to use. Can be @emph{udp} (default), @emph{tcp} or @emph{all}. @item -bind Address (@code{host:port} format) we must bind to. @item -conf Path to JSON file with the configuration. @item -proxy Start trivial HTTP @ref{Proxy} server on specified @emph{host:port}. @end table Configuration file is JSON file with following example structure: @verbatim { "stargrave": { <-- Peer human readable name "iface": "tap10", <-- OPTIONAL TAP interface name "up": "./stargrave-up.sh", <-- OPTIONAL up-script "down": "./stargrave-down.sh", <-- OPTIONAL down-script "timeout": 60, <-- OPTIONAL overriden timeout "noise": true, <-- OPTIONAL noise enabler (default: false) "cpr": 64, <-- OPTIONAL constant packet rate in KiB/sec "verifier": "$argon2d..." <-- verifier received from client }, [...] } @end verbatim At least one of either @code{iface} or @code{up} must be specified. If you specify @code{iface}, then it will be forcefully used to determine what TAP interface will be used. If it is not specified, then up-script must output interface's name to stdout (first output line). For example up-script can be just @code{echo tap10}, or more advanced like the following one: @example #!/bin/sh $tap=$(ifconfig tap create) ifconfig $tap inet6 fc00::1/96 mtu 1412 up echo $tap @end example Each minute server rereads and refreshes peers configuration and adds newly appeared identities, deletes an obsolete ones. You can use convenient @code{utils/newclient.sh} script for new client creation: @verbatim % ./utils/newclient.sh Alice [...] Your client verifier is: $argon2d$m=4096,t=128,p=1$bwR5VjeCYIQaa8SeaI3rqg Place the following JSON configuration entry on the server's side: "Alice": { "up": "/path/to/up.sh", "iface": "or TAP interface name", "verifier": "$argon2d$m=4096,t=128,p=1$bwR5VjeCYIQaa8SeaI3rqg$KCNIqfS4DGsBTtVytamAzcISgrlEWvNxan1UfBrFu10" } [...] @end verbatim