mirror of
https://gitee.com/ledc/IYUUAutoReseed
synced 2025-08-26 16:04:49 +00:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
7d638eba40 | ||
|
c35c23583c | ||
|
b2b9000a86 | ||
|
b80a5b89cc | ||
|
c2e5b4d00b | ||
|
207320ede7 | ||
|
6e1653fc1e | ||
|
32ec80d552 | ||
|
2b989f9e0e | ||
|
ff16781da9 | ||
|
6a01b492ce |
@@ -1,17 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace IYUU;
|
namespace IYUU;
|
||||||
|
|
||||||
use Curl\Curl;
|
use Curl\Curl;
|
||||||
use IYUU\Client\AbstractClient;
|
use IYUU\Client\AbstractClient;
|
||||||
use IYUU\Library\IFile;
|
use IYUU\Library\IFile;
|
||||||
use IYUU\Library\Oauth;
|
use IYUU\Library\Oauth;
|
||||||
use IYUU\Library\Table;
|
use IYUU\Library\Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IYUUAutoReseed自动辅种类
|
* IYUUAutoReseed自动辅种类
|
||||||
*/
|
*/
|
||||||
class AutoReseed
|
class AutoReseed
|
||||||
{
|
{
|
||||||
// 版本号
|
// 版本号
|
||||||
const VER = '1.9.1';
|
const VER = '1.9.5';
|
||||||
// RPC连接
|
// RPC连接
|
||||||
private static $links = [];
|
private static $links = [];
|
||||||
// 客户端配置
|
// 客户端配置
|
||||||
@@ -20,8 +22,6 @@ class AutoReseed
|
|||||||
private static $sites = [];
|
private static $sites = [];
|
||||||
// 不辅种的站点 'pt','hdchina'
|
// 不辅种的站点 'pt','hdchina'
|
||||||
private static $noReseed = [];
|
private static $noReseed = [];
|
||||||
// 不转移的站点 'hdarea','hdbd'
|
|
||||||
private static $noMove = [];
|
|
||||||
// cookie检查
|
// cookie检查
|
||||||
private static $cookieCheck = ['hdchina','hdcity'];
|
private static $cookieCheck = ['hdchina','hdcity'];
|
||||||
// 缓存路径
|
// 缓存路径
|
||||||
@@ -35,7 +35,6 @@ class AutoReseed
|
|||||||
'sites' => '/api/sites',
|
'sites' => '/api/sites',
|
||||||
'infohash'=> '/api/infohash',
|
'infohash'=> '/api/infohash',
|
||||||
'notify' => '/api/notify',
|
'notify' => '/api/notify',
|
||||||
'alike' => '/api/alike',
|
|
||||||
'hash' => '/api/hash',
|
'hash' => '/api/hash',
|
||||||
);
|
);
|
||||||
// curl
|
// curl
|
||||||
@@ -54,6 +53,8 @@ class AutoReseed
|
|||||||
'reseedRepeat' => 0, // 重复:客户端已做种
|
'reseedRepeat' => 0, // 重复:客户端已做种
|
||||||
'reseedSkip' => 0, // 跳过:因未设置passkey,而跳过
|
'reseedSkip' => 0, // 跳过:因未设置passkey,而跳过
|
||||||
'reseedPass' => 0, // 忽略:因上次成功添加、存在缓存,而跳过
|
'reseedPass' => 0, // 忽略:因上次成功添加、存在缓存,而跳过
|
||||||
|
'MoveSuccess' => 0, // 移动成功
|
||||||
|
'MoveError' => 0, // 移动失败
|
||||||
);
|
);
|
||||||
// 错误通知消息体
|
// 错误通知消息体
|
||||||
private static $errNotify = array(
|
private static $errNotify = array(
|
||||||
@@ -74,12 +75,15 @@ class AutoReseed
|
|||||||
self::$curl->setOpt(CURLOPT_SSL_VERIFYPEER, false);
|
self::$curl->setOpt(CURLOPT_SSL_VERIFYPEER, false);
|
||||||
self::$curl->setOpt(CURLOPT_SSL_VERIFYHOST, 2);
|
self::$curl->setOpt(CURLOPT_SSL_VERIFYHOST, 2);
|
||||||
|
|
||||||
// 合作站点自动鉴权绑定
|
// 合作站点鉴权绑定
|
||||||
Oauth::login(self::$apiUrl . self::$endpoints['login']);
|
Oauth::login(self::$apiUrl . self::$endpoints['login']);
|
||||||
|
|
||||||
// 显示支持站点列表
|
// 显示支持站点列表
|
||||||
self::ShowTableSites();
|
self::ShowTableSites();
|
||||||
self::$clients = isset($configALL['default']['clients']) && $configALL['default']['clients'] ? $configALL['default']['clients'] : array();
|
self::$clients = isset($configALL['default']['clients']) && $configALL['default']['clients'] ? $configALL['default']['clients'] : array();
|
||||||
|
if (empty(self::$clients)){
|
||||||
|
die('全局客户端为空!');
|
||||||
|
}
|
||||||
|
|
||||||
// 递归删除上次历史记录
|
// 递归删除上次历史记录
|
||||||
IFile::rmdir(self::$cacheDir, true);
|
IFile::rmdir(self::$cacheDir, true);
|
||||||
@@ -123,9 +127,6 @@ class AutoReseed
|
|||||||
if (isset($rs['msg']) && $rs['msg']) {
|
if (isset($rs['msg']) && $rs['msg']) {
|
||||||
die($rs['msg'].PHP_EOL);
|
die($rs['msg'].PHP_EOL);
|
||||||
}
|
}
|
||||||
if (isset($rs['errmsg']) && $rs['errmsg']) {
|
|
||||||
die($rs['errmsg'].PHP_EOL);
|
|
||||||
}
|
|
||||||
die('远端服务器无响应,请稍后再试!!!');
|
die('远端服务器无响应,请稍后再试!!!');
|
||||||
}
|
}
|
||||||
$data = [];
|
$data = [];
|
||||||
@@ -216,8 +217,6 @@ class AutoReseed
|
|||||||
$errmsg = isset($result['result']) ? $result['result'] : '未知错误,请稍后重试!';
|
$errmsg = isset($result['result']) ? $result['result'] : '未知错误,请稍后重试!';
|
||||||
if (strpos($errmsg, 'http error 404: Not Found') !== false) {
|
if (strpos($errmsg, 'http error 404: Not Found') !== false) {
|
||||||
self::sendNotify('404');
|
self::sendNotify('404');
|
||||||
} elseif (strpos($errmsg, 'http error 403: Forbidden') !== false) {
|
|
||||||
self::sendNotify('403');
|
|
||||||
}
|
}
|
||||||
print "-----RPC添加种子任务,失败 [{$errmsg}]" . PHP_EOL.PHP_EOL;
|
print "-----RPC添加种子任务,失败 [{$errmsg}]" . PHP_EOL.PHP_EOL;
|
||||||
}
|
}
|
||||||
@@ -267,6 +266,7 @@ class AutoReseed
|
|||||||
}
|
}
|
||||||
self::reseed();
|
self::reseed();
|
||||||
self::wechatMessage();
|
self::wechatMessage();
|
||||||
|
exit(self::$ExitCode);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* IYUUAutoReseed辅种
|
* IYUUAutoReseed辅种
|
||||||
@@ -420,7 +420,7 @@ class AutoReseed
|
|||||||
if ($lastTime) {
|
if ($lastTime) {
|
||||||
$interval = time() - $lastTime; // 间隔时间
|
$interval = time() - $lastTime; // 间隔时间
|
||||||
if ($interval < $limitRule['sleep']) {
|
if ($interval < $limitRule['sleep']) {
|
||||||
$t = $limitRule['sleep'] - $interval + mt_rand(1,5);
|
$t = $limitRule['sleep'] - $interval + mt_rand(1, 5);
|
||||||
do {
|
do {
|
||||||
echo microtime(true)." 为账号安全,辅种进程休眠 {$t} 秒后继续...".PHP_EOL;
|
echo microtime(true)." 为账号安全,辅种进程休眠 {$t} 秒后继续...".PHP_EOL;
|
||||||
sleep(1);
|
sleep(1);
|
||||||
@@ -450,6 +450,7 @@ class AutoReseed
|
|||||||
print "种子详情页:".$details_url.PHP_EOL;
|
print "种子详情页:".$details_url.PHP_EOL;
|
||||||
$details_html = download($details_url, $cookie, $userAgent);
|
$details_html = download($details_url, $cookie, $userAgent);
|
||||||
if (empty($details_html)) {
|
if (empty($details_html)) {
|
||||||
|
ff($siteName. '站点,cookie已过期,请更新后重新辅种!');
|
||||||
echo 'cookie已过期,请更新后重新辅种!已加入排除列表'.PHP_EOL;
|
echo 'cookie已过期,请更新后重新辅种!已加入排除列表'.PHP_EOL;
|
||||||
$t = 30;
|
$t = 30;
|
||||||
do {
|
do {
|
||||||
@@ -462,14 +463,16 @@ class AutoReseed
|
|||||||
}
|
}
|
||||||
if (strpos($details_html, '没有该ID的种子') != false) {
|
if (strpos($details_html, '没有该ID的种子') != false) {
|
||||||
echo '种子已被删除!'.PHP_EOL;
|
echo '种子已被删除!'.PHP_EOL;
|
||||||
self::sendNotify('404');
|
self::sendNotify('404');
|
||||||
$reseedPass = true;
|
$reseedPass = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// 提取种子下载地址
|
// 提取种子下载地址
|
||||||
$offset = strpos($details_html, str_replace('{hash}', '', $sites[$sid]['download_page']));
|
$offset = strpos($details_html, str_replace('{hash}', '', $sites[$sid]['download_page']));
|
||||||
if ($offset === false) {
|
if ($offset === false) {
|
||||||
|
ff($siteName. '站点,cookie已过期,请更新后重新辅种!');
|
||||||
echo 'cookie已过期,请更新后重新辅种!'.PHP_EOL;
|
echo 'cookie已过期,请更新后重新辅种!'.PHP_EOL;
|
||||||
|
$configALL[$siteName]['cookie'] = '';
|
||||||
$reseedPass = true;
|
$reseedPass = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -517,6 +520,13 @@ class AutoReseed
|
|||||||
$html = download($protocol .$sites[$sid]['base_url']. '/pt', $cookie, $userAgent);
|
$html = download($protocol .$sites[$sid]['base_url']. '/pt', $cookie, $userAgent);
|
||||||
// 提取种子下载地址
|
// 提取种子下载地址
|
||||||
$offset = strpos($html, 'cuhash=');
|
$offset = strpos($html, 'cuhash=');
|
||||||
|
if ($offset === false) {
|
||||||
|
ff($siteName. '站点,cookie已过期,请更新后重新辅种!');
|
||||||
|
echo 'cookie已过期,请更新后重新辅种!'.PHP_EOL;
|
||||||
|
$configALL[$siteName]['cookie'] = '';
|
||||||
|
$reseedPass = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
$len = strlen('cuhash=');
|
$len = strlen('cuhash=');
|
||||||
$cuhashTemp = substr($html, $offset+$len, 40);
|
$cuhashTemp = substr($html, $offset+$len, 40);
|
||||||
$configALL[$siteName]['cuhash'] = substr($cuhashTemp, 0, strpos($cuhashTemp, '"'));
|
$configALL[$siteName]['cuhash'] = substr($cuhashTemp, 0, strpos($cuhashTemp, '"'));
|
||||||
@@ -615,7 +625,7 @@ class AutoReseed
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//遍历当前客户端种子
|
//遍历当前客户端种子
|
||||||
foreach ($infohash_Dir as $info_hash => $downloadDir) {
|
foreach ($infohash_Dir as $info_hash => $downloadDir) {
|
||||||
// 调用路径过滤
|
// 调用路径过滤
|
||||||
if (self::pathFilter($downloadDir)) {
|
if (self::pathFilter($downloadDir)) {
|
||||||
continue;
|
continue;
|
||||||
@@ -623,7 +633,7 @@ class AutoReseed
|
|||||||
// 做种实际路径与相对路径之间互转
|
// 做种实际路径与相对路径之间互转
|
||||||
echo '转换前:'.$downloadDir.PHP_EOL;
|
echo '转换前:'.$downloadDir.PHP_EOL;
|
||||||
$downloadDir = self::pathReplace($downloadDir);
|
$downloadDir = self::pathReplace($downloadDir);
|
||||||
echo '转换后:'.$downloadDir.PHP_EOL;
|
echo '转换后:'.$downloadDir.PHP_EOL;
|
||||||
if (is_null($downloadDir)) {
|
if (is_null($downloadDir)) {
|
||||||
echo 'IYUU自动转移做种客户端--使用教程 https://www.iyuu.cn/archives/351/'.PHP_EOL;
|
echo 'IYUU自动转移做种客户端--使用教程 https://www.iyuu.cn/archives/351/'.PHP_EOL;
|
||||||
die("全局配置的move数组内,路径转换参数配置错误,请重新配置!!!".PHP_EOL);
|
die("全局配置的move数组内,路径转换参数配置错误,请重新配置!!!".PHP_EOL);
|
||||||
@@ -692,9 +702,11 @@ class AutoReseed
|
|||||||
// 转移成功的种子,以infohash为文件名,写入缓存
|
// 转移成功的种子,以infohash为文件名,写入缓存
|
||||||
wlog($log, $info_hash, self::$cacheMove);
|
wlog($log, $info_hash, self::$cacheMove);
|
||||||
wlog($log, 'MoveSuccess'.$k);
|
wlog($log, 'MoveSuccess'.$k);
|
||||||
|
self::$wechatMsg['MoveSuccess']++;
|
||||||
} else {
|
} else {
|
||||||
// 失败的种子
|
// 失败的种子
|
||||||
wlog($log, 'MoveError'.$k);
|
wlog($log, 'MoveError'.$k);
|
||||||
|
self::$wechatMsg['MoveError']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -720,7 +732,7 @@ class AutoReseed
|
|||||||
global $configALL;
|
global $configALL;
|
||||||
$type = $configALL['default']['move']['type'];
|
$type = $configALL['default']['move']['type'];
|
||||||
$pathArray = $configALL['default']['move']['path'];
|
$pathArray = $configALL['default']['move']['path'];
|
||||||
$path = rtrim($path, DIRECTORY_SEPARATOR); // 提高Windows转移兼容性
|
$path = rtrim($path, DIRECTORY_SEPARATOR); // 提高Windows转移兼容性
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 1: // 减
|
case 1: // 减
|
||||||
foreach ($pathArray as $key => $val) {
|
foreach ($pathArray as $key => $val) {
|
||||||
@@ -757,13 +769,12 @@ class AutoReseed
|
|||||||
{
|
{
|
||||||
global $configALL;
|
global $configALL;
|
||||||
$path = rtrim($path, DIRECTORY_SEPARATOR); // 提高Windows转移兼容性
|
$path = rtrim($path, DIRECTORY_SEPARATOR); // 提高Windows转移兼容性
|
||||||
// 转移过滤器、选择器 David/2020年7月11日
|
// 转移过滤器、选择器 David/2020年7月11日
|
||||||
$path_filter = isset($configALL['default']['move']['path_filter']) && !empty($configALL['default']['move']['path_filter']) ? $configALL['default']['move']['path_filter'] : null;
|
$path_filter = isset($configALL['default']['move']['path_filter']) && !empty($configALL['default']['move']['path_filter']) ? $configALL['default']['move']['path_filter'] : null;
|
||||||
$path_selector = isset($configALL['default']['move']['path_selector']) && !empty($configALL['default']['move']['path_selector']) ? $configALL['default']['move']['path_selector'] : null;
|
$path_selector = isset($configALL['default']['move']['path_selector']) && !empty($configALL['default']['move']['path_selector']) ? $configALL['default']['move']['path_selector'] : null;
|
||||||
if (\is_null($path_filter) && \is_null($path_selector)) {
|
if (\is_null($path_filter) && \is_null($path_selector)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
} elseif (\is_null($path_filter)) {
|
||||||
elseif (\is_null($path_filter)) {
|
|
||||||
//选择器
|
//选择器
|
||||||
if (\is_array($path_selector)) {
|
if (\is_array($path_selector)) {
|
||||||
foreach ($path_selector as $pathName) {
|
foreach ($path_selector as $pathName) {
|
||||||
@@ -774,8 +785,7 @@ class AutoReseed
|
|||||||
echo '已跳过!转移选择器未匹配到:'.$path.PHP_EOL;
|
echo '已跳过!转移选择器未匹配到:'.$path.PHP_EOL;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
} elseif (\is_null($path_selector)) {
|
||||||
elseif (\is_null($path_selector)) {
|
|
||||||
//过滤器
|
//过滤器
|
||||||
if (\is_array($path_filter)) {
|
if (\is_array($path_filter)) {
|
||||||
foreach ($path_filter as $pathName) {
|
foreach ($path_filter as $pathName) {
|
||||||
@@ -812,18 +822,18 @@ class AutoReseed
|
|||||||
/**
|
/**
|
||||||
* 获取站点种子的URL
|
* 获取站点种子的URL
|
||||||
* @param string $site
|
* @param string $site
|
||||||
* @param string $_url
|
* @param string $url
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private static function getTorrentUrl($site = '', $_url = '')
|
private static function getTorrentUrl($site = '', $url = '')
|
||||||
{
|
{
|
||||||
global $configALL;
|
global $configALL;
|
||||||
// 兼容旧配置
|
// 兼容旧配置
|
||||||
if (isset($configALL[$site]['passkey']) && $configALL[$site]['passkey']) {
|
if (isset($configALL[$site]['passkey']) && $configALL[$site]['passkey']) {
|
||||||
if (!isset($configALL[$site]['url_replace'])) {
|
if (empty($configALL[$site]['url_replace'])) {
|
||||||
$configALL[$site]['url_replace'] = array('{passkey}' => $configALL[$site]['passkey']);
|
$configALL[$site]['url_replace'] = array('{passkey}' => $configALL[$site]['passkey']);
|
||||||
}
|
}
|
||||||
if (!isset($configALL[$site]['url_join'])) {
|
if (empty($configALL[$site]['url_join'])) {
|
||||||
$configALL[$site]['url_join'] = array();
|
$configALL[$site]['url_join'] = array();
|
||||||
if (in_array($site, array('m-team','mocat','hdbd'))) {
|
if (in_array($site, array('m-team','mocat','hdbd'))) {
|
||||||
if (isset($configALL[$site]['ip_type'])) {
|
if (isset($configALL[$site]['ip_type'])) {
|
||||||
@@ -835,11 +845,11 @@ class AutoReseed
|
|||||||
}
|
}
|
||||||
// 通用操作:替换
|
// 通用操作:替换
|
||||||
if (isset($configALL[$site]['url_replace']) && $configALL[$site]['url_replace']) {
|
if (isset($configALL[$site]['url_replace']) && $configALL[$site]['url_replace']) {
|
||||||
$url = strtr($_url, $configALL[$site]['url_replace']);
|
$url = strtr($url, $configALL[$site]['url_replace']);
|
||||||
}
|
}
|
||||||
// 通用操作:拼接
|
// 通用操作:拼接
|
||||||
if (isset($configALL[$site]['url_join']) && $configALL[$site]['url_join']) {
|
if (isset($configALL[$site]['url_join']) && $configALL[$site]['url_join']) {
|
||||||
$url = $url.(strpos($url, '?') === false ? '?' : '&').implode('&',$configALL[$site]['url_join']);
|
$url = $url.(strpos($url, '?') === false ? '?' : '&').implode('&', $configALL[$site]['url_join']);
|
||||||
}
|
}
|
||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
@@ -853,14 +863,21 @@ class AutoReseed
|
|||||||
$desp = '### 版本号:'. self::VER . $br;
|
$desp = '### 版本号:'. self::VER . $br;
|
||||||
$desp .= '**支持站点:'.self::$wechatMsg['sitesCount']. '** [当前支持自动辅种的站点数量]' .$br;
|
$desp .= '**支持站点:'.self::$wechatMsg['sitesCount']. '** [当前支持自动辅种的站点数量]' .$br;
|
||||||
$desp .= '**总做种:'.self::$wechatMsg['hashCount'] . '** [客户端做种的hash总数]' .$br;
|
$desp .= '**总做种:'.self::$wechatMsg['hashCount'] . '** [客户端做种的hash总数]' .$br;
|
||||||
$desp .= '**返回数据:'.self::$wechatMsg['reseedCount']. '** [服务器返回的可辅种数据]' .$br;
|
$desp .= '**返回数据:'.self::$wechatMsg['reseedCount']. '** [服务器返回的可辅种数据]' .$br;
|
||||||
$desp .= '**成功:'.self::$wechatMsg['reseedSuccess']. '** [辅种成功,会把hash加入缓存]' .$br;
|
$desp .= '**成功:'.self::$wechatMsg['reseedSuccess']. '** [会把hash加入辅种缓存]' .$br;
|
||||||
$desp .= '**失败:'.self::$wechatMsg['reseedError']. '** [种子下载失败或网络超时引起]' .$br;
|
$desp .= '**失败:'.self::$wechatMsg['reseedError']. '** [种子下载失败或网络超时引起]' .$br;
|
||||||
$desp .= '**重复:'.self::$wechatMsg['reseedRepeat']. '** [客户端已做种]' .$br;
|
$desp .= '**重复:'.self::$wechatMsg['reseedRepeat']. '** [客户端已做种]' .$br;
|
||||||
$desp .= '**跳过:'.self::$wechatMsg['reseedSkip']. '** [未设置passkey]' .$br;
|
$desp .= '**跳过:'.self::$wechatMsg['reseedSkip']. '** [未设置passkey]' .$br;
|
||||||
$desp .= '**忽略:'.self::$wechatMsg['reseedPass']. '** [成功添加存在缓存]' .$br;
|
$desp .= '**忽略:'.self::$wechatMsg['reseedPass']. '** [成功添加存在缓存]' .$br;
|
||||||
$desp .= $br.'**如需重新辅种,请删除 ./torrent/cachehash 内的所有辅种缓存。**'.$br;
|
$desp .= '**如需重新辅种,请删除 ./torrent/cachehash 辅种缓存。**'.$br;
|
||||||
$desp .= '*此消息将在3天后过期*。';
|
// 移动做种
|
||||||
|
if (self::$wechatMsg['MoveSuccess'] || self::$wechatMsg['MoveError']) {
|
||||||
|
$desp .= $br.'----------'.$br;
|
||||||
|
$desp .= '**移动成功:'.self::$wechatMsg['MoveSuccess']. '** [会把hash加入移动缓存]' .$br;
|
||||||
|
$desp .= '**移动失败:'.self::$wechatMsg['MoveError']. '** [解决错误提示,可以重试]' .$br;
|
||||||
|
$desp .= '**如需重新移动,请删除 ./torrent/cachemove 移动缓存。**'.$br;
|
||||||
|
}
|
||||||
|
$desp .= $br.'*此消息将在3天后过期*。';
|
||||||
return ff($text, $desp);
|
return ff($text, $desp);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace IYUU\Library;
|
namespace IYUU\Library;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class IFile
|
* @class IFile
|
||||||
* @brief IFile 文件处理类
|
* @brief IFile 文件处理类
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace IYUU\Library;
|
namespace IYUU\Library;
|
||||||
|
|
||||||
use Curl\Curl;
|
use Curl\Curl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IYUU用户注册、认证
|
* IYUU用户注册、认证
|
||||||
*/
|
*/
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace IYUU\Library;
|
namespace IYUU\Library;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by PhpStorm.
|
* Created by PhpStorm.
|
||||||
* User: 大卫
|
* User: 大卫
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
use IYUU\Library\IFile;
|
use IYUU\Library\IFile;
|
||||||
use IYUU\Library\Table;
|
use IYUU\Library\Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调试函数
|
* 调试函数
|
||||||
* @param $data
|
* @param $data
|
||||||
|
@@ -103,6 +103,15 @@ return array(
|
|||||||
// 如果需要自动辅种,必须配置
|
// 如果需要自动辅种,必须配置
|
||||||
'passkey' => '',
|
'passkey' => '',
|
||||||
'id' => 0, // 用户ID(不是用户名)
|
'id' => 0, // 用户ID(不是用户名)
|
||||||
|
'url_replace' => array(),
|
||||||
|
'url_join' => array(
|
||||||
|
//'ipv6=1', // 种子Tracker的IP地址选择 可选:ipv4,ipv6
|
||||||
|
//'https=1',
|
||||||
|
),
|
||||||
|
'limitRule' => array(
|
||||||
|
'count' => 20, // 每次辅种20个
|
||||||
|
'sleep' => 15, // 最少休眠15秒
|
||||||
|
),
|
||||||
'workingMode' => 0,
|
'workingMode' => 0,
|
||||||
'watch' => '/root/downloads',
|
'watch' => '/root/downloads',
|
||||||
'filter' => array(
|
'filter' => array(
|
||||||
@@ -111,11 +120,7 @@ return array(
|
|||||||
'max' => '280GB',
|
'max' => '280GB',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'url_replace' => array(),
|
|
||||||
'url_join' => array(
|
|
||||||
//'ipv6=1', // 种子Tracker的IP地址选择 可选:ipv4,ipv6
|
|
||||||
//'https=1',
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
// hddolby
|
// hddolby
|
||||||
'hddolby' => array(
|
'hddolby' => array(
|
||||||
@@ -136,6 +141,10 @@ return array(
|
|||||||
'id' => 0, // 用户ID(不是用户名)
|
'id' => 0, // 用户ID(不是用户名)
|
||||||
'url_replace' => array(),
|
'url_replace' => array(),
|
||||||
'url_join' => array(),
|
'url_join' => array(),
|
||||||
|
'limitRule' => array(
|
||||||
|
'count' => 20, // 每次辅种20个
|
||||||
|
'sleep' => 5, // 最少休眠5秒
|
||||||
|
),
|
||||||
),
|
),
|
||||||
// PTHome
|
// PTHome
|
||||||
'pthome' => array(
|
'pthome' => array(
|
||||||
@@ -157,7 +166,11 @@ return array(
|
|||||||
'url_replace' => array(),
|
'url_replace' => array(),
|
||||||
'url_join' => array(
|
'url_join' => array(
|
||||||
//'ipv6=1', // 种子Tracker的IP地址选择 可选:ipv4,ipv6
|
//'ipv6=1', // 种子Tracker的IP地址选择 可选:ipv4,ipv6
|
||||||
//'https=1',
|
'https=1',
|
||||||
|
),
|
||||||
|
'limitRule' => array(
|
||||||
|
'count' => 20, // 每次辅种20个
|
||||||
|
'sleep' => 15, // 最少休眠15秒
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// m-team
|
// m-team
|
||||||
@@ -292,6 +305,10 @@ return array(
|
|||||||
'passkey' => '',
|
'passkey' => '',
|
||||||
'url_replace' => array(),
|
'url_replace' => array(),
|
||||||
'url_join' => array(),
|
'url_join' => array(),
|
||||||
|
'limitRule' => array(
|
||||||
|
'count' => 20, // 每次辅种20个
|
||||||
|
'sleep' => 15, // 最少休眠15秒
|
||||||
|
),
|
||||||
),
|
),
|
||||||
// yingk
|
// yingk
|
||||||
'yingk' => array(
|
'yingk' => array(
|
||||||
@@ -391,6 +408,10 @@ return array(
|
|||||||
'passkey' => '',
|
'passkey' => '',
|
||||||
'url_replace' => array(),
|
'url_replace' => array(),
|
||||||
'url_join' => array(),
|
'url_join' => array(),
|
||||||
|
'limitRule' => array(
|
||||||
|
'count' => 10, // 每次辅种10个
|
||||||
|
'sleep' => 5, // 最少休眠15秒
|
||||||
|
),
|
||||||
),
|
),
|
||||||
// hdarea
|
// hdarea
|
||||||
'hdarea' => array(
|
'hdarea' => array(
|
||||||
@@ -592,6 +613,10 @@ return array(
|
|||||||
'passkey' => '',
|
'passkey' => '',
|
||||||
'url_replace' => array(),
|
'url_replace' => array(),
|
||||||
'url_join' => array(),
|
'url_join' => array(),
|
||||||
|
'limitRule' => array(
|
||||||
|
'count' => 20, // 每次辅种20个
|
||||||
|
'sleep' => 20, // 最少休眠20秒
|
||||||
|
),
|
||||||
),
|
),
|
||||||
// hdroute
|
// hdroute
|
||||||
'hdroute' => array(
|
'hdroute' => array(
|
||||||
|
2
iyuu.php
2
iyuu.php
@@ -26,6 +26,6 @@
|
|||||||
require_once __DIR__ . '/init.php';
|
require_once __DIR__ . '/init.php';
|
||||||
echo '当前脚本路径:'.__FILE__.PHP_EOL;
|
echo '当前脚本路径:'.__FILE__.PHP_EOL;
|
||||||
use IYUU\AutoReseed;
|
use IYUU\AutoReseed;
|
||||||
|
|
||||||
AutoReseed::init();
|
AutoReseed::init();
|
||||||
AutoReseed::call();
|
AutoReseed::call();
|
||||||
exit(0);
|
|
||||||
|
@@ -73,8 +73,12 @@ IYUU自动辅种工具(英文名:IYUUAutoReseed),是一款PHP语言编
|
|||||||
|
|
||||||
实时更新的接口文档:http://api.iyuu.cn/docs.php
|
实时更新的接口文档:http://api.iyuu.cn/docs.php
|
||||||
|
|
||||||
|
## 相关项目
|
||||||
|
|
||||||
|
#todo...
|
||||||
|
|
||||||
## 需求提交/错误反馈
|
## 需求提交/错误反馈
|
||||||
|
|
||||||
- QQ群:859882209[2000人.入门群],931954050[1000人.进阶群]
|
- QQ群:859882209[2000人.入门群],931954050[1000人.进阶群]
|
||||||
- 问答社区:http://wenda.iyuu.cn
|
- 问答社区:http://wenda.iyuu.cn
|
||||||
- 博客:https://www.iyuu.cn/
|
- 博客:https://www.iyuu.cn/
|
||||||
|
19
wiki/公告栏.md
19
wiki/公告栏.md
@@ -1,5 +1,24 @@
|
|||||||
# 公告栏
|
# 公告栏
|
||||||
|
|
||||||
|
### 2020年7月13日08:00:00
|
||||||
|
|
||||||
|
【更新提醒】v1.9.1
|
||||||
|
|
||||||
|
优化:App.Api.Sites接口请求时携带版本号(版本为空或低于v1.9.1会返回旧数据);
|
||||||
|
|
||||||
|
新增:异步间隔流控算法,适用所有站点;各站独立、执行时间最优;
|
||||||
|
|
||||||
|
【升级方法】
|
||||||
|
|
||||||
|
1.异步间隔流控使用方法:参考v1.9.1版本的config.sample.php[第242-245行],把他复制到你想应用流控的站点配置项内;解释:count表示每次辅种的最大数量,sleep表示当前站点每次下载种子最小间隔多少秒。
|
||||||
|
|
||||||
|
2.url_replace和url_join是为了最大化兼容未来各种类型站点提前准备的,可以自定义URL;
|
||||||
|
|
||||||
|
解释:url_replace是替换下载链接时使用,让下载链接支持替换任意参数。举例:'url_replace'=>array('{passkey}'=>'123456789'), 下载链接https://pt.baidu.com/download.php?id={}&passkey={passkey},替换后变为https://pt.baidu.com/download.php?id={}&passkey=123456789
|
||||||
|
|
||||||
|
解释:url_join是拼接下载链接是使用,让下载链接支持任意自定义参数。举例:
|
||||||
|
'url_join' => array('ipv6=1','https=1'), 下载链接https://pt.baidu.com/download.php?id={}&passkey=123456789,拼接后变为https://pt.baidu.com/download.php?id={}&passkey=123456789&ipv6=1&https=1
|
||||||
|
|
||||||
### 2020年7月12日19:34:03
|
### 2020年7月12日19:34:03
|
||||||
|
|
||||||
【新增功能】v1.9.0
|
【新增功能】v1.9.0
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
## 支持用户验证的合作站点:`ourbits`,`hddolby`,`hdhome`,`pthome`
|
## 支持用户验证的合作站点:`ourbits`,`hddolby`,`hdhome`,`pthome`,`moecat`
|
||||||
截止2020年3月15日13:25:30【文档更新有延迟,最终以gitee、github为准】
|
截止2020年7月17日20:30:53【文档更新有延迟,最终以gitee、github为准】
|
||||||
|
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
@@ -85,9 +85,11 @@
|
|||||||
|
|
||||||
#### 问:如何反馈问题?
|
#### 问:如何反馈问题?
|
||||||
|
|
||||||
答:1、点击链接加入群聊【IYUU自动辅种交流】:[https://jq.qq.com/?_wv=1027&k=5JOfOlM][1]
|
答:1、QQ群:859882209[2000人.入门群],931954050[1000人.进阶群]
|
||||||
|
|
||||||
2、QQ群:859882209
|
2、问答社区:http://wenda.iyuu.cn
|
||||||
|
|
||||||
3、issues: https://gitee.com/ledc/IYUUAutoReseed/issues
|
3、博客:https://www.iyuu.cn
|
||||||
|
|
||||||
|
4、issues: https://gitee.com/ledc/IYUUAutoReseed/issues
|
||||||
|
|
||||||
|
@@ -13,8 +13,7 @@
|
|||||||
| Google身份验证器(谷歌动态口令) | 开发中 | 2020年2月21日 | |
|
| Google身份验证器(谷歌动态口令) | 开发中 | 2020年2月21日 | |
|
||||||
| 自动更新 | 开发中 | 2020年2月21日 | |
|
| 自动更新 | 开发中 | 2020年2月21日 | |
|
||||||
| WEB页面生成配置 | 开发中 | 2020年2月21日 | |
|
| WEB页面生成配置 | 开发中 | 2020年2月21日 | |
|
||||||
| 种子删除自动同步 | 开发中 | 2020年2月21日 | 2020年5月6日 |
|
| 种子删除自动同步 | 已完成 | 2020年2月21日 | 2020年5月6日 |
|
||||||
| 脚本docker容器化(测试版) | 已完成 | 2020年2月21日 | 2020年2月21日 |
|
| 脚本docker容器化(测试版) | 已完成 | 2020年2月21日 | 2020年2月21日 |
|
||||||
| 自动配置(简化配置) | 开发中 | 2020年4月10日 | |
|
|
||||||
| 浏览器插件 | 暂未开始 | | |
|
| 浏览器插件 | 暂未开始 | | |
|
||||||
| 合集自动拆包辅种 | 暂未开始 | | |
|
| 合集自动拆包辅种 | 暂未开始 | | |
|
||||||
|
Reference in New Issue
Block a user