This commit is contained in:
2026-06-12 23:57:21 +08:00
parent 1d9d761798
commit 7bcb789ed2
6 changed files with 698 additions and 785 deletions
+9 -9
View File
@@ -11,16 +11,16 @@ trait TSwooleClient
*/
private function settings(): array
{
$sslCert = $this->getSslCertFile();
$sslKey = $this->getSslKeyFile();
$sslCa = $this->getCa();
$sslCert = $this->ssl_cert_file;
$sslKey = $this->ssl_key_file;
$sslCa = $this->ca;
$params = [];
if ($this->getConnectTimeout() > 0) {
$params['timeout'] = $this->getConnectTimeout();
if ($this->connect_timeout > 0) {
$params['timeout'] = $this->connect_timeout;
}
[$proxy, $port] = [$this->getProxyHost(), $this->getProxyPort()];
[$proxy, $port] = [$this->proxyHost, $this->proxyPort];
if (!empty($proxy) && $port > 0) {
$params['http_proxy_host'] = $proxy;
$params['http_proxy_port'] = $port;
@@ -29,9 +29,9 @@ trait TSwooleClient
return $params;
}
$params['ssl_host_name'] = $this->getHost();
$params['ssl_cert_file'] = $this->getSslCertFile();
$params['ssl_key_file'] = $this->getSslKeyFile();
$params['ssl_host_name'] = $this->host;
$params['ssl_cert_file'] = $this->ssl_cert_file;
$params['ssl_key_file'] = $this->ssl_key_file;
$params['ssl_verify_peer'] = TRUE;
$params['ssl_cafile'] = $sslCa;