Proxy for workerman/http-client

0

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!

已邀请:

张先生

赞同来自:

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

张先生

赞同来自:

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?

walkor

赞同来自:

workerman/http-client not support socks5 proxy now.

要回复问题请先登录注册