mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
wip
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Client;
|
||||
|
||||
use App\Client\Http\HttpClient;
|
||||
use Ratchet\RFC6455\Messaging\Frame;
|
||||
use function Ratchet\Client\connect;
|
||||
use Ratchet\Client\WebSocket;
|
||||
use React\EventLoop\LoopInterface;
|
||||
@@ -56,7 +57,8 @@ class ProxyManager
|
||||
|
||||
$connector->connect('127.0.0.1:'.$connectionData->port)->then(function ($connection) use ($proxyConnection) {
|
||||
$connection->on('data', function ($data) use ($proxyConnection) {
|
||||
$proxyConnection->send($data);
|
||||
$binaryMsg = new Frame($data, true, Frame::OP_BINARY);
|
||||
$proxyConnection->send($binaryMsg);
|
||||
});
|
||||
|
||||
$proxyConnection->on('message', function ($message) use ($connection) {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Server\Connections;
|
||||
|
||||
use Ratchet\ConnectionInterface;
|
||||
use Ratchet\RFC6455\Messaging\Frame;
|
||||
use React\Socket\Server;
|
||||
|
||||
class TcpControlConnection extends ControlConnection
|
||||
@@ -92,7 +93,8 @@ class TcpControlConnection extends ControlConnection
|
||||
$this->proxy = $proxy;
|
||||
|
||||
$connection->on('data', function ($data) use ($proxy) {
|
||||
$proxy->send($data);
|
||||
$binaryMsg = new Frame($data, true, Frame::OP_BINARY);
|
||||
$proxy->send($binaryMsg);
|
||||
});
|
||||
|
||||
$connection->resume();
|
||||
|
||||
Reference in New Issue
Block a user