mirror of
https://gitee.com/ledc/IYUUAutoReseed
synced 2025-05-23 10:05:23 +00:00
更新https支持
This commit is contained in:
parent
9027262f57
commit
7dcd3e55f4
@ -107,11 +107,16 @@ class TransmissionRPC implements AbstractClientInterface
|
|||||||
* Default values for stream context
|
* Default values for stream context
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private $default_context_opts = array('http' => array(
|
private $default_context_opts = array(
|
||||||
'user_agent' => self::HTTP_UA,
|
'http' => array(
|
||||||
'timeout' => '60', // Don't want to be too slow
|
'user_agent' => self::HTTP_UA,
|
||||||
'ignore_errors' => true, // Leave the error parsing/handling to the code
|
'timeout' => '60', // Don't want to be too slow
|
||||||
)
|
'ignore_errors' => true, // Leave the error parsing/handling to the code
|
||||||
|
),
|
||||||
|
"ssl"=>array(
|
||||||
|
"verify_peer"=>false,
|
||||||
|
"verify_peer_name"=>false,
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -714,10 +719,6 @@ class TransmissionRPC implements AbstractClientInterface
|
|||||||
// Setup authentication (if provided)
|
// Setup authentication (if provided)
|
||||||
if ($this->username && $this->password) {
|
if ($this->username && $this->password) {
|
||||||
$contextopts['http']['header'] = sprintf("Authorization: Basic %s\r\n", base64_encode($this->username . ':' . $this->password));
|
$contextopts['http']['header'] = sprintf("Authorization: Basic %s\r\n", base64_encode($this->username . ':' . $this->password));
|
||||||
$contextopts['http']['ssl'] = array(
|
|
||||||
"verify_peer"=>false,
|
|
||||||
"verify_peer_name"=>false,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->debug) {
|
if ($this->debug) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user