mirror of
https://gitee.com/ledc/IYUUAutoReseed
synced 2025-08-24 15:04:50 +00:00
Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
de41bc0131 | ||
|
6b83e9081b | ||
|
87f06ec5c4 | ||
|
8a051d4d1f | ||
|
0e32e625a4 | ||
|
a09dacbd20 | ||
|
e3a9c32174 | ||
|
c8a94bfcff | ||
|
fd87d07539 | ||
|
df7100e4e9 | ||
|
44f5b82650 | ||
|
f5a33843e6 | ||
|
7428144aa8 | ||
|
cc325dc128 | ||
|
3d675ed4bd | ||
|
eabb51c54a | ||
|
1e1a7bfc59 | ||
|
005788827d | ||
|
ffb600c334 | ||
|
290bfbe5c9 | ||
|
6ecf4f1d54 | ||
|
c809e8d052 | ||
|
8d7dffbf3d | ||
|
cc50804b40 |
@@ -1,2 +0,0 @@
|
||||
@echo off
|
||||
composer create-project ledccn/iyuuautoreseed:dev-master
|
@@ -1,5 +0,0 @@
|
||||
@echo off
|
||||
chcp 65001
|
||||
git clone https://gitee.com/ledc/IYUUAutoReseed.git
|
||||
cd IYUUAutoReseed
|
||||
php ./iyuu.php
|
@@ -1,19 +1,17 @@
|
||||
<?php
|
||||
namespace IYUU;
|
||||
|
||||
use Curl\Curl;
|
||||
use IYUU\Client\AbstractClient;
|
||||
use IYUU\Library\IFile;
|
||||
use IYUU\Library\Oauth;
|
||||
use IYUU\Library\Table;
|
||||
|
||||
/**
|
||||
* IYUUAutoReseed自动辅种类
|
||||
*/
|
||||
class AutoReseed
|
||||
{
|
||||
// 版本号
|
||||
const VER = '1.7.8';
|
||||
const VER = '1.9.1';
|
||||
// RPC连接
|
||||
private static $links = [];
|
||||
// 客户端配置
|
||||
@@ -69,19 +67,16 @@ class AutoReseed
|
||||
public static function init()
|
||||
{
|
||||
global $configALL;
|
||||
echo "版本号:".self::VER.PHP_EOL;
|
||||
echo "正在初始化运行参数,版本号:".self::VER.PHP_EOL;
|
||||
sleep(mt_rand(1, 3));
|
||||
self::backup('config', $configALL);
|
||||
self::$curl = new Curl();
|
||||
self::$curl->setOpt(CURLOPT_SSL_VERIFYPEER, false);
|
||||
self::$curl->setOpt(CURLOPT_SSL_VERIFYHOST, 2);
|
||||
|
||||
// 合作站点自动注册鉴权
|
||||
$is_login = Oauth::login(self::$apiUrl . self::$endpoints['login']);
|
||||
if (!$is_login) {
|
||||
echo '合作站点鉴权配置,请查阅:https://www.iyuu.cn/archives/337/' .PHP_EOL;
|
||||
}
|
||||
// 合作站点自动鉴权绑定
|
||||
Oauth::login(self::$apiUrl . self::$endpoints['login']);
|
||||
|
||||
echo "程序正在初始化运行参数... ".PHP_EOL;
|
||||
// 显示支持站点列表
|
||||
self::ShowTableSites();
|
||||
self::$clients = isset($configALL['default']['clients']) && $configALL['default']['clients'] ? $configALL['default']['clients'] : array();
|
||||
@@ -100,16 +95,18 @@ class AutoReseed
|
||||
*/
|
||||
private static function ShowTableSites()
|
||||
{
|
||||
$list[] = 'gitee源码仓库:https://gitee.com/ledc/IYUUAutoReseed';
|
||||
$list[] = 'github源码仓库:https://github.com/ledccn/IYUUAutoReseed';
|
||||
$list[] = '教程:https://gitee.com/ledc/IYUUAutoReseed/tree/master/wiki';
|
||||
$list[] = '问答社区:http://wenda.iyuu.cn';
|
||||
$list[] = "QQ群:859882209 【IYUU自动辅种交流】".PHP_EOL;
|
||||
foreach ($list as $key => $value) {
|
||||
$list = [
|
||||
'gitee源码仓库:https://gitee.com/ledc/IYUUAutoReseed',
|
||||
'github源码仓库:https://github.com/ledccn/IYUUAutoReseed',
|
||||
'教程:https://gitee.com/ledc/IYUUAutoReseed/tree/master/wiki',
|
||||
'问答社区:http://wenda.iyuu.cn',
|
||||
'【IYUU自动辅种交流】QQ群:859882209、931954050'.PHP_EOL,
|
||||
'正在连接IYUUAutoReseed服务器,查询支持列表……'.PHP_EOL
|
||||
];
|
||||
foreach ($list as $value) {
|
||||
echo $value.PHP_EOL;
|
||||
}
|
||||
echo "正在连接IYUUAutoReseed服务器,查询支持列表…… ".PHP_EOL;
|
||||
$res = self::$curl->get(self::$apiUrl.self::$endpoints['sites'].'?sign='.Oauth::getSign());
|
||||
$res = self::$curl->get(self::$apiUrl.self::$endpoints['sites'].'?sign='.Oauth::getSign().'&version='.self::VER);
|
||||
$rs = json_decode($res->response, true);
|
||||
$sites = isset($rs['data']['sites']) && $rs['data']['sites'] ? $rs['data']['sites'] : false;
|
||||
// 数据写入本地
|
||||
@@ -144,7 +141,7 @@ class AutoReseed
|
||||
$data[$k][] = $j.". ".$v['site'];
|
||||
}
|
||||
echo "IYUUAutoReseed自动辅种脚本,目前支持以下站点:".PHP_EOL;
|
||||
//输出表格
|
||||
// 输出支持站点表格
|
||||
$table = new Table();
|
||||
$table->setRows($data);
|
||||
echo($table->render());
|
||||
@@ -152,7 +149,7 @@ class AutoReseed
|
||||
/**
|
||||
* 连接远端RPC下载器
|
||||
*/
|
||||
public static function links()
|
||||
private static function links()
|
||||
{
|
||||
foreach (self::$clients as $k => $v) {
|
||||
// 跳过未配置的客户端
|
||||
@@ -167,14 +164,15 @@ class AutoReseed
|
||||
self::$links[$k]['rpc'] = $client;
|
||||
self::$links[$k]['type'] = $v['type'];
|
||||
self::$links[$k]['BT_backup'] = isset($v['BT_backup']) && $v['BT_backup'] ? $v['BT_backup'] : '';
|
||||
self::$links[$k]['root_folder'] = isset($v['root_folder']) ? $v['root_folder'] : 1;
|
||||
$result = $client->status();
|
||||
print $v['type'].':'.$v['host']." Rpc连接 [{$result}] \n";
|
||||
// 检查转移做种 (移动配置为真、self::$move为空)
|
||||
if (isset($v['move']) && $v['move'] && is_null(self::$move)) {
|
||||
// 检查转移做种 (self::$move为空,移动配置为真)
|
||||
if (is_null(self::$move) && isset($v['move']) && $v['move']) {
|
||||
self::$move = array($k,$v['move']);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
die('[Links ERROR] ' . $e->getMessage() . PHP_EOL);
|
||||
die('[连接错误] ' . $e->getMessage() . PHP_EOL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -218,17 +216,23 @@ class AutoReseed
|
||||
$errmsg = isset($result['result']) ? $result['result'] : '未知错误,请稍后重试!';
|
||||
if (strpos($errmsg, 'http error 404: Not Found') !== false) {
|
||||
self::sendNotify('404');
|
||||
} elseif (strpos($errmsg, 'http error 403: Forbidden') !== false) {
|
||||
self::sendNotify('403');
|
||||
}
|
||||
print "-----RPC添加种子任务,失败 [{$errmsg}]" . PHP_EOL.PHP_EOL;
|
||||
}
|
||||
break;
|
||||
case 'qBittorrent':
|
||||
$extra_options['autoTMM'] = 'false'; //关闭自动种子管理
|
||||
#$extra_options['skip_checking'] = 'true'; //跳校验
|
||||
// 添加任务校验后是否暂停
|
||||
if (isset($extra_options['paused'])) {
|
||||
$extra_options['paused'] = $extra_options['paused'] ? 'true' : 'false';
|
||||
} else {
|
||||
$extra_options['paused'] = 'true';
|
||||
}
|
||||
// 是否创建根目录
|
||||
$extra_options['root_folder'] = self::$links[$rpcKey]['root_folder'] ? 'true' : 'false';
|
||||
if ($is_url) {
|
||||
$result = self::$links[$rpcKey]['rpc']->add($torrent, $save_path, $extra_options); // 种子URL添加下载任务
|
||||
} else {
|
||||
@@ -245,16 +249,16 @@ class AutoReseed
|
||||
}
|
||||
break;
|
||||
default:
|
||||
echo '[add ERROR] '.$type. PHP_EOL. PHP_EOL;
|
||||
echo '[下载器类型错误] '.$type. PHP_EOL. PHP_EOL;
|
||||
break;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
echo '[add ERROR] ' . $e->getMessage() . PHP_EOL;
|
||||
echo '[添加下载任务出错] ' . $e->getMessage() . PHP_EOL;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* 转移、辅种总入口
|
||||
* 辅种或转移,总入口
|
||||
*/
|
||||
public static function call()
|
||||
{
|
||||
@@ -267,13 +271,13 @@ class AutoReseed
|
||||
/**
|
||||
* IYUUAutoReseed辅种
|
||||
*/
|
||||
public static function reseed()
|
||||
private static function reseed()
|
||||
{
|
||||
global $configALL;
|
||||
// 支持站点数量
|
||||
self::$wechatMsg['sitesCount'] = count(self::$sites);
|
||||
$sites = self::$sites;
|
||||
// 按客户端循环辅种 开始
|
||||
// 遍历客户端 开始
|
||||
foreach (self::$links as $k => $v) {
|
||||
if (empty($v)) {
|
||||
echo "clients_".$k." 用户名或密码未配置,已跳过".PHP_EOL.PHP_EOL;
|
||||
@@ -327,13 +331,11 @@ class AutoReseed
|
||||
echo '-----辅种失败,原因:' .$errmsg.PHP_EOL.PHP_EOL;
|
||||
continue;
|
||||
}
|
||||
// 当前客户端可辅种数据
|
||||
// 遍历当前客户端可辅种数据
|
||||
foreach ($reseed as $info_hash => $vv) {
|
||||
// 当前种子哈希对应的目录
|
||||
$downloadDir = $infohash_Dir[$info_hash];
|
||||
foreach ($vv['torrent'] as $id => $value) {
|
||||
$_url = $url = '';
|
||||
$download_page = $details_url = '';
|
||||
// 匹配的辅种数据累加
|
||||
self::$wechatMsg['reseedCount']++;
|
||||
// 站点id
|
||||
@@ -351,13 +353,15 @@ class AutoReseed
|
||||
self::setNotify($siteName, $sid, $torrent_id);
|
||||
// 页面规则
|
||||
$download_page = str_replace('{}', $torrent_id, $sites[$sid]['download_page']);
|
||||
$_url = 'https://' .$sites[$sid]['base_url']. '/' .$download_page;
|
||||
// 协议
|
||||
$protocol = $sites[$sid]['is_https'] == 0 ? 'http://' : 'https://';
|
||||
$_url = $protocol . $sites[$sid]['base_url']. '/' .$download_page;
|
||||
|
||||
/**
|
||||
* 前置检测
|
||||
*/
|
||||
// passkey检测
|
||||
if (empty($configALL[$siteName]['passkey'])) {
|
||||
// 配置与passkey检测
|
||||
if (empty($configALL[$siteName]) || empty($configALL[$siteName]['passkey'])) {
|
||||
//echo '-------因当前' .$siteName. "站点未设置passkey,已跳过!!".PHP_EOL.PHP_EOL;
|
||||
self::$wechatMsg['reseedSkip']++;
|
||||
continue;
|
||||
@@ -402,19 +406,47 @@ class AutoReseed
|
||||
wlog('clients_'.$k.PHP_EOL.$downloadDir.PHP_EOL.$_url.PHP_EOL.PHP_EOL, $siteName);
|
||||
continue;
|
||||
}
|
||||
// 操作站点流控的配置
|
||||
if (isset($configALL[$siteName]['limitRule']) && $configALL[$siteName]['limitRule']) {
|
||||
$limitRule = $configALL[$siteName]['limitRule'];
|
||||
if (isset($limitRule['count']) && isset($limitRule['sleep'])) {
|
||||
if ($limitRule['count'] <= 0) {
|
||||
echo '-------当前站点辅种数量已满足规则,保障账号安全已跳过:'.$_url.PHP_EOL.PHP_EOL;
|
||||
self::$wechatMsg['reseedPass']++;
|
||||
continue;
|
||||
} else {
|
||||
// 异步间隔流控算法:各站独立、执行时间最优
|
||||
$lastTime = isset($limitRule['time']) ? $limitRule['time'] : 0; // 最近一次辅种成功的时间
|
||||
if ($lastTime) {
|
||||
$interval = time() - $lastTime; // 间隔时间
|
||||
if ($interval < $limitRule['sleep']) {
|
||||
$t = $limitRule['sleep'] - $interval + mt_rand(1,5);
|
||||
do {
|
||||
echo microtime(true)." 为账号安全,辅种进程休眠 {$t} 秒后继续...".PHP_EOL;
|
||||
sleep(1);
|
||||
} while (--$t > 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo '-------当前站点流控规则错误,缺少count或sleep参数!请重新配置!'.$_url.PHP_EOL.PHP_EOL;
|
||||
self::$wechatMsg['reseedPass']++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 种子URL组合方式区分
|
||||
*/
|
||||
$url = self::getTorrentUrl($siteName, $_url);
|
||||
$reseedPass = false;
|
||||
$reseedPass = false; // 标志:跳过辅种
|
||||
// 特殊站点:种子元数据推送给下载器
|
||||
switch ($siteName) {
|
||||
case 'hdchina':
|
||||
$cookie = isset($configALL[$siteName]['cookie']) ? $configALL[$siteName]['cookie'] : '';
|
||||
$cookie = $configALL[$siteName]['cookie'];
|
||||
$userAgent = $configALL['default']['userAgent'];
|
||||
// 拼接URL
|
||||
$details_page = str_replace('{}', $value['torrent_id'], 'details.php?id={}&hit=1');
|
||||
$details_url = 'https://' .$sites[$sid]['base_url']. '/' .$details_page;
|
||||
$details_url = $protocol .$sites[$sid]['base_url']. '/' .$details_page;
|
||||
print "种子详情页:".$details_url.PHP_EOL;
|
||||
$details_html = download($details_url, $cookie, $userAgent);
|
||||
if (empty($details_html)) {
|
||||
@@ -425,30 +457,31 @@ class AutoReseed
|
||||
sleep(1);
|
||||
} while (--$t > 0);
|
||||
$configALL[$siteName]['cookie'] = '';
|
||||
// 标志:跳过辅种
|
||||
$reseedPass = true;
|
||||
break;
|
||||
}
|
||||
if (strpos($details_html, '没有该ID的种子') != false) {
|
||||
echo '种子已被删除!'.PHP_EOL;
|
||||
self::sendNotify('404');
|
||||
// 标志:跳过辅种
|
||||
self::sendNotify('404');
|
||||
$reseedPass = true;
|
||||
break;
|
||||
}
|
||||
// 提取种子下载地址
|
||||
$offset = strpos($details_html, str_replace('{hash}', '', $sites[$sid]['download_page']));
|
||||
if ($offset === false) {
|
||||
echo 'cookie已过期,请更新后重新辅种!'.PHP_EOL;
|
||||
$reseedPass = true;
|
||||
break;
|
||||
}
|
||||
// 提取种子下载地址
|
||||
$download_page = str_replace('{}', '', $sites[$sid]['download_page']);
|
||||
$offset = strpos($details_html, $download_page);
|
||||
$urlTemp = substr($details_html, $offset, 50);
|
||||
// 种子地址
|
||||
$_url = substr($urlTemp, 0, strpos($urlTemp, '">'));
|
||||
if (empty($_url)) {
|
||||
$download_page = substr($urlTemp, 0, strpos($urlTemp, '">'));
|
||||
if (empty($download_page)) {
|
||||
echo '未知错误,未提取到种子URL,请联系脚本作者!'.PHP_EOL;
|
||||
// 标志:跳过辅种
|
||||
$reseedPass = true;
|
||||
break;
|
||||
}
|
||||
$_url = 'https://' .$sites[$sid]['base_url']. '/' . $_url;
|
||||
$_url = $protocol . $sites[$sid]['base_url']. '/' . $download_page;
|
||||
print "种子下载页:".$_url.PHP_EOL;
|
||||
$url = download($_url, $cookie, $userAgent);
|
||||
#p($url);
|
||||
@@ -462,7 +495,6 @@ class AutoReseed
|
||||
} while (--$t > 0);
|
||||
ff($siteName. '站点,辅种时触发第一次下载提示!');
|
||||
self::$noReseed[] = 'hdchina';
|
||||
// 标志:跳过辅种
|
||||
$reseedPass = true;
|
||||
}
|
||||
if (strpos($url, '系统检测到过多的种子下载请求') != false) {
|
||||
@@ -470,12 +502,11 @@ class AutoReseed
|
||||
ff($siteName. '站点,辅种时触发人机验证!');
|
||||
$configALL[$siteName]['limit'] = 1;
|
||||
self::$noReseed[] = 'hdchina';
|
||||
// 标志:跳过辅种
|
||||
$reseedPass = true;
|
||||
}
|
||||
break;
|
||||
case 'hdcity':
|
||||
$cookie = isset($configALL[$siteName]['cookie']) ? $configALL[$siteName]['cookie'] : '';
|
||||
$cookie = $configALL[$siteName]['cookie'];
|
||||
$userAgent = $configALL['default']['userAgent'];
|
||||
print "种子:".$_url.PHP_EOL;
|
||||
if (isset($configALL[$siteName]['cuhash'])) {
|
||||
@@ -483,14 +514,14 @@ class AutoReseed
|
||||
# code...
|
||||
} else {
|
||||
// 获取cuhash
|
||||
$html = download('https://' .$sites[$sid]['base_url']. '/pt', $cookie, $userAgent);
|
||||
$html = download($protocol .$sites[$sid]['base_url']. '/pt', $cookie, $userAgent);
|
||||
// 提取种子下载地址
|
||||
$offset = strpos($html, 'cuhash=');
|
||||
$len = strlen('cuhash=');
|
||||
$cuhashTemp = substr($html, $offset+$len, 40);
|
||||
$configALL[$siteName]['cuhash'] = substr($cuhashTemp, 0, strpos($cuhashTemp, '"'));
|
||||
}
|
||||
$url = $_url."&cuhash=". $configALL[$siteName]['cuhash'];
|
||||
$url = str_replace('{cuhash}', $configALL[$siteName]['cuhash'], $_url);
|
||||
// 城市下载种子时会302转向
|
||||
$url = download($url, $cookie, $userAgent);
|
||||
if (strpos($url, 'Non-exist torrent id!') != false) {
|
||||
@@ -529,6 +560,14 @@ class AutoReseed
|
||||
$log = 'clients_'.$k.PHP_EOL.$downloadDir.PHP_EOL.$url.PHP_EOL.PHP_EOL;
|
||||
if ($ret) {
|
||||
// 成功的种子
|
||||
// 操作流控参数
|
||||
if (isset($configALL[$siteName]['limitRule']) && $configALL[$siteName]['limitRule']) {
|
||||
$limitRule = $configALL[$siteName]['limitRule'];
|
||||
if ($limitRule['count']) {
|
||||
$configALL[$siteName]['limitRule']['count']--;
|
||||
$configALL[$siteName]['limitRule']['time'] = time();
|
||||
}
|
||||
}
|
||||
wlog($log, $value['info_hash'], self::$cacheHash);
|
||||
wlog($log, 'reseedSuccess');
|
||||
// 成功累加
|
||||
@@ -549,9 +588,10 @@ class AutoReseed
|
||||
/**
|
||||
* IYUUAutoReseed做种客户端转移
|
||||
*/
|
||||
public static function move()
|
||||
private static function move()
|
||||
{
|
||||
global $configALL;
|
||||
//遍历客户端
|
||||
foreach (self::$links as $k => $v) {
|
||||
if (self::$move[0] == $k) {
|
||||
echo "clients_".$k."是目标转移客户端,避免冲突,已跳过!".PHP_EOL.PHP_EOL;
|
||||
@@ -574,12 +614,16 @@ class AutoReseed
|
||||
echo "clients_".$k." 全部转移成功,本次无需转移!".PHP_EOL.PHP_EOL;
|
||||
continue;
|
||||
}
|
||||
// 循环转移做种客户端
|
||||
foreach ($infohash_Dir as $info_hash => $downloadDir) {
|
||||
//遍历当前客户端种子
|
||||
foreach ($infohash_Dir as $info_hash => $downloadDir) {
|
||||
// 调用路径过滤
|
||||
if (self::pathFilter($downloadDir)) {
|
||||
continue;
|
||||
}
|
||||
// 做种实际路径与相对路径之间互转
|
||||
echo '转换前:'.$downloadDir.PHP_EOL;
|
||||
$downloadDir = self::pathReplace($downloadDir);
|
||||
echo '转换后:'.$downloadDir.PHP_EOL;
|
||||
echo '转换后:'.$downloadDir.PHP_EOL;
|
||||
if (is_null($downloadDir)) {
|
||||
echo 'IYUU自动转移做种客户端--使用教程 https://www.iyuu.cn/archives/351/'.PHP_EOL;
|
||||
die("全局配置的move数组内,路径转换参数配置错误,请重新配置!!!".PHP_EOL);
|
||||
@@ -658,7 +702,7 @@ class AutoReseed
|
||||
/**
|
||||
* 过滤已转移的种子hash
|
||||
*/
|
||||
public static function hashFilter(&$infohash_Dir = array())
|
||||
private static function hashFilter(&$infohash_Dir = array())
|
||||
{
|
||||
foreach ($infohash_Dir as $info_hash => $dir) {
|
||||
if (is_file(self::$cacheMove . $info_hash.'.txt')) {
|
||||
@@ -671,12 +715,12 @@ class AutoReseed
|
||||
/**
|
||||
* 实际路径与相对路径之间互相转换
|
||||
*/
|
||||
public static function pathReplace($path = '')
|
||||
private static function pathReplace($path = '')
|
||||
{
|
||||
global $configALL;
|
||||
$type = $configALL['default']['move']['type'];
|
||||
$pathArray = $configALL['default']['move']['path'];
|
||||
$path = rtrim($path, DIRECTORY_SEPARATOR); // 提高Windows转移兼容性
|
||||
$path = rtrim($path, DIRECTORY_SEPARATOR); // 提高Windows转移兼容性
|
||||
switch ($type) {
|
||||
case 1: // 减
|
||||
foreach ($pathArray as $key => $val) {
|
||||
@@ -706,56 +750,117 @@ class AutoReseed
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* 获取站点种子的URL
|
||||
* 处理转移种子时所设置的过滤器、选择器
|
||||
* @return bool true 过滤 | false 不过滤
|
||||
*/
|
||||
public static function getTorrentUrl($site = '', $_url = '')
|
||||
private static function pathFilter(&$path = '')
|
||||
{
|
||||
global $configALL;
|
||||
switch ($site) {
|
||||
case 'ttg':
|
||||
$url = $_url."/". $configALL[$site]['passkey'];
|
||||
break;
|
||||
case 'm-team':
|
||||
case 'moecat':
|
||||
case 'hdbd':
|
||||
$ip_type = '';
|
||||
if (isset($configALL[$site]['ip_type'])) {
|
||||
$ip_type = $configALL[$site]['ip_type'] == 'ipv6' ? '&ipv6=1' : '';
|
||||
$path = rtrim($path, DIRECTORY_SEPARATOR); // 提高Windows转移兼容性
|
||||
// 转移过滤器、选择器 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_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)) {
|
||||
return false;
|
||||
}
|
||||
elseif (\is_null($path_filter)) {
|
||||
//选择器
|
||||
if (\is_array($path_selector)) {
|
||||
foreach ($path_selector as $pathName) {
|
||||
if (strpos($path, $pathName)===0) { // 没用$path == $key判断,是为了提高兼容性
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$url = $_url."&passkey=". $configALL[$site]['passkey'] . $ip_type. "&https=1";
|
||||
break;
|
||||
case 'ccfbits':
|
||||
$url = str_replace('{passkey}', $configALL[$site]['passkey'], $_url);
|
||||
break;
|
||||
case 'dicmusic':
|
||||
$_url = str_replace('{torrent_pass}', $configALL[$site]['passkey'], $_url);
|
||||
$url = str_replace('{authkey}', $configALL[$site]['authkey'], $_url);
|
||||
break;
|
||||
case 'hdroute':
|
||||
$url = str_replace('{passkey}', $configALL[$site]['passkey'], $_url);
|
||||
break;
|
||||
default:
|
||||
$url = $_url."&passkey=". $configALL[$site]['passkey'];
|
||||
break;
|
||||
echo '已跳过!转移选择器未匹配到:'.$path.PHP_EOL;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
elseif (\is_null($path_selector)) {
|
||||
//过滤器
|
||||
if (\is_array($path_filter)) {
|
||||
foreach ($path_filter as $pathName) {
|
||||
if (strpos($path, $pathName)===0) { // 没用$path == $key判断,是为了提高兼容性
|
||||
echo '已跳过!转移过滤器匹配到:'.$path.PHP_EOL;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
//同时设置过滤器、选择器
|
||||
if (\is_array($path_selector) && \is_array($path_filter)) {
|
||||
//先过滤器
|
||||
foreach ($path_filter as $pathName) {
|
||||
if (strpos($path, $pathName)===0) {
|
||||
echo '已跳过!转移过滤器匹配到:'.$path.PHP_EOL;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//后选择器
|
||||
foreach ($path_selector as $pathName) {
|
||||
if (strpos($path, $pathName)===0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
echo '已跳过!转移选择器未匹配到:'.$path.PHP_EOL;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取站点种子的URL
|
||||
* @param string $site
|
||||
* @param string $_url
|
||||
* @return string
|
||||
*/
|
||||
private static function getTorrentUrl($site = '', $_url = '')
|
||||
{
|
||||
global $configALL;
|
||||
// 兼容旧配置
|
||||
if (isset($configALL[$site]['passkey']) && $configALL[$site]['passkey']) {
|
||||
if (!isset($configALL[$site]['url_replace'])) {
|
||||
$configALL[$site]['url_replace'] = array('{passkey}' => $configALL[$site]['passkey']);
|
||||
}
|
||||
if (!isset($configALL[$site]['url_join'])) {
|
||||
$configALL[$site]['url_join'] = array();
|
||||
if (in_array($site, array('m-team','mocat','hdbd'))) {
|
||||
if (isset($configALL[$site]['ip_type'])) {
|
||||
$configALL[$site]['url_join'][] = $configALL[$site]['ip_type'].'=1';
|
||||
}
|
||||
$configALL[$site]['url_join'][] = 'https=1';
|
||||
}
|
||||
}
|
||||
}
|
||||
// 通用操作:替换
|
||||
if (isset($configALL[$site]['url_replace']) && $configALL[$site]['url_replace']) {
|
||||
$url = strtr($_url, $configALL[$site]['url_replace']);
|
||||
}
|
||||
// 通用操作:拼接
|
||||
if (isset($configALL[$site]['url_join']) && $configALL[$site]['url_join']) {
|
||||
$url = $url.(strpos($url, '?') === false ? '?' : '&').implode('&',$configALL[$site]['url_join']);
|
||||
}
|
||||
return $url;
|
||||
}
|
||||
/**
|
||||
* 微信模板消息拼接方法
|
||||
*/
|
||||
public static function wechatMessage()
|
||||
private static function wechatMessage()
|
||||
{
|
||||
$br = PHP_EOL;
|
||||
$text = 'IYUU自动辅种-统计报表';
|
||||
$desp = '版本号:'. self::VER . $br;
|
||||
$desp .= '总做种:'.self::$wechatMsg['hashCount'] . ' [客户端正在做种的hash总数]' .$br;
|
||||
$desp .= '返回数据:'.self::$wechatMsg['reseedCount']. ' [服务器返回的可辅种数据]' .$br;
|
||||
$desp .= '支持站点:'.self::$wechatMsg['sitesCount']. ' [当前支持自动辅种的站点数量]' .$br;
|
||||
$desp .= '成功:'.self::$wechatMsg['reseedSuccess']. ' [辅种成功,会把hash加入缓存]' .$br;
|
||||
$desp .= '失败:'.self::$wechatMsg['reseedError']. ' [下载器下载种子失败或网络超时引起,可以重试]' .$br;
|
||||
$desp .= '重复:'.self::$wechatMsg['reseedRepeat']. ' [客户端已做种]' .$br;
|
||||
$desp .= '跳过:'.self::$wechatMsg['reseedSkip']. ' [未设置passkey]' .$br;
|
||||
$desp .= '忽略:'.self::$wechatMsg['reseedPass']. ' [成功添加存在缓存]' .$br;
|
||||
$desp = '### 版本号:'. self::VER . $br;
|
||||
$desp .= '**支持站点:'.self::$wechatMsg['sitesCount']. '** [当前支持自动辅种的站点数量]' .$br;
|
||||
$desp .= '**总做种:'.self::$wechatMsg['hashCount'] . '** [客户端做种的hash总数]' .$br;
|
||||
$desp .= '**返回数据:'.self::$wechatMsg['reseedCount']. '** [服务器返回的可辅种数据]' .$br;
|
||||
$desp .= '**成功:'.self::$wechatMsg['reseedSuccess']. '** [辅种成功,会把hash加入缓存]' .$br;
|
||||
$desp .= '**失败:'.self::$wechatMsg['reseedError']. '** [种子下载失败或网络超时引起]' .$br;
|
||||
$desp .= '**重复:'.self::$wechatMsg['reseedRepeat']. '** [客户端已做种]' .$br;
|
||||
$desp .= '**跳过:'.self::$wechatMsg['reseedSkip']. '** [未设置passkey]' .$br;
|
||||
$desp .= '**忽略:'.self::$wechatMsg['reseedPass']. '** [成功添加存在缓存]' .$br;
|
||||
$desp .= $br.'**如需重新辅种,请删除 ./torrent/cachehash 内的所有辅种缓存。**'.$br;
|
||||
$desp .= '*此消息将在3天后过期*。';
|
||||
return ff($text, $desp);
|
||||
}
|
||||
/**
|
||||
@@ -775,7 +880,7 @@ class AutoReseed
|
||||
$res = self::$curl->get(self::$apiUrl.self::$endpoints['notify'].'?'.$notify);
|
||||
$res = json_decode($res->response, true);
|
||||
if (isset($res['data']['success']) && $res['data']['success']) {
|
||||
echo '感谢您的参与,种子被删除,上报成功!!'.PHP_EOL;
|
||||
echo '感谢您的参与,失效种子上报成功!!'.PHP_EOL;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@@ -1,11 +1,5 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 文件处理
|
||||
* @version 0.6
|
||||
*/
|
||||
|
||||
namespace IYUU\Library;
|
||||
|
||||
/**
|
||||
* @class IFile
|
||||
* @brief IFile 文件处理类
|
||||
@@ -13,7 +7,6 @@ namespace IYUU\Library;
|
||||
class IFile
|
||||
{
|
||||
private $resource = null; //文件资源句柄
|
||||
|
||||
/**
|
||||
* @brief 构造函数,打开资源流,并独占锁定
|
||||
* @param String $fileName 文件路径名
|
||||
|
@@ -1,11 +1,9 @@
|
||||
<?php
|
||||
namespace IYUU\Library;
|
||||
use Curl\Curl;
|
||||
/**
|
||||
* IYUU用户注册、认证
|
||||
*/
|
||||
namespace IYUU\Library;
|
||||
|
||||
use Curl\Curl;
|
||||
|
||||
class Oauth
|
||||
{
|
||||
// 合作的站点
|
||||
@@ -86,7 +84,8 @@ class Oauth
|
||||
return $ret;
|
||||
}
|
||||
/**
|
||||
* 写鉴权成功配置
|
||||
* 写鉴权成功缓存
|
||||
* @desc 作用:减少对服务器请求,跳过鉴权提示信息;
|
||||
*/
|
||||
private static function setSiteLoginCache($key = '', $array = [])
|
||||
{
|
||||
|
@@ -1,54 +1,46 @@
|
||||
<?php
|
||||
namespace IYUU\Library;
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: 大卫
|
||||
* Date: 2020-1-19
|
||||
* Time: 17:44
|
||||
*/
|
||||
namespace IYUU\Library;
|
||||
|
||||
class Table
|
||||
{
|
||||
const ALIGN_LEFT = 1;
|
||||
const ALIGN_RIGHT = 0;
|
||||
const ALIGN_CENTER = 2;
|
||||
|
||||
/**
|
||||
* 头信息数据
|
||||
* @var array
|
||||
*/
|
||||
protected $header = [];
|
||||
|
||||
/**
|
||||
* 头部对齐方式 默认1 ALGIN_LEFT 0 ALIGN_RIGHT 2 ALIGN_CENTER
|
||||
* @var int
|
||||
*/
|
||||
protected $headerAlign = 1;
|
||||
|
||||
/**
|
||||
* 表格数据(二维数组)
|
||||
* @var array
|
||||
*/
|
||||
protected $rows = [];
|
||||
|
||||
/**
|
||||
* 单元格对齐方式 默认1 ALGIN_LEFT 0 ALIGN_RIGHT 2 ALIGN_CENTER
|
||||
* @var int
|
||||
*/
|
||||
protected $cellAlign = 1;
|
||||
|
||||
/**
|
||||
* 单元格宽度信息
|
||||
* @var array
|
||||
*/
|
||||
protected $colWidth = [];
|
||||
|
||||
/**
|
||||
* 表格输出样式
|
||||
* @var string
|
||||
*/
|
||||
protected $style = 'default';
|
||||
|
||||
/**
|
||||
* 表格样式定义
|
||||
* @var array
|
||||
|
@@ -1,8 +1,6 @@
|
||||
<?php
|
||||
|
||||
use IYUU\Library\IFile;
|
||||
use IYUU\Library\Table;
|
||||
|
||||
/**
|
||||
* 调试函数
|
||||
* @param $data
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* 技术讨论及后续更新,请加入QQ群!!!!!!!
|
||||
群名称:IYUU自动辅种交流
|
||||
QQ群号:859882209
|
||||
QQ群号:859882209、931954050
|
||||
* IYUU自动辅种工具-【安装篇】如何下载最新源码? https://www.iyuu.cn/archives/338/
|
||||
* IYUU自动辅种工具-【安装篇】Windows之git https://www.iyuu.cn/archives/367/
|
||||
* IYUU自动辅种工具-【安装篇】群晖Linux之git https://www.iyuu.cn/archives/372/
|
||||
@@ -42,6 +42,7 @@ return array(
|
||||
'host' => 'http://127.0.0.1:8083',
|
||||
'username' => '',
|
||||
'password' => '',
|
||||
'root_folder'=> 1, // 0不创建根目录,1创建根目录
|
||||
'BT_backup' => 'C:\Users\ASUS\AppData\Local\qBittorrent\BT_backup', // 移动做种:必须配置,Linux搜索方法:find / -name BT_backup
|
||||
'move' => 0, // 0不移动,1移动并辅种,2移动且只在当前客户端辅种
|
||||
),
|
||||
@@ -55,6 +56,8 @@ return array(
|
||||
// 当前路径 => 目标路径
|
||||
'/downloads' => '/volume1',
|
||||
),
|
||||
'path_filter'=> array(), //转移过滤器:不转移此路径内文件
|
||||
'path_selector' => array(), //转移选择器:只转移此路径内文件(为空时,全转移) 【优先级:过滤器 > 选择器】
|
||||
'paused' => 0, //转移成功,自动开始任务:0开始,1暂停
|
||||
'skip_check' => 0, //转移成功,跳校验:0不跳、1跳校验
|
||||
'delete_torrent' => 0, //转移成功,删除当前做种:0不删除、1删除
|
||||
@@ -108,6 +111,11 @@ return array(
|
||||
'max' => '280GB',
|
||||
),
|
||||
),
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(
|
||||
//'ipv6=1', // 种子Tracker的IP地址选择 可选:ipv4,ipv6
|
||||
//'https=1',
|
||||
),
|
||||
),
|
||||
// hddolby
|
||||
'hddolby' => array(
|
||||
@@ -116,6 +124,8 @@ return array(
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'id' => 0, // 用户ID(不是用户名)
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// hdhome
|
||||
'hdhome' => array(
|
||||
@@ -124,6 +134,8 @@ return array(
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'id' => 0, // 用户ID(不是用户名)
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// PTHome
|
||||
'pthome' => array(
|
||||
@@ -132,6 +144,8 @@ return array(
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'id' => 0, // 用户ID(不是用户名)
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// MoeCat
|
||||
'moecat' => array(
|
||||
@@ -140,8 +154,11 @@ return array(
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'id' => 0, // 用户ID(不是用户名)
|
||||
// 种子Tracker的IP地址选择 可选:ipv4,ipv6
|
||||
'ip_type' => 'ipv4',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(
|
||||
//'ipv6=1', // 种子Tracker的IP地址选择 可选:ipv4,ipv6
|
||||
//'https=1',
|
||||
),
|
||||
),
|
||||
// m-team
|
||||
'm-team' => array(
|
||||
@@ -149,8 +166,11 @@ return array(
|
||||
'cookie' => 'tp=',
|
||||
// 15.m-team的passkey 【必须配置】
|
||||
'passkey' => '',
|
||||
// 种子Tracker的IP地址选择 可选:ipv4,ipv6
|
||||
'ip_type' => 'ipv4',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(
|
||||
//'ipv6=1', // 种子Tracker的IP地址选择 可选:ipv4,ipv6
|
||||
'https=1',
|
||||
),
|
||||
'clients' => array(
|
||||
array(
|
||||
'type' => 'transmission', // 支持:transmission、qBittorrent
|
||||
@@ -175,6 +195,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
'workingMode' => 1,
|
||||
'watch' => '',
|
||||
'filter' => array(
|
||||
@@ -190,6 +212,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// tjupt
|
||||
'tjupt' => array(
|
||||
@@ -197,6 +221,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// btschool
|
||||
'btschool' => array(
|
||||
@@ -204,6 +230,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// HDSky
|
||||
'hdsky' => array(
|
||||
@@ -211,6 +239,12 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'limitRule' => array(
|
||||
'count' => 50, // 每次辅种50个
|
||||
'sleep' => 15, // 最少休眠15秒
|
||||
),
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// TorrentCCF
|
||||
'torrentccf' => array(
|
||||
@@ -218,6 +252,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// PTMSG
|
||||
'ptmsg' => array(
|
||||
@@ -225,6 +261,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// totheglory
|
||||
'ttg' => array(
|
||||
@@ -233,6 +271,8 @@ return array(
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
// 如果需要rss订阅,必须配置
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
'rss' => '',
|
||||
),
|
||||
// nanyangpt
|
||||
@@ -241,6 +281,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// springsunday.net
|
||||
'ssd' => array(
|
||||
@@ -248,6 +290,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// yingk
|
||||
'yingk' => array(
|
||||
@@ -255,6 +299,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// hdcity
|
||||
'hdcity' => array(
|
||||
@@ -262,6 +308,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置cuhash
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// 52pt.site
|
||||
'52pt' => array(
|
||||
@@ -269,6 +317,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// brobits
|
||||
'brobits' => array(
|
||||
@@ -276,6 +326,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// beitai
|
||||
'beitai' => array(
|
||||
@@ -283,6 +335,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// eastgame
|
||||
'eastgame' => array(
|
||||
@@ -290,6 +344,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// soulvoice
|
||||
'soulvoice' => array(
|
||||
@@ -297,6 +353,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// chdbits
|
||||
'chdbits' => array(
|
||||
@@ -304,6 +362,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// leaguehd
|
||||
'leaguehd' => array(
|
||||
@@ -311,6 +371,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// ptsbao
|
||||
'ptsbao' => array(
|
||||
@@ -318,6 +380,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// hdchina
|
||||
'hdchina' => array(
|
||||
@@ -325,6 +389,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// hdarea
|
||||
'hdarea' => array(
|
||||
@@ -332,6 +398,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// hdtime
|
||||
'hdtime' => array(
|
||||
@@ -339,6 +407,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// 1ptba
|
||||
'1ptba' => array(
|
||||
@@ -346,6 +416,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// hd4fans
|
||||
'hd4fans' => array(
|
||||
@@ -353,6 +425,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// hddisk.life
|
||||
'hdbug' => array(
|
||||
@@ -360,6 +434,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// opencd皇后
|
||||
'opencd' => array(
|
||||
@@ -367,6 +443,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// hdstreet
|
||||
'hdstreet' => array(
|
||||
@@ -374,6 +452,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// joyhd
|
||||
'joyhd' => array(
|
||||
@@ -381,6 +461,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// dmhy幼儿园
|
||||
'dmhy' => array(
|
||||
@@ -388,6 +470,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// hdu
|
||||
'upxin' => array(
|
||||
@@ -395,6 +479,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// oshen
|
||||
'oshen' => array(
|
||||
@@ -402,6 +488,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// discfan港知堂
|
||||
'discfan' => array(
|
||||
@@ -409,6 +497,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// hdzone
|
||||
'hdzone' => array(
|
||||
@@ -416,6 +506,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// nicept老师
|
||||
'nicept' => array(
|
||||
@@ -423,6 +515,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// hdbd伊甸园
|
||||
'hdbd' => array(
|
||||
@@ -430,6 +524,11 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(
|
||||
//'ipv6=1', // 种子Tracker的IP地址选择 可选:ipv4,ipv6
|
||||
//'https=1',
|
||||
),
|
||||
),
|
||||
// byr北邮
|
||||
'byr' => array(
|
||||
@@ -437,6 +536,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// CCFBits
|
||||
'ccfbits' => array(
|
||||
@@ -444,6 +545,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// hdbits
|
||||
'hdbits' => array(
|
||||
@@ -451,6 +554,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// PTPBD
|
||||
'ptpbd' => array(
|
||||
@@ -458,6 +563,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// HD-T
|
||||
'hd-torrents' => array(
|
||||
@@ -465,6 +572,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// skyeysnow天雪
|
||||
'skyeysnow' => array(
|
||||
@@ -472,6 +581,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// pt.sjtu葡萄
|
||||
'pt' => array(
|
||||
@@ -479,6 +590,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// hdroute
|
||||
'hdroute' => array(
|
||||
@@ -486,7 +599,26 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// haidan
|
||||
'haidan' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
// hdfans
|
||||
'hdfans' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'url_replace' => array(),
|
||||
'url_join' => array(),
|
||||
),
|
||||
|
||||
// 配置结束,后面的一行不能删除,必须保留!!!
|
||||
);
|
||||
|
@@ -1,6 +1,9 @@
|
||||
#!/bin/sh
|
||||
#wget -c https://gitee.com/ledc/IYUUAutoReseed/repository/archive/master.zip -O IYUUAutoReseed.zip
|
||||
#unzip -o ./IYUUAutoReseed.zip -d /root
|
||||
#rm ./IYUUAutoReseed.zip
|
||||
cd /root
|
||||
wget -c https://gitee.com/ledc/IYUUAutoReseed/repository/archive/master.zip -O IYUUAutoReseed.zip
|
||||
unzip -o ./IYUUAutoReseed.zip -d /root
|
||||
rm ./IYUUAutoReseed.zip
|
||||
cd /root/IYUUAutoReseed/docker
|
||||
chmod +x ./*.sh
|
||||
docker build -t iyuu:latest .
|
||||
docker run -it -v /root/IYUUAutoReseed:/var/www -p 8510:9000 --network bridge --name IYUUAutoReseed --restart always -d iyuu:latest
|
||||
|
3
iyuu.php
3
iyuu.php
@@ -25,10 +25,7 @@
|
||||
|
||||
require_once __DIR__ . '/init.php';
|
||||
echo '当前脚本路径:'.__FILE__.PHP_EOL;
|
||||
sleep(1);
|
||||
use IYUU\AutoReseed;
|
||||
|
||||
echo microtime(true).' IYUU自动辅种正在初始化...'.PHP_EOL;
|
||||
AutoReseed::init();
|
||||
AutoReseed::call();
|
||||
exit(0);
|
||||
|
10
readme.md
10
readme.md
@@ -49,7 +49,7 @@ IYUU自动辅种工具(英文名:IYUUAutoReseed),是一款PHP语言编
|
||||
2. qBittorrent
|
||||
|
||||
## 支持自动辅种的站点
|
||||
学校、杜比、家园、天空、朋友、馒头、萌猫、我堡、猫站、铂金家、烧包、北洋、TCCF、南洋、TTG、映客、城市、52pt、brobits、备胎、SSD、CHD、ptmsg、leaguehd、聆音、瓷器、hdarea、eastgame(TLF)、1ptba、hdtime、hd4fans、opencd、hdbug、hdstreet、joyhd、u2、upxin(HDU)、oshen、discfan(GZT)、cnscg圣城(已删除)、北邮、CCFBits、dicmusic、天雪、葡萄、HDRoute、伊甸园hdbd。
|
||||
学校、杜比、家园、天空、朋友、馒头、萌猫、我堡、猫站、铂金家、烧包、北洋、TCCF、南洋、TTG、映客、城市、52pt、brobits、备胎、SSD、CHD、ptmsg、leaguehd、聆音、瓷器、hdarea、eastgame(TLF)、1ptba、hdtime、hd4fans、opencd、hdbug、hdstreet、joyhd、u2、upxin(HDU)、oshen、discfan(GZT)、cnscg圣城(已删除)、北邮、CCFBits、dicmusic、天雪、葡萄、HDRoute、伊甸园hdbd、海胆haidan、HDfans。
|
||||
|
||||
## 运行环境
|
||||
具备PHP运行环境的所有平台,例如:Linux、Windows、MacOS!
|
||||
@@ -75,8 +75,7 @@ IYUU自动辅种工具(英文名:IYUUAutoReseed),是一款PHP语言编
|
||||
|
||||
|
||||
## 需求提交/错误反馈
|
||||
- 点击链接加入QQ群聊【IYUU自动辅种交流】:[https://jq.qq.com/?_wv=1027&k=5JOfOlM][1]
|
||||
- QQ群:859882209[入门群],931954050[进阶群]
|
||||
- QQ群:859882209[2000人.入门群],931954050[1000人.进阶群]
|
||||
- 问答社区:http://wenda.iyuu.cn
|
||||
- 博客:https://www.iyuu.cn/
|
||||
- issues: https://gitee.com/ledc/IYUUAutoReseed/issues
|
||||
@@ -174,8 +173,3 @@ IYUU自动辅种工具(英文名:IYUUAutoReseed),是一款PHP语言编
|
||||
2. 所捐赠的资源不属于任何个人,而应作为项目或者开发团队的所需开销;
|
||||
3. 如果捐赠了却不希望您的名字出现在这里,可以联系我们进行相应处理;
|
||||
4. 更新有延时,如未能及时更新,可联系我。
|
||||
|
||||
|
||||
|
||||
[1]: https://jq.qq.com/?_wv=1027&k=5JOfOlM
|
||||
[2]: https://www.iyuu.cn/usr/uploads/2019/12/801558607.png
|
14
wiki/公告栏.md
14
wiki/公告栏.md
@@ -1,5 +1,19 @@
|
||||
# 公告栏
|
||||
|
||||
### 2020年7月12日19:34:03
|
||||
|
||||
【新增功能】v1.9.0
|
||||
转移过滤器、选择器;可以只转移指定路径的种子,也可以排除指定路径的种子,按需转移。
|
||||
【升级方法】
|
||||
1.主脚本可以通过git pull,或覆盖更新;
|
||||
2.然后对照最新config.sample.php,把59行,60行,手动加入到你的config.php对应位置。
|
||||
|
||||
【重要提醒】域名部署SSL证书,接口域名支持双协议访问http/https,如下:
|
||||
|
||||
https://api.iyuu.cn
|
||||
|
||||
http://api.iyuu.cn
|
||||
|
||||
### 2020年4月10日17:43:50
|
||||
|
||||
针对多合作站点绑定的优化!
|
||||
|
@@ -13,7 +13,7 @@
|
||||
| Google身份验证器(谷歌动态口令) | 开发中 | 2020年2月21日 | |
|
||||
| 自动更新 | 开发中 | 2020年2月21日 | |
|
||||
| WEB页面生成配置 | 开发中 | 2020年2月21日 | |
|
||||
| 种子删除自动同步 | 开发中 | 2020年2月21日 | |
|
||||
| 种子删除自动同步 | 开发中 | 2020年2月21日 | 2020年5月6日 |
|
||||
| 脚本docker容器化(测试版) | 已完成 | 2020年2月21日 | 2020年2月21日 |
|
||||
| 自动配置(简化配置) | 开发中 | 2020年4月10日 | |
|
||||
| 浏览器插件 | 暂未开始 | | |
|
||||
|
46
wiki/数据清理.md
46
wiki/数据清理.md
@@ -1,46 +0,0 @@
|
||||
## 404数据最后清理时间
|
||||
|标志 | 最后清理时间 | 状态 |
|
||||
| :-: | :-: | ---- |
|
||||
| 1ptba | 2020年1月19日12:00:00 | 已完成 |
|
||||
|52pt | 2020年1月19日12:00:00 | 已完成 |
|
||||
|beitai-备胎 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|brobits | 2020年1月19日12:00:00 | 已完成 |
|
||||
|btschool-学校 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|chdbits-彩虹岛 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|discfan-港知堂 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|dmhy-幼儿园 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|eastgame | 2020年1月19日12:00:00 | 已完成 |
|
||||
|hd4fans-兽 | | 已完成 |
|
||||
|hdarea-HDA | | |
|
||||
|hdbd-伊甸园 | | |
|
||||
|hdbug(hddisk) | 2020年1月19日12:00:00 | 已完成 |
|
||||
|hdchina-瓷器 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|hdcity-城市 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|hddolby-杜比 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|hdhome-家园 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|hdsky-天空 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|hdstreet | 2020年1月19日12:00:00 | 已完成 |
|
||||
|hdtime-时间 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|hdzone-HDZ | 2020年1月19日12:00:00 | 已完成 |
|
||||
|joyhd | 2020年1月19日12:00:00 | 已完成 |
|
||||
| keepfrds-朋友 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|leaguehd | 2020年1月19日12:00:00 | 已完成 |
|
||||
| m-team-馒头 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|moecat-萌猫 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|nanyangpt-南洋 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|nicept-老师 | | |
|
||||
|opencd-皇后 | | 已完成 |
|
||||
|oshen | 2020年1月19日12:00:00 | 已完成 |
|
||||
|ourbits-我堡 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|pterclub-猫站 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|pthome-铂金家 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|ptmsg | 2020年1月19日12:00:00 | 已完成 |
|
||||
|ptsbao-烧包 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|soulvoice-聆音 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|ssd-春天 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|tjupt-北洋 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|torrentccf-TCCF | 2020年1月19日12:00:00 | 已完成 |
|
||||
| ttg-听听歌 | 2020年1月19日12:00:00 | 已完成 |
|
||||
| upxin | 2020年1月19日12:00:00 | 已完成 |
|
||||
| yingk-映客 | 2020年1月19日12:00:00 | 已完成 |
|
||||
|
24
wiki/更新历史.md
24
wiki/更新历史.md
@@ -4,6 +4,30 @@
|
||||
|
||||
------
|
||||
|
||||
### 2020年7月3日
|
||||
|
||||
1. 优化windows的辅种批处理,采用环境变量调用
|
||||
2. 新增站点HDRoute、hdbd、haidan、HDfans
|
||||
3. 优化curl的连接参数
|
||||
4. 新增小钢炮专用的docker脚本
|
||||
5. 新增合作站点MoeCat
|
||||
6. 微信报表增加版本号提示
|
||||
7. qBittorrent下载器增加root_folder配置项:是否创建子文件夹
|
||||
|
||||
### 2020年3月22日
|
||||
|
||||
1. 转移种子,设置自动开始开关
|
||||
2. 添加git自动更新.cmd
|
||||
3. 优化做种客户端转移配置的提示
|
||||
4. 人性化加入vendor目录
|
||||
5. 修复因不支持站点缓存引起的错误提示
|
||||
6. 新增合作站点hddolby、hdhome、pthome
|
||||
7. 修复瓷器辅种乱码不美观的问题
|
||||
8. 简化docker编译文件
|
||||
9. 优化合作站点登录缓存,检索请求
|
||||
10. 优化输出提示,未填写passkey的站点只提示一次,后续自动跳过
|
||||
11. 增加通用备份脚本
|
||||
|
||||
### 2020年2月26日
|
||||
|
||||
1. 新增:葡萄pt
|
||||
|
Reference in New Issue
Block a user