box
box copied to clipboard
希望支持curl代理配置
F:\swow>box.exe self-update
[ERROR] cURL error 56: OpenSSL SSL_read: Connection was reset, errno 10054 (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://raw.githubusercontent.com/hyperf/box/master/pkgs.json
App\PkgDefinitionManager::getPkgs(): Return value must be of type array, null returned
不知道支持curl的代理后能不能解决问题。
设置环境变量不就好了?
设置环境变量不就好了?
F:\swow>set http_proxy=127.0.0.1
F:\swow>set http_proxy_port=9999
F:\swow>box.exe self-update
[ERROR] cURL error 6: Could not resolve host: raw.githubusercontent.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://raw.githubusercontent.com/hyperf/box/master/pkgs.json
App\PkgDefinitionManager::getPkgs(): Return value must be of type array, null returned
F:\swow>set http_proxyport=9999
F:\swow>box.exe self-update
[ERROR] cURL error 6: Could not resolve host: raw.githubusercontent.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://raw.githubusercontent.com/hyperf/box/master/pkgs.json
App\PkgDefinitionManager::getPkgs(): Return value must be of type array, null returned
设置http_proxy
,http_proxy_port
,http_proxyport
环境变量后,还是不行。
另外我使用php的curl测试过,我的代理是通的。
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://raw.githubusercontent.com/hyperf/box/master/pkgs.json',
CURLOPT_SSL_VERIFYHOST => FALSE,
CURLOPT_SSL_VERIFYPEER => FALSE,
CURLOPT_PROXY => "127.0.0.1",
CURLOPT_PROXYPORT => 9999,
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
试试 export http_proxy=127.0.0.1:9999
你先确保你设置环境变量后,用 PHP 的 CURL 不手动设置代理能跑通先
试试
export http_proxy=127.0.0.1:9999
你先确保你设置环境变量后,用 PHP 的 CURL 不手动设置代理能跑通先
设置set http_proxy=127.0.0.1:9999
后不行,再设置set https_proxy=127.0.0.1:9999
也不行。
另外还偶尔会报下面的错误:
F:\swow>box.exe self-update
Class "App\DownloadHandler\BoxException" not found
你先用别的 get 命令先,这里有个小 bug ,下个版本会 fix