mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-23 00:25:35 +08:00
Update to PHP 8.4 compatible
This commit is contained in:
@@ -262,7 +262,6 @@ class ProxyServerCommand extends Command
|
|||||||
break;
|
break;
|
||||||
case CMD_UDP_ASSOCIATE:
|
case CMD_UDP_ASSOCIATE:
|
||||||
$connection->stage = STAGE_UDP_ASSOC;
|
$connection->stage = STAGE_UDP_ASSOC;
|
||||||
var_dump('CMD_UDP_ASSOCIATE ' . ($this->config['udp_port'] ?? 2222));
|
|
||||||
if ($this->config['udp_port'] == 0) {
|
if ($this->config['udp_port'] == 0) {
|
||||||
$connection->udpWorker = new Worker('udp://0.0.0.0:0');
|
$connection->udpWorker = new Worker('udp://0.0.0.0:0');
|
||||||
/* @phpstan-ignore-next-line */
|
/* @phpstan-ignore-next-line */
|
||||||
@@ -274,7 +273,7 @@ class ProxyServerCommand extends Command
|
|||||||
$listenInfo = stream_socket_get_name($connection->udpWorker->getMainSocket(), false);
|
$listenInfo = stream_socket_get_name($connection->udpWorker->getMainSocket(), false);
|
||||||
[$bind_addr, $bind_port] = explode(':', $listenInfo);
|
[$bind_addr, $bind_port] = explode(':', $listenInfo);
|
||||||
} else {
|
} else {
|
||||||
$bind_port = $this->config['udp_port'] ?? 2222;
|
$bind_port = $this->config['udp_port'];
|
||||||
}
|
}
|
||||||
$bind_addr = $this->config['wanIP'] ?? '192.168.1.1';
|
$bind_addr = $this->config['wanIP'] ?? '192.168.1.1';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user