Skip to content

协程Http客户端请求https时代理无效 #2904

@Yurunsoft

Description

@Yurunsoft
<?php
go(function(){
    $cli = new Swoole\Coroutine\Http\Client('ip.cn', 443, true);
    $cli->set([
        'http_proxy_host' => '127.0.0.1',
        'http_proxy_port' => '8580',
    ]);
    $cli->setHeaders([
        'Host'          =>  'ip.cn',
        'User-Agent'    =>  'GuzzleHttp/6.3.3 curl/7.47.0 PHP/7.3.6-1+ubuntu16.04.1+deb.sury.org+1',
    ]);
    $cli->get('/');
    var_dump($cli->body, $cli->errCode);
    $cli->close();
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    in progressMaintainers are working on this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions