diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-03-25 01:30:31 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-03-25 01:30:31 +0000 |
commit | 7e587bdbcbd61a7d2488b4f331853eb322916739 (patch) | |
tree | 61a376b1a18678ec46b9f0f5cd1ac6c55af6b71c /usr | |
parent | 54473744539091dd6ee6428a8a94e57caf6a0215 (diff) | |
download | pfsense-7e587bdbcbd61a7d2488b4f331853eb322916739.zip pfsense-7e587bdbcbd61a7d2488b4f331853eb322916739.tar.gz |
Add back per user bandwidth now that dummynet works correctly
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/services_captiveportal.php | 28 |
1 files changed, 27 insertions, 1 deletions
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.</td> 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.</td> - </tr> + </tr> + <tr> + <td valign="top" class="vncell">Per-user bandwidth restriction</td> + <td class="vtable"> + <input name="peruserbw" type="checkbox" class="formfld" id="peruserbw" value="yes" <?php if ($pconfig['peruserbw']) echo "checked"; ?>> + <strong>Enable per-user bandwidth restriction</strong><br><br> + <table cellpadding="0" cellspacing="0"> + <tr> + <td>Default download</td> + <td><input type="text" class="formfld" name="bwdefaultdn" id="bwdefaultdn" size="10" value="<?=htmlspecialchars($pconfig['bwdefaultdn']);?>"> Kbit/s</td> + </tr> + <tr> + <td>Default upload</td> + <td><input type="text" class="formfld" name="bwdefaultup" id="bwdefaultup" size="10" value="<?=htmlspecialchars($pconfig['bwdefaultup']);?>"> Kbit/s</td> + </tr></table> + <br> + 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 <strong>need</strong> to enable the traffic shaper for this to be effective.</td> + </tr> <tr> <td width="22%" valign="top" class="vncell">Authentication</td> <td width="78%" class="vtable"> |