Commit 61f55b45 authored by Nick Howitt's avatar Nick Howitt

Remove compression from configs - #6

parent 03098d57
Pipeline #60328736 passed with stages
in 11 minutes and 13 seconds
......@@ -5,7 +5,7 @@
/////////////////////////////////////////////////////////////////////////////
$app['basename'] = 'openvpn';
$app['version'] = '2.4.0';
$app['version'] = '2.4.1';
$app['vendor'] = 'ClearFoundation';
$app['packager'] = 'ClearFoundation';
$app['license'] = 'GPLv3';
......
......@@ -78,9 +78,33 @@ CHECK=`grep "^ifconfig-pool-persist /var/lib/openvpn/ipp.txt" /etc/openvpn/clien
if [ -n "$CHECK" ]; then
logger -p local6.notice -t installer "app-openvpn-core - updating ifconfig-pool-persist filename for TCP"
sed -i -e 's/^ifconfig-pool-persist \/var\/lib\/openvpn\/ipp.txt/ifconfig-pool-persist \/var\/lib\/openvpn\/ipp-tcp.txt/' /etc/openvpn/clients-tcp.conf
/sbin/service openvpn restart >/dev/null 2>&1
systemctl condrestart openvpn@clients-tcp >/dev/null 2>&1
fi
# Check for comp-lzo in configs and replace
#------------------------------------------
for CONFIG in $CONFIGS; do
CHECK=`grep "^comp-lzo$" $CONFIG`
if [ -n "$CHECK" ]; then
logger -p local6.notice -t installer "app-openvpn-core - removing comp-lzo in $CONFIG"
sed -i '/comp-lzo/d' $CONFIG
CHECKSTUB=`grep 'compress stub-v2' $CONFIG`
if [ -z "$CHECKSTUB" ]; then
echo 'compress stub-v2' >> $CONFIG
fi
CHECKPUSHSTUB=`grep 'push "compress stub-v2"' $CONFIG`
if [ -z "$CHECKPUSHSTUB" ]; then
echo 'push "compress stub-v2"' >> $CONFIG
fi
systemctl condrestart openvpn@$(basename $CONFIG .conf) >/dev/null 2>&1
fi
done
# Sync action: updates configuration using clearsync hook
#--------------------------------------------------------
......
......@@ -273,21 +273,20 @@ class OpenVPN extends Daemon
$protocol = $this->get_client_protocol();
if ($type == self::TYPE_OS_WINDOWS) {
$config = "client
remote $host $port
dev tun
proto $protocol
resolv-retry infinite
nobind
persist-key
persist-tun
ca $host-ca-cert.pem
cert client-" . $file_id . "-cert.pem
key client-" . $file_id . "-key.pem
ns-cert-type server
comp-lzo
verb 3
auth-user-pass
$config = "client
remote $host $port
dev tun
proto $protocol
resolv-retry infinite
nobind
persist-key
persist-tun
ca $host-ca-cert.pem
cert client-" . $file_id . "-cert.pem
key client-" . $file_id . "-key.pem
ns-cert-type server
verb 3
auth-user-pass
";
} else if (($type == self::TYPE_OS_LINUX) || ($type == self::TYPE_OS_MACOS)) {
$config = "client
......
Name: app-openvpn
Epoch: 1
Version: 2.4.0
Version: 2.4.1
Release: 1%{dist}
Summary: OpenVPN
License: GPLv3
......
......@@ -12,7 +12,8 @@ key /etc/pki/CA/private/sys-0-key.pem
dh /etc/openvpn/ssl/dh1024.pem
server 10.8.10.0 255.255.255.0
keepalive 10 120
comp-lzo
compress stub-v2
push "compress stub-v2"
user nobody
group nobody
persist-key
......
......@@ -12,7 +12,8 @@ key /etc/pki/CA/private/sys-0-key.pem
dh /etc/openvpn/ssl/dh1024.pem
server 10.8.0.0 255.255.255.0
keepalive 10 120
comp-lzo
compress stub-v2
push "compress stub-v2"
user nobody
group nobody
multihome
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment