Compare commits

..

11 Commits

Author SHA1 Message Date
iyuu.cn
61eb8f69c9 简化辅种输出。 2020-03-22 11:29:47 +08:00
iyuu.cn
b4ca455a75 优化输出提示,未填写passkey的站点自动跳过,不提示。 2020-03-22 11:24:52 +08:00
iyuu.cn
02205e6ce3 修复transmission往qBittorrent转移种子,错误的问题。 2020-03-21 19:33:50 +08:00
iyuu.cn
818794a19b 错误提示后面增加换行符。 2020-03-19 19:58:10 +08:00
iyuu.cn
88bc79ff58 版本升级至v1.6.7 2020-03-16 15:00:00 +08:00
iyuu.cn
f9164b6e53 修改php文件夹名称,让脚本更通用 2020-03-16 14:50:33 +08:00
iyuu.cn
687a83f80d 添加公告 2020-03-15 23:20:07 +08:00
iyuu.cn
253cff0e23 增加Windows从gitee安装脚本批处理。 2020-03-15 13:12:50 +08:00
iyuu.cn
ed1d4fbe11 新增合作站点pthome,可以对使用接口的用户进行认证绑定。 2020-03-15 12:42:27 +08:00
iyuu.cn
99c2655fd4 调整配置顺序 2020-03-15 00:54:58 +08:00
iyuu.cn
7adbadd700 修复一处错误。 2020-03-14 22:55:31 +08:00
13 changed files with 107 additions and 80 deletions

View File

@@ -0,0 +1,5 @@
@echo off
chcp 65001
git clone https://gitee.com/ledc/IYUUAutoReseed.git
cd IYUUAutoReseed
php ./iyuu.php

4
9.执行辅种.cmd Normal file
View File

@@ -0,0 +1,4 @@
@echo off
chcp 65001
%cd%\php\php %cd%\iyuu.php
pause

View File

@@ -3,5 +3,5 @@ chcp 65001
git fetch --all
git reset --hard origin/master
git pull
%cd%\php-7.4.2-nts-Win32-vc15-x86\php %cd%\iyuu.php
%cd%\php\php.exe %cd%\iyuu.php
pause

4
9.计划任务.cmd Normal file
View File

@@ -0,0 +1,4 @@
@echo off
chcp 65001
D:\IYUUAutoReseed\php\php.exe D:\IYUUAutoReseed\iyuu.php
exit

View File

@@ -13,19 +13,19 @@ use IYUU\Library\Table;
class AutoReseed
{
// 版本号
const VER = '1.6.3';
const VER = '1.6.9';
// RPC连接
private static $links = array();
private static $links = [];
// 客户端配置
private static $clients = array();
private static $clients = [];
// 站点列表
private static $sites = array();
// 不辅种的站点 'ourbits','hdchina'
private static $noReseed = array();
private static $sites = [];
// 不辅种的站点 'pt','hdchina'
private static $noReseed = [];
// 不转移的站点 'hdarea','hdbd'
private static $noMove = array('');
private static $noMove = [];
// cookie检查
private static $cookieCheck = array('hdchina','hdcity');
private static $cookieCheck = ['hdchina','hdcity'];
// 缓存路径
public static $cacheDir = TORRENT_PATH.'cache'.DS;
public static $cacheHash = TORRENT_PATH.'cachehash'.DS;
@@ -69,6 +69,7 @@ class AutoReseed
public static function init()
{
global $configALL;
echo "版本号:".self::VER.PHP_EOL;
self::backup('config', $configALL);
self::$curl = new Curl();
self::$curl->setOpt(CURLOPT_SSL_VERIFYPEER, false);
@@ -77,7 +78,7 @@ class AutoReseed
// 合作站点自动注册鉴权
$is_login = Oauth::login(self::$apiUrl . self::$endpoints['login']);
if(!$is_login){
die('合作站点鉴权配置请查阅https://www.iyuu.cn/archives/337/');
echo '合作站点鉴权配置请查阅https://www.iyuu.cn/archives/337/' .PHP_EOL;
}
// 显示支持站点列表
@@ -99,9 +100,10 @@ class AutoReseed
*/
private static function ShowTableSites()
{
$list[] = 'gitee 源码仓库https://gitee.com/ledc/IYUUAutoReseed';
$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) {
echo $value.PHP_EOL;
@@ -122,10 +124,10 @@ class AutoReseed
@fclose($file_pointer);
} else {
if (isset($rs['msg']) && $rs['msg']) {
die($rs['msg']);
die($rs['msg'].PHP_EOL);
}
if (isset($rs['errmsg']) && $rs['errmsg']) {
die($rs['errmsg']);
die($rs['errmsg'].PHP_EOL);
}
die('远端服务器无响应,请稍后再试!!!');
}
@@ -167,7 +169,7 @@ class AutoReseed
self::$links[$k]['BT_backup'] = isset($v['BT_backup']) && $v['BT_backup'] ? $v['BT_backup'] : '';
$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 = array($k,$v['move']);
}
@@ -319,6 +321,7 @@ class AutoReseed
// 判断返回值
if (empty($res['msg'])) {
echo "clients_".$k." 辅种数据下载成功!!!".PHP_EOL.PHP_EOL;
echo '【提醒】未配置passkey的站点都会跳过'.PHP_EOL.PHP_EOL;
} else {
$errmsg = isset($res['msg']) && $res['msg'] ? $res['msg'] : '远端服务器无响应,请稍后重试!';
echo '-----辅种失败,原因:' .$errmsg.PHP_EOL.PHP_EOL;
@@ -349,15 +352,17 @@ class AutoReseed
// 页面规则
$download_page = str_replace('{}', $torrent_id, $sites[$sid]['download_page']);
$_url = 'https://' .$sites[$sid]['base_url']. '/' .$download_page;
echo "clients_".$k."正在辅种... {$siteName}".PHP_EOL;
/**
* 前置检测
*/
// passkey检测
if (empty($configALL[$siteName]['passkey'])) {
echo '-------因当前' .$siteName. "站点未设置passkey已跳过".PHP_EOL.PHP_EOL;
//echo '-------因当前' .$siteName. "站点未设置passkey已跳过".PHP_EOL.PHP_EOL;
self::$wechatMsg['reseedSkip']++;
continue;
}else{
echo "clients_".$k."正在辅种... {$siteName}".PHP_EOL;
}
// cookie检测
if (in_array($siteName, self::$cookieCheck) && empty($configALL[$siteName]['cookie'])) {
@@ -553,7 +558,8 @@ class AutoReseed
continue;
}
echo "正在从下载器 clients_".$k." 获取种子哈希……".PHP_EOL;
$hashArray = self::$links[$k]['rpc']->getList(self::$move);
$move = []; // 客户端做种列表 传址
$hashArray = self::$links[$k]['rpc']->getList($move);
if (empty($hashArray)) {
// 失败
continue;
@@ -614,7 +620,7 @@ class AutoReseed
$torrent = file_get_contents($torrentPath);
// 正式开始转移
echo "种子已推送给下载器,正在转移做种...".PHP_EOL;
$ret = false;
// 目标下载器类型
$rpcKey = self::$move[0];
$type = self::$links[$rpcKey]['type'];
@@ -626,6 +632,7 @@ class AutoReseed
}
} else {
}
// 添加转移任务成功返回true
$ret = self::add(self::$move[0], $torrent, $downloadDir, $extra_options);
/**
@@ -788,5 +795,6 @@ class AutoReseed
$file_pointer = @fopen($myfile, "w");
$worldsnum = @fwrite($file_pointer, $json);
@fclose($file_pointer);
return $worldsnum;
}
}

View File

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

View File

@@ -89,7 +89,47 @@ return array(
* 以下为各站点的独立配置(互不影响、互不冲突)
* 自动辅种需要配置各站的passkey没有配置passkey的站点会自动跳过
*/
// m-team 序号1
// ourbits
'ourbits' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'id' => 0, // 用户ID(不是用户名)
'workingMode' => 0,
'watch' => '/root/downloads',
'filter' => array(
'size'=>array(
'min' => '1GB',
'max' => '280GB',
),
),
),
// hddolby
'hddolby' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'id' => 0, // 用户ID(不是用户名)
),
// hdhome
'hdhome' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'id' => 0, // 用户ID(不是用户名)
),
// PTHome
'pthome' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'id' => 0, // 用户ID(不是用户名)
),
// m-team
'm-team' => array(
// 14.m-team的cookie 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => 'tp=',
@@ -115,7 +155,7 @@ return array(
),
),
),
// keepfrds 序号2
// keepfrds
'keepfrds' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
@@ -130,88 +170,49 @@ return array(
),
),
),
// ourbits 序号3
'ourbits' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'id' => 0, // 用户ID(不是用户名)
'workingMode' => 0,
'watch' => '/root/downloads',
'filter' => array(
'size'=>array(
'min' => '1GB',
'max' => '280GB',
),
),
),
// hddolby 序号4
'hddolby' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'id' => 0, // 用户ID(不是用户名)
),
// hdhome 序号5
'hdhome' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'id' => 0, // 用户ID(不是用户名)
),
// pter 序号6
// pter
'pter' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
),
// tjupt 序号7
// tjupt
'tjupt' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
),
// btschool 序号8
// btschool
'btschool' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
),
// PTHome 序号9
'pthome' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
),
// HDSky 序号10
// HDSky
'hdsky' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
),
// TorrentCCF 序号11
// TorrentCCF
'torrentccf' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
),
// PTMSG 序号12
// PTMSG
'ptmsg' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
),
// MoeCat 序号13
// MoeCat
'moecat' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
@@ -220,7 +221,7 @@ return array(
// 种子Tracker的IP地址选择 可选ipv4ipv6
'ip_type' => 'ipv4',
),
// totheglory 序号14
// totheglory
'ttg' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
@@ -229,14 +230,14 @@ return array(
// 如果需要rss订阅必须配置
'rss' => '',
),
// nanyangpt 序号15
// nanyangpt
'nanyangpt' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
),
// springsunday.net 序号16
// springsunday.net
'ssd' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',

View File

@@ -1,5 +1,4 @@
#!/bin/sh
cd /root/IYUUAutoReseed
git fetch --all
git reset --hard origin/master
git pull

View File

@@ -1,5 +1,11 @@
# 公告栏
### 2020年3月14日22:03:02
时光如梭转眼至v1.6.3感谢一路走来陪伴的朋友们为了共同的爱好我们相聚在这里本版本上线了合作站点认证系统合作站点有Ourbits、 HD Dolby、HDHome。
【更新提醒】手动更新的可以直接覆盖升级git安装脚本的会自动升级脚本然后对比config.sample.php手动添加用户id配置项启动辅种时会自动进行验证。
如果有问题,可以群内@我或到问答社区http://wenda.iyuu.cn/提问,必回。
### 2020年3月13日14:52:32
【重要提醒】IYUUAutoReseed自动辅种工具合作站点有OurBits、HD Dolby、HDHome可以对使用辅种工具的用户进行认证与绑定。

View File

@@ -1,4 +1,12 @@
## 重点讲解Ourbits站点的鉴权配置
## 支持用户验证的合作站点:`ourbits`,`hddolby`,`hdhome`,`pthome`
截止2020年3月15日13:25:30【文档更新有延迟最终以gitee、github为准】
----------
## 以讲解Ourbits站点的鉴权配置为例
博客链接https://www.iyuu.cn/archives/337/
IYUU自动辅种工具、Ourbits双方达成合作可以对使用接口的用户实现认证。
### 申请爱语飞飞微信通知token新用户访问http://iyuu.cn 申请!

View File

@@ -1,4 +0,0 @@
@echo off
chcp 65001
%cd%\php-7.4.2-nts-Win32-vc15-x86\php %cd%\iyuu.php
pause

View File

@@ -1,4 +0,0 @@
@echo off
chcp 65001
D:\IYUUAutoReseed\php-7.4.2-nts-Win32-vc15-x86\php.exe D:\IYUUAutoReseed\iyuu.php
exit