Add TLS version of the connection to stats page
This commit is contained in:
parent
424b36ffca
commit
91478aa128
1 changed files with 3 additions and 1 deletions
|
@ -102,8 +102,10 @@ class UiRequestPlugin(object):
|
||||||
for connection in main.file_server.connections:
|
for connection in main.file_server.connections:
|
||||||
if "cipher" in dir(connection.sock):
|
if "cipher" in dir(connection.sock):
|
||||||
cipher = connection.sock.cipher()[0]
|
cipher = connection.sock.cipher()[0]
|
||||||
|
tls_version = connection.sock.version()
|
||||||
else:
|
else:
|
||||||
cipher = connection.crypt
|
cipher = connection.crypt
|
||||||
|
tls_version = ""
|
||||||
if "time" in connection.handshake and connection.last_ping_delay:
|
if "time" in connection.handshake and connection.last_ping_delay:
|
||||||
time_correction = connection.handshake["time"] - connection.handshake_time - connection.last_ping_delay
|
time_correction = connection.handshake["time"] - connection.handshake_time - connection.last_ping_delay
|
||||||
else:
|
else:
|
||||||
|
@ -113,7 +115,7 @@ class UiRequestPlugin(object):
|
||||||
("%s", connection.type),
|
("%s", connection.type),
|
||||||
("%s:%s", (connection.ip, connection.port)),
|
("%s:%s", (connection.ip, connection.port)),
|
||||||
("%s", connection.handshake.get("port_opened")),
|
("%s", connection.handshake.get("port_opened")),
|
||||||
("<span title='%s'>%s</span>", (cipher, connection.crypt)),
|
("<span title='%s %s'>%s</span>", (cipher, tls_version, connection.crypt)),
|
||||||
("%6.3f", connection.last_ping_delay),
|
("%6.3f", connection.last_ping_delay),
|
||||||
("%s", connection.incomplete_buff_recv),
|
("%s", connection.incomplete_buff_recv),
|
||||||
("%s", connection.bad_actions),
|
("%s", connection.bad_actions),
|
||||||
|
|
Loading…
Reference in a new issue