From 5f242576d3269c1bcfa17ff9fe16600067170dff Mon Sep 17 00:00:00 2001 From: PiBa-NL Date: Sun, 9 Feb 2014 19:23:25 +0100 Subject: openvpn, allow for entering client user credentials in the WebGUI --- usr/local/www/vpn_openvpn_client.php | 44 ++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) (limited to 'usr') diff --git a/usr/local/www/vpn_openvpn_client.php b/usr/local/www/vpn_openvpn_client.php index 5604b32..11edd21 100644 --- a/usr/local/www/vpn_openvpn_client.php +++ b/usr/local/www/vpn_openvpn_client.php @@ -96,10 +96,15 @@ if($_GET['act']=="new"){ $pconfig['digest'] = "SHA1"; } +global $simplefields; +$simplefields = array('auth_user','auth_pass'); + if($_GET['act']=="edit"){ if (isset($id) && $a_client[$id]) { - + foreach($simplefields as $stat) + $pconfig[$stat] = $a_client[$id][$stat]; + $pconfig['disable'] = isset($a_client[$id]['disable']); $pconfig['mode'] = $a_client[$id]['mode']; $pconfig['protocol'] = $a_client[$id]['protocol']; @@ -251,7 +256,10 @@ if ($_POST) { if (!$input_errors) { $client = array(); - + + foreach($simplefields as $stat) + update_if_changed($stat, $client[$stat], $_POST[$stat]); + if ($vpnid) $client['vpnid'] = $vpnid; else @@ -628,6 +636,38 @@ if ($savemsg) + + + + + + +
+ + + + + + + + + +
+ +   :  + + + +
+ +   :  + + + +
+ + + -- cgit v1.1