summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/status_openvpn.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2017-01-01 11:59:46 -0500
committerjim-p <jimp@pfsense.org>2017-01-01 11:59:46 -0500
commitcbfd0754f31eec1ed7cd75ef261d0b7a51ddecbf (patch)
tree7682c841c16f4bf4c48ba1ad193dc30d7269d66f /src/usr/local/www/status_openvpn.php
parent6f17547aaa073ca460c8bbd8dc1dc5c12922b76d (diff)
downloadpfsense-cbfd0754f31eec1ed7cd75ef261d0b7a51ddecbf.zip
pfsense-cbfd0754f31eec1ed7cd75ef261d0b7a51ddecbf.tar.gz
Add IPv6 virtual address to SSL/TLS client output, formatting corrections/enhancement for SSL/TLS client and server. Ticket #2766
Diffstat (limited to 'src/usr/local/www/status_openvpn.php')
-rw-r--r--src/usr/local/www/status_openvpn.php52
1 files changed, 33 insertions, 19 deletions
diff --git a/src/usr/local/www/status_openvpn.php b/src/usr/local/www/status_openvpn.php
index 1722db6..3139a73 100644
--- a/src/usr/local/www/status_openvpn.php
+++ b/src/usr/local/www/status_openvpn.php
@@ -102,11 +102,9 @@ include("head.inc"); ?>
<tr>
<th><?=gettext("Common Name")?></th>
<th><?=gettext("Real Address")?></th>
- <th><?=gettext("Virtual IPv4 Address"); ?></th>
- <th><?=gettext("Virtual IPv6 Address"); ?></th>
+ <th><?=gettext("Virtual Address"); ?></th>
<th><?=gettext("Connected Since"); ?></th>
- <th><?=gettext("Bytes Sent")?></th>
- <th><?=gettext("Bytes Received")?></th>
+ <th><?=gettext("Bytes Sent/Received")?></th>
<th><!-- Icons --></th>
</tr>
</thead>
@@ -116,13 +114,25 @@ include("head.inc"); ?>
foreach ($server['conns'] as $conn):
?>
<tr id="<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>">
- <td><?=$conn['common_name'];?></td>
+ <td>
+ <?=$conn['common_name'];?>
+ <?php if (!empty($conn['common_name']) && !empty($conn['user_name']) && ($conn['user_name'] != "UNDEF")): ?>
+ <br />
+ <?php endif; ?>
+ <?php if (!empty($conn['user_name']) && ($conn['user_name'] != "UNDEF")): ?>
+ <?=$conn['user_name'];?>
+ <?php endif; ?>
+ </td>
<td><?=$conn['remote_host'];?></td>
- <td><?=$conn['virtual_addr'];?></td>
- <td><?=$conn['virtual_addr6'];?></td>
+ <td>
+ <?=$conn['virtual_addr'];?>
+ <?php if (!empty($conn['virtual_addr']) && !empty($conn['virtual_addr6'])): ?>
+ <br />
+ <?php endif; ?>
+ <?=$conn['virtual_addr6'];?>
+ </td>
<td><?=$conn['connect_time'];?></td>
- <td><?=format_bytes($conn['bytes_sent']);?></td>
- <td><?=format_bytes($conn['bytes_recv']);?></td>
+ <td><?=format_bytes($conn['bytes_sent']);?> / <?=format_bytes($conn['bytes_recv']);?></td>
<td>
<a
onclick="killClient('<?=$server['mgmt'];?>', '<?=$conn['remote_host'];?>');" style="cursor:pointer;"
@@ -228,8 +238,7 @@ include("head.inc"); ?>
<th><?=gettext("Connected Since"); ?></th>
<th><?=gettext("Virtual Address"); ?></th>
<th><?=gettext("Remote Host"); ?></th>
- <th><?=gettext("Bytes Sent"); ?></th>
- <th><?=gettext("Bytes Received"); ?></th>
+ <th><?=gettext("Bytes Sent / Received"); ?></th>
<th><?=gettext("Service"); ?></th>
</tr>
</thead>
@@ -244,8 +253,7 @@ include("head.inc"); ?>
<td><?=$sk_server['connect_time'];?></td>
<td><?=$sk_server['virtual_addr'];?></td>
<td><?=$sk_server['remote_host'];?></td>
- <td><?=format_bytes($sk_server['bytes_sent']);?></td>
- <td><?=format_bytes($sk_server['bytes_recv']);?></td>
+ <td><?=format_bytes($sk_server['bytes_sent']);?> / <?=format_bytes($sk_server['bytes_recv']);?></td>
<td>
<table>
<tr>
@@ -282,10 +290,10 @@ include("head.inc"); ?>
<th><?=gettext("Name"); ?></th>
<th><?=gettext("Status"); ?></th>
<th><?=gettext("Connected Since"); ?></th>
+ <th><?=gettext("Local Address"); ?></th>
<th><?=gettext("Virtual Address"); ?></th>
<th><?=gettext("Remote Host"); ?></th>
- <th><?=gettext("Bytes Sent"); ?></th>
- <th><?=gettext("Bytes Received"); ?></th>
+ <th><?=gettext("Bytes Sent/Received"); ?></th>
<th><?=gettext("Service"); ?></th>
</tr>
</thead>
@@ -298,10 +306,16 @@ include("head.inc"); ?>
<td><?=htmlspecialchars($client['name']);?></td>
<td><?=$client['status'];?></td>
<td><?=$client['connect_time'];?></td>
- <td><?=$client['virtual_addr'];?></td>
- <td><?=$client['remote_host'];?></td>
- <td><?=format_bytes($client['bytes_sent']);?></td>
- <td><?=format_bytes($client['bytes_recv']);?></td>
+ <td><?=$client['local_host'];?>:<?=$client['local_port'];?></td>
+ <td>
+ <?=$client['virtual_addr'];?>
+ <?php if (!empty($client['virtual_addr']) && !empty($client['virtual_addr6'])): ?>
+ <br />
+ <?php endif; ?>
+ <?=$client['virtual_addr6'];?>
+ </td>
+ <td><?=$client['remote_host'];?>:<?=$client['remote_port'];?></td>
+ <td><?=format_bytes($client['bytes_sent']);?> / <?=format_bytes($client['bytes_recv']);?></td>
<td>
<table>
<tr>
OpenPOWER on IntegriCloud