Setting Panel to 1 (3xui) Throws "Undefined array key 1"
I set the panel to 1 and connect, i get a:
Undefined array key 1
public function __construct()
{
$serverAddress = 'api://xxxxxx.com/'; # Server Address:Port
$tunnelServerAddress = null; # Tunnel Server Address:Port
$username = 'xxxxxx';
$password = 'xxxxxx';
$panel = 1; # Panel Type x-ui (0) / 3x-ui (1)
$this->xui = new xuiConnect($serverAddress, $tunnelServerAddress, $username, $password, $panel);
$this->xui->setDefaultProtocol('vless');
$this->xui->setDefaultTransmission('tcp');
}
Hi, please provide more details.
I was not able to figure what caused this issue. I deleted the files and redownloaded them and this particular issue went away.
In most cases, the issue is complicated due to a firewall or certificate or incorrect settings on the server side that prevent the request from being sent. If you are sure that your code is correct, run it in another environment or on another server or host and check that there are no restrictions on sending requests. Also, check that the desired server IP is available on the server or host on which the script is running.
🙏