]> Cypherpunks.ru repositories - govpn.git/blobdiff - utils/newclient.sh
Ability to use TUN-interfaces under GNU/Linux
[govpn.git] / utils / newclient.sh
index 4d49ff4cbb199601d856dfbf84794af6c2fb1266..98957ef6fb4bc6e604993c900caf707a10bb6fb4 100755 (executable)
@@ -6,7 +6,7 @@ PATH=$PATH:.
     cat <<EOF
 Example script for creating new user peer for GoVPN.
 It asks for passphrase, generates verifier and shows you example
-JSON entry for server configuration.
+YAML entry for server configuration.
 
 Usage: $0 <username>
 EOF
@@ -14,11 +14,7 @@ EOF
 }
 
 username=$1
-umask 077
-passphrase=$(mktemp)
-$(dirname $0)/storekey.sh $passphrase
-verifier=$(govpn-verifier -key $passphrase)
-rm -f $passphrase
+verifier=$(govpn-verifier)
 verifierS=$(echo $verifier | sed 's/^\(.*\) .*$/\1/')
 verifierC=$(echo $verifier | sed 's/^.* \(.*\)$/\1/')
 echo
@@ -26,28 +22,10 @@ echo
 cat <<EOF
 Your client verifier is: $verifierC
 
-Place the following JSON configuration entry on the server's side:
+Place the following YAML configuration entry on the server's side:
 
-    "$username": {
-        "up": "/path/to/up.sh",
-        "verifier": "$verifierS"
-    }
-
-Verifier was generated with:
-
-    $(dirname $0)/storekey.sh /tmp/passphrase
-    govpn-verifier -key /tmp/passphrase
-
-Create up.sh script that will output on the first line TAP interface
-name that must be used for the peer. For example:
-
-    % umask 077
-    % ed /path/to/up.sh
-    a
-    #!/bin/sh
-    echo tap0
-    .
-    wq
-    20
-    % chmod +x /path/to/up.sh
+    $username:
+        up: /path/to/up.sh
+        iface: or TUN/TAP interface name
+        verifier: $verifierS
 EOF