1、起因如下图

QQ20220328-0.jpg

2、walk老大的贴码

<?php
require_once __DIR__ . '/vendor/autoload.php';

use Workerman\Worker;
use Workerman\Connection\AsyncTcpConnection;

$worker = new Worker('tcp://0.0.0.0:80');
$worker->onConnect = function ($con) {
    $rcon = new AsyncTcpConnection('tcp://内网ip:80');
    $rcon->pipe($con);
    $con->pipe($rcon);
    $rcon->connect();
};

$worker = new Worker('tcp://0.0.0.0:443');
$worker->count = 8;
$worker->onConnect = function ($con) {
    $rcon = new AsyncTcpConnection('tcp://内网ip:443');
    $rcon->pipe($con);
    $con->pipe($rcon);
    $rcon->connect();
};

Worker::runAll();


标签: none

添加新评论