Merge pull request #59 from Ivo-tje/develop

Added configurations for OSX/Viscosity
This commit is contained in:
Bigard Florian 2017-07-06 10:52:45 +02:00 committed by GitHub
commit 52ae4db4e1
4 changed files with 32 additions and 2 deletions

View File

@ -22,6 +22,7 @@
<label for="configuration_os">OS</label>
<select name="configuration_os" id="configuration_os" class="form-control">
<option value="gnu_linux">GNU/Linux</option>
<option value="osx_viscosity">OSX/Viscosity</option>
<option value="windows">Windows</option>
</select>
</div>

View File

@ -23,8 +23,9 @@
// Thanks http://stackoverflow.com/questions/4914750/how-to-zip-a-whole-folder-using-php
if($_POST['configuration_os'] == "gnu_linux") {
$conf_dir = 'gnu-linux';
}
else {
} elseif($_POST['configuration_os'] == "osx_viscosity") {
$conf_dir = 'osx-viscosity';
} else {
$conf_dir = 'windows';
}
$rootPath = realpath("./client-conf/$conf_dir");

View File

@ -228,10 +228,12 @@ sed -i "s/\$pass = '';/\$pass = '$mysql_pass';/" "./include/config.php"
# Replace in the client configurations with the ip of the server
sed -i "s/remote xxx\.xxx\.xxx\.xxx 443/remote $ip_server $server_port/" "./client-conf/gnu-linux/client.conf"
sed -i "s/remote xxx\.xxx\.xxx\.xxx 443/remote $ip_server $server_port/" "./client-conf/osx-viscosity/client.conf"
sed -i "s/remote xxx\.xxx\.xxx\.xxx 443/remote $ip_server $server_port/" "./client-conf/windows/client.ovpn"
# Copy ta.key inside the client-conf directory
cp "/etc/openvpn/"{ca.crt,ta.key} "./client-conf/gnu-linux/"
cp "/etc/openvpn/"{ca.crt,ta.key} "./client-conf/osx-viscosity/"
cp "/etc/openvpn/"{ca.crt,ta.key} "./client-conf/windows/"
# Install third parties

View File

@ -0,0 +1,26 @@
client
dev tun
proto tcp-client
remote xxx.xxx.xxx.xxx 443
resolv-retry infinite
cipher AES-256-CBC
redirect-gateway
# Keys
# Identity
ca ca.crt
tls-auth ta.key 1
key-direction 1
remote-cert-tls server
auth-user-pass
auth-nocache
# Security
nobind
persist-key
persist-tun
comp-lzo
verb 3
# Proxy ?
# http-proxy cache.univ.fr 3128