国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

Proxy for workerman/http-client

Monik

I want to use workerman/http-client to work with the Telegram bot.
But in my country they’re blocking the connection with this messenger.
With curl I use proxy (from another country) like curl_setopt($ch, CURLOPT_PROXY, "socks5://user:pass@ip:port") and it works.
How can I do the same in http-client?
Thank you!

4585 3 0
3個回答

小陽光

You can try stream_context_set_default (['http' => ['proxy' => '127.0.0.1:1087']]); Set the global proxy, or set the proxy individually, I have not tested, but you can try

  • Monik 2020-05-06

    I tried it this way - it does not work.
    Also tried in ConnectionPool.php file in function create() set context options (for http and curl).
    When I try to access blocked resources, I get:
    SSL handshake error: stream_socket_enable_crypto()
    Connection closed

小陽光

I have encountered this problem before. Later I used Proxifier to solve the problem. You can also refer to http://javaweb.org/?p=1858. Which country are you from? Is it because your country's firewall prevents you from accessing the designated website?

  • Monik 2020-05-06

    I'm from Russia. Sites like telegram.org, linkedin.com and many others are blocked. I use a proxy server in a neighboring country to work with blocked resources.

walkor 打賞

workerman/http-client not support socks5 proxy now.

  • 暫無評論
年代過于久遠,無法發(fā)表回答
??