mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Merge pull request #25 from chewitt/openvpn
openvpn: re-add openvpn to core builds Briefly run-time tested - binaries and sample config files all present.
This commit is contained in:
commit
d17c8141e0
@ -393,6 +393,7 @@ show_config() {
|
||||
config_message="$config_message\n - SAMBA mounting support:\t\t $SAMBA_SUPPORT"
|
||||
config_message="$config_message\n - SAMBA server support:\t\t $SAMBA_SERVER"
|
||||
config_message="$config_message\n - SFTP server support:\t\t\t $SFTP_SERVER"
|
||||
config_message="$config_message\n - OpenVPN support:\t\t\t $OPENVPN_SUPPORT"
|
||||
|
||||
# OS configuration
|
||||
|
||||
|
@ -110,6 +110,9 @@
|
||||
# build and install SFTP Server (yes / no)
|
||||
SFTP_SERVER="yes"
|
||||
|
||||
# build and install OpenVPN support (yes / no)
|
||||
OPENVPN_SUPPORT="yes"
|
||||
|
||||
# build and install diskmounter support (udevil)
|
||||
# this service provide auto mounting support for external drives in the
|
||||
# mediacenter also automount internally drives at boottime via udev (yes / no)
|
||||
|
52
packages/network/openvpn/package.mk
Normal file
52
packages/network/openvpn/package.mk
Normal file
@ -0,0 +1,52 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - http://libreelec.tv
|
||||
# Copyright (C) 2016 Christian Hewitt (chewitt@libreelec.tv)
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="openvpn"
|
||||
PKG_VERSION="2.3.10"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://openvpn.net"
|
||||
PKG_URL="http://swupdate.openvpn.org/community/releases/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS_TARGET="toolchain lzo libressl"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="network"
|
||||
PKG_SHORTDESC="openvpn: a full featured SSL VPN software solution that integrates OpenVPN server capabilities."
|
||||
PKG_LONGDESC="OpenVPN Access Server is a full featured SSL VPN software solution that integrates OpenVPN server capabilities, enterprise management capabilities, simplified OpenVPN Connect UI, and OpenVPN Client software packages that accommodate Windows, MAC, and Linux OS environments. OpenVPN Access Server supports a wide range of configurations, including secure and granular remote access to internal network and/ or private cloud network resources and applications with fine-grained access control."
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="ac_cv_have_decl_TUNSETPERSIST=no \
|
||||
--disable-server \
|
||||
--enable-password-save \
|
||||
--disable-plugins \
|
||||
--enable-iproute2 IPROUTE=/sbin/ip \
|
||||
--enable-management \
|
||||
--disable-socks \
|
||||
--disable-http-proxy \
|
||||
--enable-fragment \
|
||||
--disable-multihome \
|
||||
--disable-port-share \
|
||||
--disable-debug"
|
||||
|
||||
post_makeinstall_target() {
|
||||
mkdir -p $INSTALL/usr/bin
|
||||
ln -sf ../sbin/openvpn $INSTALL/usr/bin/openvpn
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
From 03642f257c958d1dfcfb75188d1a74cee4d02503 Mon Sep 17 00:00:00 2001
|
||||
From: Niels Ole Salscheider <niels_ole@salscheider-online.de>
|
||||
Date: Sun, 10 Jan 2016 11:53:29 +0100
|
||||
Subject: [PATCH] Fix build with libressl
|
||||
|
||||
---
|
||||
src/openvpn/ssl_openssl.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c
|
||||
index d2f40e7..e390f4d 100644
|
||||
--- a/src/openvpn/ssl_openssl.c
|
||||
+++ b/src/openvpn/ssl_openssl.c
|
||||
@@ -358,7 +358,7 @@ tls_ctx_check_cert_time (const struct tls_root_ctx *ctx)
|
||||
|
||||
ASSERT (ctx);
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
/* OpenSSL 1.0.2 and up */
|
||||
cert = SSL_CTX_get0_certificate (ctx->ctx);
|
||||
#else
|
||||
@@ -393,7 +393,7 @@ tls_ctx_check_cert_time (const struct tls_root_ctx *ctx)
|
||||
}
|
||||
|
||||
cleanup:
|
||||
-#if OPENSSL_VERSION_NUMBER < 0x10002000L
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
SSL_free (ssl);
|
||||
#endif
|
||||
return;
|
@ -0,0 +1,44 @@
|
||||
[Unit]
|
||||
Description=OpenVPN Autorun Service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
Requires=network-online.service
|
||||
After=network-online.service
|
||||
ExecStart=/usr/sbin/openvpn --daemon --config /storage/.config/openvpn.config
|
||||
Restart=always
|
||||
RestartSec=15
|
||||
|
||||
[Install]
|
||||
WantedBy=kodi.target
|
||||
|
||||
# NOTES:
|
||||
#
|
||||
# 1) Edit /storage/.config/openvpn.config to the .config/.conf/.ovpn file
|
||||
# from your VPN service provider and test it works first by connecting at
|
||||
# the console:
|
||||
#
|
||||
# /usr/sbin/openvpn --daemon --config /storage/.config/openvpn.config
|
||||
#
|
||||
# 2) The openvpn.service file must be addeded to the active systemd config
|
||||
# before it will work. This is done by running:
|
||||
#
|
||||
# systemctl enable openvpn.service
|
||||
#
|
||||
# 3) If you suspend/resume your LibreELEC system you will need to stop and
|
||||
# restart the connection with a systemd *.power script, e.g.
|
||||
#
|
||||
# mkdir -p /storage/.config/sleep.d
|
||||
# nano /storage/.config/sleep.d/01-openvpn.power
|
||||
#
|
||||
# Copy the sample script below. Remove # marks except for #!/bin/bash
|
||||
#
|
||||
# #!/bin/sh
|
||||
# case "$1" in
|
||||
# pre)
|
||||
# systemctl stop openvpn.service
|
||||
# ;;
|
||||
# post)
|
||||
# systemctl start openvpn.service
|
||||
# ;;
|
||||
# esac
|
@ -23,7 +23,7 @@ PKG_ARCH="any"
|
||||
PKG_LICENSE="various"
|
||||
PKG_SITE="http://www.openelec.tv"
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS_TARGET="toolchain connman iana-etc ethtool openssh"
|
||||
PKG_DEPENDS_TARGET="toolchain connman iana-etc ethtool openssh openvpn"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="virtual"
|
||||
PKG_SHORTDESC="network: Metapackage for packages to install network support"
|
||||
|
Loading…
x
Reference in New Issue
Block a user