Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7bcd8de007 |
+22
@@ -378,6 +378,9 @@ class Bot
|
|||||||
case preg_match('~^/renameXrUser (\d+)$~', $this->input['callback'], $m):
|
case preg_match('~^/renameXrUser (\d+)$~', $this->input['callback'], $m):
|
||||||
$this->renameXrUser($m[1]);
|
$this->renameXrUser($m[1]);
|
||||||
break;
|
break;
|
||||||
|
case preg_match('~^/resetXrUser (\d+)$~', $this->input['callback'], $m):
|
||||||
|
$this->resetXrUser($m[1]);
|
||||||
|
break;
|
||||||
case preg_match('~^/v2ray$~', $this->input['callback'], $m):
|
case preg_match('~^/v2ray$~', $this->input['callback'], $m):
|
||||||
$this->v2ray();
|
$this->v2ray();
|
||||||
break;
|
break;
|
||||||
@@ -5312,6 +5315,17 @@ DNS-over-HTTPS with IP:
|
|||||||
$this->userXr($i);
|
$this->userXr($i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function resetXrUser($i)
|
||||||
|
{
|
||||||
|
$c = $this->getXray();
|
||||||
|
$c['inbounds'][0]['settings']['clients'][$i]['global'] = [
|
||||||
|
'download' => 0,
|
||||||
|
'upload' => 0,
|
||||||
|
];
|
||||||
|
$this->restartXray($c);
|
||||||
|
$this->userXr($i);
|
||||||
|
}
|
||||||
|
|
||||||
public function listXr($i)
|
public function listXr($i)
|
||||||
{
|
{
|
||||||
$c = $this->getPacConf();
|
$c = $this->getPacConf();
|
||||||
@@ -6030,6 +6044,14 @@ DNS-over-HTTPS with IP:
|
|||||||
'callback_data' => "/qrXray {$i}_2",
|
'callback_data' => "/qrXray {$i}_2",
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
$download = $this->getBytes($c['global']['download'] + $c['session']['download']);
|
||||||
|
$upload = $this->getBytes($c['global']['upload'] + $c['session']['upload']);
|
||||||
|
$data[] = [
|
||||||
|
[
|
||||||
|
'text' => $this->i18n('reset stats') . ": ↓$download ↑$upload",
|
||||||
|
'callback_data' => "/resetXrUser $i",
|
||||||
|
],
|
||||||
|
];
|
||||||
$data[] = [
|
$data[] = [
|
||||||
[
|
[
|
||||||
'text' => $this->i18n('rename'),
|
'text' => $this->i18n('rename'),
|
||||||
|
|||||||
Reference in New Issue
Block a user