Skip to content

Commit ab4d4eb

Browse files
killer49892ch774
authored andcommitted
fix tor 対応(仮)
1 parent 5a864da commit ab4d4eb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/P2Util.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2312,7 +2312,7 @@ static public function getHTTPRequest2($url , $method = HTTP_Request2::METHOD_GE
23122312
}
23132313

23142314
// プロキシ
2315-
if ($_conf['tor_use'] && P2Util::isHostTor($this->host, 0)) { // Tor(.onion)はTor用の設定をセット
2315+
if ($_conf['tor_use'] && self::isHostTor($purl['host'], 0)) { // Tor(.onion)はTor用の設定をセット
23162316
$req->setConfig (array (
23172317
'proxy_host' => $_conf['tor_proxy_host'],
23182318
'proxy_port' => $_conf['tor_proxy_port'],
@@ -2341,7 +2341,7 @@ static public function getHTTPRequest2($url , $method = HTTP_Request2::METHOD_GE
23412341

23422342
static public function getHTTPResponse($req) {
23432343
if($req->getConfig('proxy_type') == 'socks5') {
2344-
$socks = HTTP_Request2_Adapter_Socket();
2344+
$socks = new HTTP_Request2_Adapter_Socket();
23452345
$res = $socks->sendRequest($req);
23462346
unset($socks);
23472347
} else {

0 commit comments

Comments
 (0)