Browse Source

harmonized generated file names; added default up/down script

master
Robin Thoni 8 years ago
parent
commit
4f597e95e7

+ 1
- 2
vpngen.py View File

297
 
297
 
298
         files_paths = self.get_all_needed_files_paths(vpn_name, client_name)
298
         files_paths = self.get_all_needed_files_paths(vpn_name, client_name)
299
         for file_path in files_paths:
299
         for file_path in files_paths:
300
-            split = os.path.splitext(file_path)
301
-            dest = "%s%s-%s%s" % (client_dir, os.path.basename(split[0]), vpn_name, split[1])
300
+            dest = "%s%s-%s-%s" % (client_dir, client_name, vpn_name, os.path.basename(file_path))
302
             shutil.copy(file_path, dest)
301
             shutil.copy(file_path, dest)
303
 
302
 
304
         split = os.path.splitext(client_conf_file)
303
         split = os.path.splitext(client_conf_file)

+ 8
- 6
vpngen/default/clients/client.conf View File

6
 resolv-retry infinite
6
 resolv-retry infinite
7
 cipher AES-256-CBC
7
 cipher AES-256-CBC
8
 lladdr ${mac}
8
 lladdr ${mac}
9
-ifconfig-noexec
9
+#ifconfig-noexec
10
+up ${client}-${name}-up.sh
11
+down ${client}-${name}-down.sh
10
 
12
 
11
 # Keys
13
 # Keys
12
-ca ca-${name}.crt
13
-cert ${client}-${name}.crt
14
-key ${client}-${name}.key
15
-tls-auth ta-${name}.key 1
14
+ca ${client}-${name}-ca.crt
15
+cert ${client}-${name}-${client}.crt
16
+key ${client}-${name}-${client}.key
17
+tls-auth ${client}-${name}-ta.key 1
16
 key-direction 1
18
 key-direction 1
17
 
19
 
18
 # Security
20
 # Security
21
 persist-tun
23
 persist-tun
22
 comp-lzo
24
 comp-lzo
23
 verb 3
25
 verb 3
24
-
26
+script-security 2

+ 1
- 0
vpngen/default/misc-files/down.sh View File

1
+#! /usr/bin/env sh

+ 1
- 0
vpngen/default/misc-files/up.sh View File

1
+#! /usr/bin/env sh

Loading…
Cancel
Save