|
3 | 3 | namespace App;
|
4 | 4 |
|
5 | 5 | class Node {
|
6 |
| - public $blockHeight; |
7 |
| - public $pruMode; |
8 |
| - public $chain; |
9 |
| - public $client; |
10 |
| - public $ipv4; // Bool: if ipv4 active |
11 |
| - public $ipv6; // Bool: if ipv6 active |
12 |
| - public $tor; // Bool: if tor active |
13 |
| - public $ipv4Address = 'Unknown'; |
14 |
| - public $ipv6Address = 'Unknown'; |
| 6 | + public $blockHeight; |
| 7 | + public $pruMode; |
| 8 | + public $chain; |
| 9 | + public $client; |
| 10 | + public $ipv4; // Bool: if ipv4 active |
| 11 | + public $ipv6; // Bool: if ipv6 active |
| 12 | + public $tor; // Bool: if tor active |
| 13 | + public $ipv4Address = 'Unknown'; |
| 14 | + public $ipv6Address = 'Unknown'; |
15 | 15 | public $torAddress = 'Unknown';
|
16 | 16 | public $torVersion = 'Unkown';
|
17 |
| - public $ipv4Proxy; |
18 |
| - public $ipv6Proxy; |
19 |
| - public $torProxy; |
20 |
| - public $toConn; // Int: total connections of node |
21 |
| - public $cTime; // Current node time |
22 |
| - public $uptime; // String: uptime of node |
23 |
| - public $serivces; |
24 |
| - public $proVer; |
25 |
| - public $localRelay; |
26 |
| - public $timeOffset; |
27 |
| - public $port; |
28 |
| - public $minRelayFee; |
29 |
| - public $mempoolTx; |
30 |
| - public $sizeOfmempoolTx; |
31 |
| - public $mempoolMinFee; |
32 |
| - public $maxMempool; |
33 |
| - public $mempoolUsage; |
34 |
| - public $mempoolUsageP; |
35 |
| - public $mempoolLimited; // Bool: If mempool is beeing limited |
36 |
| - public $tIn; |
37 |
| - public $tOut; |
38 |
| - public $tTotal; // Int : Total traffic |
39 |
| - public $tLimitSet; // Bool : If a t limit is set |
40 |
| - public $tLimited; // Bool: Is limit is active |
41 |
| - public $tUsed; // Int: In MB amount of t used in current cycle |
42 |
| - public $tMax; // Int: In MB the daily t limit |
43 |
| - public $tTimeLeft; // Int : Time in minutes that are left till the limit is reset |
44 |
| - public $tLimitP; // Int: Percentage of Limit used |
45 |
| - public $bHeight; // Int: current block height (as far as node knows) |
46 |
| - public $bHeightAgo; // Int: Minutes since last received block |
47 |
| - public $hHeight; // Int: current max header height (blocks not download by node) |
48 |
| - public $bcSize; // Int: in GB soze of blockchain |
49 |
| - public $diff; // Int: current network difficulty |
50 |
| - public $hashRate; // Int: current network hash rate |
51 |
| - public $mNetTime; // Int: current network mediatime |
52 |
| - public $softForks; // Arr: List of current forks |
| 17 | + public $ipv4Proxy; |
| 18 | + public $ipv6Proxy; |
| 19 | + public $torProxy; |
| 20 | + public $toConn; // Int: total connections of node |
| 21 | + public $cTime; // Current node time |
| 22 | + public $uptime; // String: uptime of node |
| 23 | + public $serivces; |
| 24 | + public $proVer; |
| 25 | + public $localRelay; |
| 26 | + public $timeOffset; |
| 27 | + public $port; |
| 28 | + public $minRelayFee; |
| 29 | + public $mempoolTx; |
| 30 | + public $sizeOfmempoolTx; |
| 31 | + public $mempoolMinFee; |
| 32 | + public $maxMempool; |
| 33 | + public $mempoolUsage; |
| 34 | + public $mempoolUsageP; |
| 35 | + public $mempoolLimited; // Bool: If mempool is beeing limited |
| 36 | + public $tIn; |
| 37 | + public $tOut; |
| 38 | + public $tTotal; // Int : Total traffic |
| 39 | + public $tLimitSet; // Bool : If a t limit is set |
| 40 | + public $tLimited; // Bool: Is limit is active |
| 41 | + public $tUsed; // Int: In MB amount of t used in current cycle |
| 42 | + public $tMax; // Int: In MB the daily t limit |
| 43 | + public $tTimeLeft; // Int : Time in minutes that are left till the limit is reset |
| 44 | + public $tLimitP; // Int: Percentage of Limit used |
| 45 | + public $bHeight; // Int: current block height (as far as node knows) |
| 46 | + public $bHeightAgo; // Int: Minutes since last received block |
| 47 | + public $hHeight; // Int: current max header height (blocks not download by node) |
| 48 | + public $bcSize; // Int: in GB soze of blockchain |
| 49 | + public $diff; // Int: current network difficulty |
| 50 | + public $hashRate; // Int: current network hash rate |
| 51 | + public $mNetTime; // Int: current network mediatime |
| 52 | + public $softForks; // Arr: List of current forks |
53 | 53 |
|
54 | 54 | function __construct() {
|
55 | 55 | global $bitcoind;
|
@@ -84,7 +84,7 @@ function __construct() {
|
84 | 84 | if(preg_match("/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/", $ipAddress["address"])){
|
85 | 85 | $this->ipv4Address = $ipAddress["address"];
|
86 | 86 | }
|
87 |
| - elseif(preg_match("/^[0-9a-z]{1,4}(:[0-9a-z]{0,4}){0,6}$/", $ipAddress["address"])){ |
| 87 | + elseif(preg_match("/^[0-9a-z]{1,4}(:[0-9a-z]{0,4}){1,7}$/", $ipAddress["address"])){ |
88 | 88 | $this->ipv6Address = $ipAddress["address"];
|
89 | 89 | }
|
90 | 90 | elseif(preg_match("/^[0-9a-z]{16}\.onion$/", $ipAddress["address"])){
|
|
0 commit comments