新增功能

This commit is contained in:
Your Name
2026-04-01 09:46:25 +08:00
parent 099bc1dd22
commit a780356908
332 changed files with 7845 additions and 866 deletions
@@ -39,9 +39,30 @@ class HttpConnection
$options = ["allow_redirects" => false];
$options["timeout"] = $this->profile->getHttpProfile()->getReqTimeout();
$options["proxy"] = $this->profile->getHttpProfile()->getProxy();
// 显式传入 CA 包,避免 Windows 上 Guzzle 对 defaultCaBundle() 的静态缓存早于 ini_set 导致 cURL 60
$cafile = $this->resolveVerifyCafile();
if ($cafile !== '') {
$options['verify'] = $cafile;
}
return $options;
}
private function resolveVerifyCafile(): string
{
$fromEnv = getenv('TRTC_RECORDING_SSL_CAFILE');
if (is_string($fromEnv) && $fromEnv !== '' && is_readable($fromEnv)) {
return $fromEnv;
}
// vendor/tencentcloud/common/src/TencentCloud/Common/Http → 上 7 层到应用根(含 composer vendor 目录)
$root = dirname(__DIR__, 7);
$candidate = $root . DIRECTORY_SEPARATOR . 'cacert.pem';
if (is_readable($candidate)) {
return $candidate;
}
return '';
}
public function getRequest($uri = '', $query = [], $headers = [])
{
$options = $this->getOptions();