From 9a9268598e2a5ff7dea29c8ff16bf51770403ca2 Mon Sep 17 00:00:00 2001 From: Dries C Date: Thu, 11 Apr 2024 12:51:47 +0200 Subject: [PATCH] Add support for the latest PHP-Quiche changes --- ProxyServer.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ProxyServer.php b/ProxyServer.php index 6afc75b..b5674b8 100644 --- a/ProxyServer.php +++ b/ProxyServer.php @@ -115,7 +115,7 @@ private function createServerSocket(SocketAddress $socketAddress, Socket $notify $pk->port = $peerAddress->getPort(); $this->sendToMainBuffer($streamIdentifier, $pk); - $stream->setShutdownReadingCallback(function (bool $peerClosed) use ($streamIdentifier): void { + $stream->addShutdownReadingCallback(function (bool $peerClosed) use ($streamIdentifier): void { if ($peerClosed) { if (isset($this->streamWriters[$streamIdentifier])) { // check if the stream is still open $this->shutdownStream($streamIdentifier, 'client disconnect', false); @@ -148,6 +148,10 @@ private function createServerSocket(SocketAddress $socketAddress, Socket $notify $serverConfig->enableBidirectionalStreams(); $serverConfig->setInitialMaxData(10000000); $serverConfig->setMaxIdleTimeout(2000); + $serverConfig->setEnableActiveMigration(false); + $serverConfig->discoverPMTUD(true); + $serverConfig->setMaxRecvUdpPayloadSize(1350); + $serverConfig->setMaxSendUdpPayloadSize(1350); $serverSocket->registerSocket($notifySocket, function () use ($notifySocket): void { socket_read($notifySocket, 65535); //clean socket