Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

无法正确识别输入proxy的scheme #30

Open
hsk-story opened this issue Oct 9, 2024 · 0 comments
Open

无法正确识别输入proxy的scheme #30

hsk-story opened this issue Oct 9, 2024 · 0 comments

Comments

@hsk-story
Copy link

switch ($options['curl'][\CURLOPT_PROXYTYPE] ?? \CURLPROXY_HTTP)
{
case \CURLPROXY_HTTP:
case \CURLPROXY_HTTP_1_0:
case \CURLPROXY_HTTPS:
$proxyScheme = 'http';
break;
case \CURLPROXY_SOCKS5:
case \CURLPROXY_SOCKS5_HOSTNAME:
$proxyScheme = 'socks5';
break;
default:
throw new \RuntimeException('Guzzle-Swoole only supports HTTP and socks5 proxies');
}

按照这里的代码来看, 永远都是使用http代理, 因为$options['curl']一定是空的?
当guzzle使用socks5代理时, 就会导致异常

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant