Project

General

Profile

« Previous | Next » 

Revision cbfd0754

Added by Jim Pingle over 8 years ago

Add IPv6 virtual address to SSL/TLS client output, formatting corrections/enhancement for SSL/TLS client and server. Ticket #2766

View differences:

src/etc/inc/openvpn.inc
1543 1543
				$client['connect_time'] = date("D M j G:i:s Y", $list[0]);
1544 1544
				$client['virtual_addr'] = $list[3];
1545 1545
				$client['remote_host'] = $list[4];
1546
				$client['remote_port'] = $list[5];
1547
				$client['local_host'] = $list[6];
1548
				$client['local_port'] = $list[7];
1549
				$client['virtual_addr6'] = $list[8];
1546 1550
			}
1547 1551
			if (strstr($line, "CONNECTING")) {
1548 1552
				$client['status'] = "connecting";
src/usr/local/www/status_openvpn.php
102 102
					<tr>
103 103
						<th><?=gettext("Common Name")?></th>
104 104
						<th><?=gettext("Real Address")?></th>
105
						<th><?=gettext("Virtual IPv4 Address"); ?></th>
106
						<th><?=gettext("Virtual IPv6 Address"); ?></th>
105
						<th><?=gettext("Virtual Address"); ?></th>
107 106
						<th><?=gettext("Connected Since"); ?></th>
108
						<th><?=gettext("Bytes Sent")?></th>
109
						<th><?=gettext("Bytes Received")?></th>
107
						<th><?=gettext("Bytes Sent/Received")?></th>
110 108
						<th><!-- Icons --></th>
111 109
					</tr>
112 110
				</thead>
......
116 114
							foreach ($server['conns'] as $conn):
117 115
					?>
118 116
					<tr id="<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>">
119
						<td><?=$conn['common_name'];?></td>
117
						<td>
118
							<?=$conn['common_name'];?>
119
					<?php if (!empty($conn['common_name']) && !empty($conn['user_name']) && ($conn['user_name'] != "UNDEF")): ?>
120
							<br />
121
					<?php endif; ?>
122
					<?php if (!empty($conn['user_name']) && ($conn['user_name'] != "UNDEF")): ?>
123
							<?=$conn['user_name'];?>
124
					<?php endif; ?>
125
						</td>
120 126
						<td><?=$conn['remote_host'];?></td>
121
						<td><?=$conn['virtual_addr'];?></td>
122
						<td><?=$conn['virtual_addr6'];?></td>
127
						<td>
128
							<?=$conn['virtual_addr'];?>
129
					<?php if (!empty($conn['virtual_addr']) && !empty($conn['virtual_addr6'])): ?>
130
							<br />
131
					<?php endif; ?>
132
							<?=$conn['virtual_addr6'];?>
133
						</td>
123 134
						<td><?=$conn['connect_time'];?></td>
124
						<td><?=format_bytes($conn['bytes_sent']);?></td>
125
						<td><?=format_bytes($conn['bytes_recv']);?></td>
135
						<td><?=format_bytes($conn['bytes_sent']);?> / <?=format_bytes($conn['bytes_recv']);?></td>
126 136
						<td>
127 137
							<a
128 138
							   onclick="killClient('<?=$server['mgmt'];?>', '<?=$conn['remote_host'];?>');" style="cursor:pointer;"
......
228 238
						<th><?=gettext("Connected Since"); ?></th>
229 239
						<th><?=gettext("Virtual Address"); ?></th>
230 240
						<th><?=gettext("Remote Host"); ?></th>
231
						<th><?=gettext("Bytes Sent"); ?></th>
232
						<th><?=gettext("Bytes Received"); ?></th>
241
						<th><?=gettext("Bytes Sent / Received"); ?></th>
233 242
						<th><?=gettext("Service"); ?></th>
234 243
					</tr>
235 244
				</thead>
......
244 253
						<td><?=$sk_server['connect_time'];?></td>
245 254
						<td><?=$sk_server['virtual_addr'];?></td>
246 255
						<td><?=$sk_server['remote_host'];?></td>
247
						<td><?=format_bytes($sk_server['bytes_sent']);?></td>
248
						<td><?=format_bytes($sk_server['bytes_recv']);?></td>
256
						<td><?=format_bytes($sk_server['bytes_sent']);?> / <?=format_bytes($sk_server['bytes_recv']);?></td>
249 257
						<td>
250 258
							<table>
251 259
								<tr>
......
282 290
						<th><?=gettext("Name"); ?></th>
283 291
						<th><?=gettext("Status"); ?></th>
284 292
						<th><?=gettext("Connected Since"); ?></th>
293
						<th><?=gettext("Local Address"); ?></th>
285 294
						<th><?=gettext("Virtual Address"); ?></th>
286 295
						<th><?=gettext("Remote Host"); ?></th>
287
						<th><?=gettext("Bytes Sent"); ?></th>
288
						<th><?=gettext("Bytes Received"); ?></th>
296
						<th><?=gettext("Bytes Sent/Received"); ?></th>
289 297
						<th><?=gettext("Service"); ?></th>
290 298
					</tr>
291 299
				</thead>
......
298 306
						<td><?=htmlspecialchars($client['name']);?></td>
299 307
						<td><?=$client['status'];?></td>
300 308
						<td><?=$client['connect_time'];?></td>
301
						<td><?=$client['virtual_addr'];?></td>
302
						<td><?=$client['remote_host'];?></td>
303
						<td><?=format_bytes($client['bytes_sent']);?></td>
304
						<td><?=format_bytes($client['bytes_recv']);?></td>
309
						<td><?=$client['local_host'];?>:<?=$client['local_port'];?></td>
310
						<td>
311
							<?=$client['virtual_addr'];?>
312
					<?php if (!empty($client['virtual_addr']) && !empty($client['virtual_addr6'])): ?>
313
							<br />
314
					<?php endif; ?>
315
							<?=$client['virtual_addr6'];?>
316
						</td>
317
						<td><?=$client['remote_host'];?>:<?=$client['remote_port'];?></td>
318
						<td><?=format_bytes($client['bytes_sent']);?> / <?=format_bytes($client['bytes_recv']);?></td>
305 319
						<td>
306 320
							<table>
307 321
								<tr>

Also available in: Unified diff