Compare commits

..

3 Commits

Author SHA1 Message Date
iyuu.cn
a2034f2840 新增合作站点MoeCat 2020-04-03 22:27:08 +08:00
iyuu.cn
4894464fdd 优化部分php环境CURLOPT_SSL_VERIFYHOST参数设置为false后,卡顿问题。 2020-04-03 21:03:58 +08:00
iyuu.cn
c90acbec6c 路径转换方法:提高替换模式的兼容性。 2020-04-03 12:19:03 +08:00
4 changed files with 15 additions and 14 deletions

View File

@@ -13,7 +13,7 @@ use IYUU\Library\Table;
class AutoReseed
{
// 版本号
const VER = '1.7.4';
const VER = '1.7.5';
// RPC连接
private static $links = [];
// 客户端配置
@@ -73,7 +73,7 @@ class AutoReseed
self::backup('config', $configALL);
self::$curl = new Curl();
self::$curl->setOpt(CURLOPT_SSL_VERIFYPEER, false);
#self::$curl->setOpt(CURLOPT_SSL_VERIFYHOST, 2);
self::$curl->setOpt(CURLOPT_SSL_VERIFYHOST, 2);
// 合作站点自动注册鉴权
$is_login = Oauth::login(self::$apiUrl . self::$endpoints['login']);
@@ -694,7 +694,7 @@ class AutoReseed
case 3: // 替换
foreach ($pathArray as $key => $val) {
if (strpos($path, $key)===0) { // 没用$path == $key判断是为了提高兼容性
return $val;
return $val . substr($path, strlen($key));
}
}
break;

View File

@@ -82,7 +82,7 @@ class qBittorrent extends AbstractClient
$this->api_version = $api_version;
$this->curl = new Curl();
$this->curl->setOpt(CURLOPT_SSL_VERIFYPEER, false); // 禁止验证证书
$this->curl->setOpt(CURLOPT_SSL_VERIFYHOST, false); // 不检查证书
$this->curl->setOpt(CURLOPT_SSL_VERIFYHOST, 2); // 不检查证书
$this->curl->setOpt(CURLOPT_CONNECTTIMEOUT, 60); // 超时
$this->curl->setOpt(CURLOPT_TIMEOUT, 600); // 超时
// Authenticate and get cookie, else throw exception

View File

@@ -9,7 +9,7 @@ use Curl\Curl;
class Oauth
{
// 合作的站点
public static $sites = ['ourbits','hddolby','hdhome','pthome'];
public static $sites = ['ourbits','hddolby','hdhome','pthome','moecat'];
// 爱语飞飞token
public static $token = '';
// 合作站点用户id

View File

@@ -133,6 +133,16 @@ return array(
'passkey' => '',
'id' => 0, // 用户ID(不是用户名)
),
// MoeCat
'moecat' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'id' => 0, // 用户ID(不是用户名)
// 种子Tracker的IP地址选择 可选ipv4ipv6
'ip_type' => 'ipv4',
),
// m-team
'm-team' => array(
// 14.m-team的cookie 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
@@ -216,15 +226,6 @@ return array(
// 如果需要自动辅种,必须配置
'passkey' => '',
),
// MoeCat
'moecat' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
// 种子Tracker的IP地址选择 可选ipv4ipv6
'ip_type' => 'ipv4',
),
// totheglory
'ttg' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)