fix add user xray with transport
This commit is contained in:
+8
-4
@@ -4027,11 +4027,15 @@ DNS-over-HTTPS with IP:
|
|||||||
public function addxrus($user)
|
public function addxrus($user)
|
||||||
{
|
{
|
||||||
$c = $this->getXray();
|
$c = $this->getXray();
|
||||||
|
$p = $this->getPacConf();
|
||||||
$uuid = trim($this->ssh('xray uuid', 'xr'));
|
$uuid = trim($this->ssh('xray uuid', 'xr'));
|
||||||
$c['inbounds'][0]['settings']['clients'][] = [
|
$c['inbounds'][0]['settings']['clients'][] = $p['transport'] == 'Websocket' ? [
|
||||||
'id' => $uuid,
|
'id' => $uuid,
|
||||||
'flow' => 'xtls-rprx-vision',
|
'email' => $user,
|
||||||
'email' => $user,
|
] : [
|
||||||
|
'id' => $uuid,
|
||||||
|
'flow' => 'xtls-rprx-vision',
|
||||||
|
'email' => $user,
|
||||||
];
|
];
|
||||||
$this->restartXray($c);
|
$this->restartXray($c);
|
||||||
$this->userXr(count($c['inbounds'][0]['settings']['clients']) - 1);
|
$this->userXr(count($c['inbounds'][0]['settings']['clients']) - 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user