From a007827a72bc83991e4ecf4b0aaefee217ad45cb Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 26 Apr 2008 02:07:01 +0000 Subject: Begin adding OpenVPN users feature. --- usr/local/pkg/openvpn.xml | 8 ++++++-- usr/local/pkg/openvpn_cli.xml | 14 +++++++++----- usr/local/pkg/openvpn_csc.xml | 14 +++++++++----- usr/local/www/guiconfig.inc | 10 ++++++++++ usr/local/www/vpn_openvpn_certs.php | 9 +++++---- 5 files changed, 39 insertions(+), 16 deletions(-) (limited to 'usr') diff --git a/usr/local/pkg/openvpn.xml b/usr/local/pkg/openvpn.xml index 9a2aef1..647affd 100644 --- a/usr/local/pkg/openvpn.xml +++ b/usr/local/pkg/openvpn.xml @@ -15,13 +15,17 @@ /pkg.php?xml=openvpn_cli.xml - Client-specific configuration + Client-specific overrides /pkg.php?xml=openvpn_csc.xml - Certificate generation + Certificate Authority /vpn_openvpn_certs.php + + Users + /vpn_openvpn_users.php + diff --git a/usr/local/pkg/openvpn_cli.xml b/usr/local/pkg/openvpn_cli.xml index 2a2e2d7..528fc7a 100644 --- a/usr/local/pkg/openvpn_cli.xml +++ b/usr/local/pkg/openvpn_cli.xml @@ -15,13 +15,17 @@ - Client-specific configuration + Client-specific overrides /pkg.php?xml=openvpn_csc.xml - - Certificate generation - /vpn_openvpn_certs.php - + + Certificate Authority + /vpn_openvpn_certs.php + + + Users + /vpn_openvpn_users.php + diff --git a/usr/local/pkg/openvpn_csc.xml b/usr/local/pkg/openvpn_csc.xml index 70739ce..0e2f986 100644 --- a/usr/local/pkg/openvpn_csc.xml +++ b/usr/local/pkg/openvpn_csc.xml @@ -14,14 +14,18 @@ /pkg.php?xml=openvpn_cli.xml - Client-specific configuration + Client-specific overrides /pkg.php?xml=openvpn_csc.xml - - Certificate generation - /vpn_openvpn_certs.php - + + Certificate Authority + /vpn_openvpn_certs.php + + + Users + /vpn_openvpn_users.php + diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index 7dfd164..4e55472 100755 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -447,6 +447,16 @@ function pptpd_users_sort() { usort($config['pptpd']['user'], "usercmp"); } +function openvpn_users_sort() { + global $g, $config; + + function usercmp($a, $b) { + return strcasecmp($a['name'], $b['name']); + } + + usort($config['openvpn']['user'], "usercmp"); +} + function pppoe_users_sort() { global $g, $config; diff --git a/usr/local/www/vpn_openvpn_certs.php b/usr/local/www/vpn_openvpn_certs.php index 40ba6a9..d4c99cd 100644 --- a/usr/local/www/vpn_openvpn_certs.php +++ b/usr/local/www/vpn_openvpn_certs.php @@ -71,10 +71,11 @@ include("head.inc"); -- cgit v1.1