Netzwerkdaten anzeigen

This commit is contained in:
2023-08-04 21:30:36 +02:00
parent 9f2d29c8fe
commit c6fb90e562
2 changed files with 7 additions and 6 deletions

View File

@@ -10,8 +10,8 @@ if (!isset($config))
'ssh_ip' => '127.0.0.1'
),
'version' => array(
'version' => '2.3.2',
'versioncode' => 37,
'version' => '2.3.3',
'versioncode' => 38,
'android_comp_level' => 25
),
'url' => array(

View File

@@ -398,16 +398,17 @@ function getAllNetworkConnections()
foreach ($networkInterfaces as $interface) {
if ($interface->ifname != 'lo') {
$wirelessOption = [];
$interfaceData = json_decode(shell_exec('ip -j -s link show ' . $interface->ifname));
foreach ($interface->addr_info as $addr) {
if ($addr->family == "inet")
$ipAddress = $addr->local;
}
$macAddress = $interface->address;
$bytesReceived = 0;
$bytesSent = 0;
$packetsReceived = 0;
$packetsSent = 0;
$bytesReceived = $interfaceData[0]->stats64->rx->bytes;
$bytesSent = $interfaceData[0]->stats64->tx->bytes;
$packetsReceived = $interfaceData[0]->stats64->rx->packets;
$packetsSent = $interfaceData[0]->stats64->tx->packets;
if (substr($interface->ifname, 0, 4) == 'wlan') {
$streamWirelessInterface = shell_exec('/sbin/iwconfig ' . $interface->ifname);