From 7e587bdbcbd61a7d2488b4f331853eb322916739 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 25 Mar 2007 01:30:31 +0000 Subject: Add back per user bandwidth now that dummynet works correctly --- usr/local/www/services_captiveportal.php | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'usr/local') diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php index d3b8b91..28fde83 100755 --- a/usr/local/www/services_captiveportal.php +++ b/usr/local/www/services_captiveportal.php @@ -62,6 +62,9 @@ $pconfig['httpsname'] = $config['captiveportal']['httpsname']; $pconfig['cert'] = base64_decode($config['captiveportal']['certificate']); $pconfig['key'] = base64_decode($config['captiveportal']['private-key']); $pconfig['logoutwin_enable'] = isset($config['captiveportal']['logoutwin_enable']); +$pconfig['peruserbw'] = isset($config['captiveportal']['peruserbw']); +$pconfig['bwdefaultdn'] = $config['captiveportal']['bwdefaultdn']; +$pconfig['bwdefaultup'] = $config['captiveportal']['bwdefaultup']; $pconfig['nomacfilter'] = isset($config['captiveportal']['nomacfilter']); $pconfig['noconcurrentlogins'] = isset($config['captiveportal']['noconcurrentlogins']); $pconfig['redirurl'] = $config['captiveportal']['redirurl']; @@ -157,6 +160,9 @@ if ($_POST) { $config['captiveportal']['reauthenticateacct'] = $_POST['reauthenticateacct']; $config['captiveportal']['httpslogin'] = $_POST['httpslogin_enable'] ? true : false; $config['captiveportal']['httpsname'] = $_POST['httpsname']; + $config['captiveportal']['peruserbw'] = $_POST['peruserbw'] ? true : false; + $config['captiveportal']['bwdefaultdn'] = $_POST['bwdefaultdn']; + $config['captiveportal']['bwdefaultup'] = $_POST['bwdefaultup']; $config['captiveportal']['certificate'] = base64_encode($_POST['cert']); $config['captiveportal']['private-key'] = base64_encode($_POST['key']); $config['captiveportal']['logoutwin_enable'] = $_POST['logoutwin_enable'] ? true : false; @@ -213,6 +219,9 @@ function enable_change(enable_change) { document.iform.radiuskey.disabled = radius_endis; document.iform.radiuskey2.disabled = radius_endis; document.iform.radacct_enable.disabled = radius_endis; + document.iform.peruserbw.disabled = endis; + document.iform.bwdefaultdn.disabled = endis; + document.iform.bwdefaultup.disabled = endis; document.iform.reauthenticate.disabled = radius_endis; document.iform.auth_method[0].disabled = endis; document.iform.auth_method[1].disabled = endis; @@ -338,7 +347,24 @@ to access after they've authenticated. If this option is set, no attempts will be made to ensure that the MAC address of clients stays the same while they're logged in. This is required when the MAC address of the client cannot be determined (usually because there are routers between pfSense and the clients). If this is enabled, RADIUS MAC authentication cannot be used. - + + + Per-user bandwidth restriction + + > + Enable per-user bandwidth restriction

+ + + + + + + + +
Default download Kbit/s
Default upload Kbit/s
+
+ If this option is set, the captive portal will restrict each user who logs in to the specified default bandwidth. RADIUS can override the default settings. Leave empty or set to 0 for no limit. You will need to enable the traffic shaper for this to be effective. + Authentication -- cgit v1.1