]> Cypherpunks.ru repositories - govpn.git/blobdiff - doc/server.texi
Ability to explicitly specify TAP interface, without up-script using
[govpn.git] / doc / server.texi
index a00c45219329c0bc460deb2f712e92d6656f3776..7139ab3db45f30a0f0e3e306f88d637575e004c8 100644 (file)
@@ -26,7 +26,8 @@ Configuration file is JSON file with following example structure:
 @verbatim
 {
   "stargrave": {                        <-- Peer human readable name
-    "up": "./stargrave-up.sh",          <-- up-script
+    "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
@@ -39,10 +40,14 @@ Configuration file is JSON file with following example structure:
 }
 @end verbatim
 
-up-script executes each time connection with the client is established.
-Its @emph{stdout} output must contain TAP interface name as the first
-line. This script can be simple @code{echo tap10}, or maybe more
-advanced like this:
+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)
@@ -65,6 +70,7 @@ 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"
     }
 [...]