workerman/http-client 不支持IP代理吗?

army

问题描述

请问 workerman/http-client 不支持IP代理吗?

453 1 0
1个回答

walkor 打赏

目前不支持

  • army 2024-04-08

    好的,老板。
    自己捣鼓了一下在AsyncTcpConnection.php 中
    if ($this->_contextOption) {
    $context = \stream_context_create($this->_contextOption);
    $this->_socket = \stream_socket_client("tcp://{$this->_remoteHost}:{$this->_remotePort}",
    $errno, $errstr, 0, \STREAM_CLIENT_ASYNC_CONNECT, $context);
    } else {
    $this->_socket = \stream_socket_client("tcp://{$this->_remoteHost}:{$this->_remotePort}",
    $errno, $errstr, 0, \STREAM_CLIENT_ASYNC_CONNECT);
    }
    的 stream_context_create 参数里传入了 Array( [http] => Array( [proxy] => tcp://192.168.1.1:8888 )) 不顶用...😅

×
🔝