Yurunsoft / Guzzle-Swoole

让基于 Guzzle 的项目完美无缝兼容 Swoole 协程,支持:Guzzle、Elasticsearch client——来自宇润 PHP 全家桶
MIT License
161 stars 21 forks source link

代理如何设置 #8

Closed excxapp closed 4 years ago

excxapp commented 4 years ago

请问proxy 代理用法怎么设置,guzzle方法代理没生效。 微信要求ip因此需要代理。 请问需要如何设置

Yurunsoft commented 4 years ago

用法和guzzle一致,是支持的,能否提供复现代码

excxapp commented 4 years ago

貌似是http代理https就直接忽略代理了。 image image

Yurunsoft commented 4 years ago

这个问题我明天来看一下,方便的话加个QQ群吧:17916227

excxapp commented 4 years ago

不加hander情况下,是可以正常进行代理,加了之后就无法代理。

Yurunsoft commented 4 years ago

应该是swoole不支持,我已经反馈了这个问题,等待他们解决

excxapp commented 4 years ago

ok

Yurunsoft commented 4 years ago

你的代理是否是HTTP/1.0,如果不确定尝试使用

curl -v -x 127.0.0.1:808 http://api.weixin.qq.com/sns/oauth2

把结果贴给我

127.0.0.1:808就是代理IP和端口,改成你自己的

excxapp commented 4 years ago

.weixin.qq.com/sns/oauth2

Yurunsoft commented 4 years ago

Swoole 4.4.9 已经修复问题了,更新一下试试吧