mirror of
https://gitee.com/ledc/IYUUAutoReseed
synced 2025-08-24 15:04:50 +00:00
Compare commits
111 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
fa60001758 | ||
|
80ca5e9690 | ||
|
550e53d5e0 | ||
|
ccd0acd7f6 | ||
|
b788ef1245 | ||
|
17e9a494ee | ||
|
0ccc4f6342 | ||
|
93208b3dc3 | ||
|
082700cf5d | ||
|
d2269aa1ef | ||
|
95a81499c3 | ||
|
2f4ad383a7 | ||
|
9b62e84cda | ||
|
125394ee0b | ||
|
efa11d280d | ||
|
18f860713f | ||
|
264aef754e | ||
|
c178046435 | ||
|
397106cad9 | ||
|
cc3a4ec1b8 | ||
|
d87029c4f4 | ||
|
7f2889ba1e | ||
|
185157a00c | ||
|
9ad36efed8 | ||
|
d0fc64beb1 | ||
|
426e47337d | ||
|
37809f7bfe | ||
|
721aaf217b | ||
|
aa18b23dbb | ||
|
4d452e3909 | ||
|
741ccb4fb4 | ||
|
e336970fca | ||
|
0321deee01 | ||
|
08ef3769c2 | ||
|
1355398f76 | ||
|
53533df4b9 | ||
|
53902ee878 | ||
|
60430f6550 | ||
|
9445547378 | ||
|
8ba1ef1ff4 | ||
|
ca148bac6b | ||
|
3393eae7e7 | ||
|
06c00f88dc | ||
|
854121884b | ||
|
da88f3e7fc | ||
|
3abc02d660 | ||
|
339f1304c6 | ||
|
c4df9899c8 | ||
|
6494351ff3 | ||
|
e01dbfd601 | ||
|
940f948f43 | ||
|
958bef0dfa | ||
|
ea74b96293 | ||
|
94948610e4 | ||
|
0f1605ffca | ||
|
33ff8a991a | ||
|
877616214c | ||
|
aa4a8c76fe | ||
|
f6870a4e95 | ||
|
e073f165ac | ||
|
6144b8b301 | ||
|
658d764c26 | ||
|
2ce1920c51 | ||
|
ea158ddd55 | ||
|
76c0cefca2 | ||
|
a69a2c2955 | ||
|
7dc0c54c56 | ||
|
19197d36ce | ||
|
8561fac8c4 | ||
|
e4911871b8 | ||
|
a328f68178 | ||
|
ce65b5d1ff | ||
|
dff0c17b33 | ||
|
7dcd3e55f4 | ||
|
9027262f57 | ||
|
31d0e6ee03 | ||
|
076e688e1c | ||
|
c649c05a3a | ||
|
4896e08635 | ||
|
3b3289274b | ||
|
bf65f7039d | ||
|
0a7c2120a1 | ||
|
04a10295c2 | ||
|
3e75aec9d0 | ||
|
63ce263afb | ||
|
19df3f3cfb | ||
|
66490efad7 | ||
|
9044d3575e | ||
|
69ba1ebe56 | ||
|
978295b44d | ||
|
f3b4deae4c | ||
|
fcb2384949 | ||
|
33b55d7598 | ||
|
db8290fe89 | ||
|
81083220c5 | ||
|
39cb00d648 | ||
|
db9010cee7 | ||
|
ad6f798946 | ||
|
36d07a25db | ||
|
7c35291b15 | ||
|
7d531a26c8 | ||
|
385a122f02 | ||
|
f75feeca44 | ||
|
d8fc340691 | ||
|
2345124ce0 | ||
|
f9592c6b0d | ||
|
fd695e4209 | ||
|
8ddb143485 | ||
|
ef2668ca54 | ||
|
51f3fa39bc | ||
|
84b3f23c27 |
8
.gitignore
vendored
8
.gitignore
vendored
@@ -1,8 +0,0 @@
|
||||
/torrent
|
||||
/config/config.php
|
||||
/php-7.2.12-nts
|
||||
/*.bat
|
||||
/*.sh
|
||||
/vendor
|
||||
.idea
|
||||
.php_cs.cache
|
1123
app/AutoReseed.php
1123
app/AutoReseed.php
File diff suppressed because it is too large
Load Diff
66
app/Client/AbstractClient.php
Normal file
66
app/Client/AbstractClient.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: David <367013672@qq.com>
|
||||
* Date: 2020-2-14
|
||||
* Time: 21:31:49
|
||||
*/
|
||||
|
||||
namespace IYUU\Client;
|
||||
|
||||
abstract class AbstractClient
|
||||
{
|
||||
/**
|
||||
* 公共方法:创建客户端实例
|
||||
*/
|
||||
public static function create($config = array())
|
||||
{
|
||||
$type = $config['type'];
|
||||
$host = $config['host'];
|
||||
$username = $config['username'];
|
||||
$password = $config['password'];
|
||||
$file = __DIR__ . DIRECTORY_SEPARATOR . $type . DIRECTORY_SEPARATOR . $type .'.php';
|
||||
if (!is_file($file)) {
|
||||
die($file.' 文件不存在');
|
||||
}
|
||||
$className = "\IYUU\Client\\" . $type . "\\" . $type;
|
||||
if (class_exists($className)) {
|
||||
echo $type." 客户端正在实例化!".PHP_EOL;
|
||||
return new $className($host, $username, $password);
|
||||
} else {
|
||||
die($className.' 客户端不存在');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询Bittorrent客户端状态
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function status();
|
||||
|
||||
/**
|
||||
* 获取种子列表
|
||||
* @return array(
|
||||
'hash' => string json,
|
||||
'sha1' => string,
|
||||
'hashString '=> array
|
||||
)
|
||||
*/
|
||||
abstract public function getList(&$move = array());
|
||||
|
||||
/**
|
||||
* 添加种子连接
|
||||
*/
|
||||
abstract public function add($torrent_url, $save_path = '', $extra_options = array());
|
||||
|
||||
/**
|
||||
* 添加种子原数据
|
||||
*/
|
||||
abstract public function add_metainfo($torrent_url, $save_path = '', $extra_options = array());
|
||||
|
||||
/**
|
||||
* 删除种子
|
||||
*/
|
||||
abstract public function delete($hash, $deleteFiles = false);
|
||||
}
|
@@ -1,21 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Rhilip
|
||||
* Date: 1/17/2020
|
||||
* Time: 2020
|
||||
*/
|
||||
|
||||
namespace IYUU\Client;
|
||||
|
||||
interface AbstractClientInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* 查询Bittorrent客户端状态
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function status();
|
||||
|
||||
}
|
@@ -2,12 +2,12 @@
|
||||
namespace IYUU\Client\qBittorrent;
|
||||
|
||||
use Curl\Curl;
|
||||
use IYUU\Client\AbstractClientInterface;
|
||||
use IYUU\Client\AbstractClient;
|
||||
|
||||
/**
|
||||
* https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation
|
||||
*/
|
||||
class qBittorrent implements AbstractClientInterface
|
||||
class qBittorrent extends AbstractClient
|
||||
{
|
||||
private $debug;
|
||||
private $url;
|
||||
@@ -87,7 +87,7 @@ class qBittorrent implements AbstractClientInterface
|
||||
$this->curl->setOpt(CURLOPT_TIMEOUT, 600); // 超时
|
||||
// Authenticate and get cookie, else throw exception
|
||||
if (!$this->authenticate()) {
|
||||
throw new \Exception("Unable to authenticate with Web Api.");
|
||||
throw new \Exception("qBittorrent Unable to authenticate with Web Api.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,18 +157,12 @@ class qBittorrent implements AbstractClientInterface
|
||||
#$extra_options['skip_checking'] = 'true'; //跳校验
|
||||
// 关键 上传文件流 multipart/form-data【严格按照api文档编写】
|
||||
$post_data = $this->buildData($extra_options);
|
||||
#p($post_data);
|
||||
// 设置请求头
|
||||
$this->curl->setHeader('Content-Type', 'multipart/form-data; boundary='.$this->delimiter);
|
||||
$this->curl->setHeader('Content-Length', strlen($post_data));
|
||||
return $this->postData('torrent_add', $post_data);
|
||||
}
|
||||
|
||||
public function torrentDelete($hash='', $deleteFiles = false)
|
||||
{
|
||||
return $this->postData('torrent_delete', ['hashes' => $hash, 'deleteFiles' => $deleteFiles ? 'true':'false']);
|
||||
}
|
||||
|
||||
public function torrentDeleteAll($deleteFiles = false)
|
||||
{
|
||||
$torrents = json_decode($this->torrentList());
|
||||
@@ -295,16 +289,62 @@ class qBittorrent implements AbstractClientInterface
|
||||
$data .= 'Content-Disposition: form-data; name="' . $name . '"' . $eol . $eol;
|
||||
$data .= $content . $eol;
|
||||
}
|
||||
}
|
||||
}
|
||||
$data .= "--" . $this->delimiter . "--" . $eol;
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* 抽象方法,子类实现
|
||||
*/
|
||||
public function status()
|
||||
{
|
||||
return $this->appVersion();
|
||||
}
|
||||
|
||||
/**
|
||||
* 抽象方法,子类实现
|
||||
*/
|
||||
public function getList(&$move = array())
|
||||
{
|
||||
$result = $this->getData('torrent_list');
|
||||
$res = json_decode($result, true);
|
||||
if (empty($res)) {
|
||||
echo "获取种子列表失败,可能qBittorrent暂时无响应,请稍后重试!".PHP_EOL;
|
||||
return array();
|
||||
}
|
||||
// 过滤,只保留正常做种
|
||||
$res = array_filter($res, function ($v) {
|
||||
if (isset($v['state']) && in_array($v['state'], array('uploading','stalledUP','pausedUP','queuedUP','checkingUP','forcedUP'))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}, ARRAY_FILTER_USE_BOTH);
|
||||
|
||||
if (empty($res)) {
|
||||
echo "未获取到正常做种数据,请多保种,然后重试!".PHP_EOL;
|
||||
return array();
|
||||
}
|
||||
// 提取数组:hashString
|
||||
$info_hash = array_column($res, 'hash');
|
||||
// 升序排序
|
||||
sort($info_hash);
|
||||
$json = json_encode($info_hash, JSON_UNESCAPED_UNICODE);
|
||||
// 去重 应该从文件读入,防止重复提交
|
||||
$sha1 = sha1($json);
|
||||
// 组装返回数据
|
||||
$hashArray['hash'] = $json;
|
||||
$hashArray['sha1'] = $sha1;
|
||||
// 变换数组:hashString为键
|
||||
$hashArray['hashString'] = array_column($res, "save_path", 'hash');
|
||||
return $hashArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* 抽象方法,子类实现
|
||||
*/
|
||||
public function delete($hash='', $deleteFiles = false)
|
||||
{
|
||||
return $this->postData('torrent_delete', ['hashes' => $hash, 'deleteFiles' => $deleteFiles ? 'true':'false']);
|
||||
}
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* Time: 2020
|
||||
*/
|
||||
|
||||
namespace IYUU\Client\Transmission;
|
||||
namespace IYUU\Client\transmission;
|
||||
|
||||
/**
|
||||
* This is the type of exception the TransmissionRPC class will throw
|
@@ -26,9 +26,9 @@
|
||||
* PHP Class support (PHP 5) (PHP 4 might work, untested)
|
||||
*/
|
||||
|
||||
namespace IYUU\Client\Transmission;
|
||||
namespace IYUU\Client\transmission;
|
||||
|
||||
use IYUU\Client\AbstractClientInterface;
|
||||
use IYUU\Client\AbstractClient;
|
||||
|
||||
/**
|
||||
* A friendly little version check...
|
||||
@@ -47,19 +47,13 @@ if (version_compare(PHP_VERSION, '5.2.10', '<')) {
|
||||
* </code>
|
||||
*
|
||||
*/
|
||||
class TransmissionRPC implements AbstractClientInterface
|
||||
class transmission extends AbstractClient
|
||||
{
|
||||
/**
|
||||
* User agent used in all http communication
|
||||
*/
|
||||
const HTTP_UA = 'TransmissionRPC for PHP/0.3';
|
||||
|
||||
/**
|
||||
* Minimum PHP version required
|
||||
* 5.2.10 implemented the required http stream ignore_errors option
|
||||
*/
|
||||
const MIN_PHPVER = '5.2.10';
|
||||
|
||||
/**
|
||||
* The URL to the bittorent client you want to communicate with
|
||||
* the port (default: 9091) can be set in you Transmission preferences
|
||||
@@ -79,12 +73,6 @@ class TransmissionRPC implements AbstractClientInterface
|
||||
*/
|
||||
public $password = '';
|
||||
|
||||
/**
|
||||
* Return results as an array, or an object (default)
|
||||
* @var bool
|
||||
*/
|
||||
public $return_as_array = false;
|
||||
|
||||
/**
|
||||
* Print debugging information, default is off
|
||||
* @var bool
|
||||
@@ -107,11 +95,16 @@ class TransmissionRPC implements AbstractClientInterface
|
||||
* Default values for stream context
|
||||
* @var array
|
||||
*/
|
||||
private $default_context_opts = array('http' => array(
|
||||
'user_agent' => self::HTTP_UA,
|
||||
'timeout' => '60', // Don't want to be too slow
|
||||
'ignore_errors' => true, // Leave the error parsing/handling to the code
|
||||
)
|
||||
private $default_context_opts = array(
|
||||
'http' => array(
|
||||
'user_agent' => self::HTTP_UA,
|
||||
'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,
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -134,29 +127,15 @@ class TransmissionRPC implements AbstractClientInterface
|
||||
/**
|
||||
* Takes the connection parameters
|
||||
*
|
||||
* TODO: Sanitize username, password, and URL
|
||||
*
|
||||
* @param string $url
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
*/
|
||||
public function __construct($url = 'http://localhost:9091/transmission/rpc', $username = null, $password = null, $return_as_array = false)
|
||||
public function __construct($url = 'http://127.0.0.1:9091/transmission/rpc', $username = null, $password = null)
|
||||
{
|
||||
// server URL
|
||||
$this->url = $url;
|
||||
|
||||
// Username & password
|
||||
$this->url = rtrim($url, '/');
|
||||
$this->username = $username;
|
||||
$this->password = $password;
|
||||
|
||||
// Get the Transmission RPC_version
|
||||
$this->rpc_version = self::sget()->arguments->rpc_version;
|
||||
|
||||
// Return As Array
|
||||
$this->return_as_array = $return_as_array;
|
||||
|
||||
// Reset X-Transmission-Session-Id so we (re)fetch one
|
||||
$this->session_id = null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -170,7 +149,7 @@ class TransmissionRPC implements AbstractClientInterface
|
||||
{
|
||||
if (!is_array($ids)) {
|
||||
$ids = array($ids);
|
||||
} // Convert $ids to an array if only a single id was passed
|
||||
}
|
||||
$request = array("ids" => $ids);
|
||||
return $this->request("torrent-start", $request);
|
||||
}
|
||||
@@ -186,7 +165,7 @@ class TransmissionRPC implements AbstractClientInterface
|
||||
{
|
||||
if (!is_array($ids)) {
|
||||
$ids = array($ids);
|
||||
} // Convert $ids to an array if only a single id was passed
|
||||
}
|
||||
$request = array("ids" => $ids);
|
||||
return $this->request("torrent-stop", $request);
|
||||
}
|
||||
@@ -202,7 +181,7 @@ class TransmissionRPC implements AbstractClientInterface
|
||||
{
|
||||
if (!is_array($ids)) {
|
||||
$ids = array($ids);
|
||||
} // Convert $ids to an array if only a single id was passed
|
||||
}
|
||||
$request = array("ids" => $ids);
|
||||
return $this->request("torrent-reannounce", $request);
|
||||
}
|
||||
@@ -218,7 +197,7 @@ class TransmissionRPC implements AbstractClientInterface
|
||||
{
|
||||
if (!is_array($ids)) {
|
||||
$ids = array($ids);
|
||||
} // Convert $ids to an array if only a single id was passed
|
||||
}
|
||||
$request = array("ids" => $ids);
|
||||
return $this->request("torrent-verify", $request);
|
||||
}
|
||||
@@ -353,23 +332,6 @@ class TransmissionRPC implements AbstractClientInterface
|
||||
return $this->request("torrent-add", $extra_options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a torrent using the raw torrent data
|
||||
*
|
||||
* @param string $torrent_metainfo The raw, unencoded contents (metainfo) of a torrent
|
||||
* @param string $save_path Folder to save torrent in
|
||||
* @param array $extra_options Optional extra torrent options
|
||||
* @return mixed
|
||||
* @throws TransmissionRPCException
|
||||
*/
|
||||
public function add_metainfo($torrent_metainfo, $save_path = '', $extra_options = array())
|
||||
{
|
||||
$extra_options['download-dir'] = $save_path;
|
||||
$extra_options['metainfo'] = base64_encode($torrent_metainfo);
|
||||
|
||||
return $this->request("torrent-add", $extra_options);
|
||||
}
|
||||
|
||||
/* Add a new torrent using a file path or a URL (For backwards compatibility)
|
||||
* @param torrent_location The URL or path to the torrent file
|
||||
* @param save_path Folder to save torrent in
|
||||
@@ -380,6 +342,25 @@ class TransmissionRPC implements AbstractClientInterface
|
||||
return $this->add_file($torrent_location, $save_path, $extra_options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a torrent using the raw torrent data
|
||||
*
|
||||
* @param string $torrent_metainfo The raw, unencoded contents (metainfo) of a torrent
|
||||
* @param string $save_path Folder to save torrent in
|
||||
* @param array $extra_options Optional extra torrent options
|
||||
* @return mixed
|
||||
* @throws TransmissionRPCException
|
||||
*/
|
||||
public function add_metainfo($torrent_metainfo, $save_path = '', $extra_options = array())
|
||||
{
|
||||
if (!empty($save_path)) {
|
||||
$extra_options['download-dir'] = $save_path;
|
||||
}
|
||||
$extra_options['metainfo'] = base64_encode($torrent_metainfo);
|
||||
|
||||
return $this->request("torrent-add", $extra_options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove torrent from transmission
|
||||
*
|
||||
@@ -388,7 +369,7 @@ class TransmissionRPC implements AbstractClientInterface
|
||||
* @return mixed
|
||||
* @throws TransmissionRPCException
|
||||
*/
|
||||
public function remove($ids, $delete_local_data = false)
|
||||
public function delete($ids, $delete_local_data = false)
|
||||
{
|
||||
if (!is_array($ids)) {
|
||||
$ids = array($ids);
|
||||
@@ -587,7 +568,8 @@ class TransmissionRPC implements AbstractClientInterface
|
||||
$array[$index] = ($value ? 1 : 0);
|
||||
} // Store boolean values as 0 or 1
|
||||
if (is_string($value)) {
|
||||
if (mb_detect_encoding($value, "auto") !== 'UTF-8') {
|
||||
$type = mb_detect_encoding($value, "auto");
|
||||
if ($type !== 'UTF-8') {
|
||||
$array[$index] = mb_convert_encoding($value, "UTF-8");
|
||||
//utf8_encode( $value ); // Make sure all data is UTF-8 encoded for Transmission
|
||||
}
|
||||
@@ -596,50 +578,12 @@ class TransmissionRPC implements AbstractClientInterface
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up the result object. Replaces all minus(-) characters in the object properties with underscores
|
||||
* and converts any object with any all-digit property names to an array.
|
||||
*
|
||||
* @param object The request result to clean
|
||||
* @returns array The cleaned object
|
||||
* @return array|object
|
||||
*/
|
||||
protected function cleanResultObject($object)
|
||||
{
|
||||
// Prepare and cast object to array
|
||||
$return_as_array = false;
|
||||
$array = $object;
|
||||
if (!is_array($array)) {
|
||||
$array = (array)$array;
|
||||
}
|
||||
foreach ($array as $index => $value) {
|
||||
if (is_array($array[$index]) || is_object($array[$index])) {
|
||||
$array[$index] = $this->cleanResultObject($array[$index]); // Recursion
|
||||
}
|
||||
if (strstr($index, '-')) {
|
||||
$valid_index = str_replace('-', '_', $index);
|
||||
$array[$valid_index] = $array[$index];
|
||||
unset($array[$index]);
|
||||
$index = $valid_index;
|
||||
}
|
||||
// Might be an array, check index for digits, if so, an array should be returned
|
||||
if (ctype_digit((string)$index)) {
|
||||
$return_as_array = true;
|
||||
}
|
||||
if (empty($value)) {
|
||||
unset($array[$index]);
|
||||
}
|
||||
}
|
||||
// Return array cast to object
|
||||
return $return_as_array ? $array : (object)$array;
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行 rpc 请求
|
||||
*
|
||||
* @param string $method 请求类型/方法, 详见 $this->allowMethods
|
||||
* @param array $arguments 附加参数, 可选
|
||||
* @return mixed
|
||||
* @return array
|
||||
* @throws TransmissionRPCException
|
||||
*/
|
||||
protected function request($method, $arguments = array())
|
||||
@@ -687,9 +631,9 @@ class TransmissionRPC implements AbstractClientInterface
|
||||
curl_close($ch);
|
||||
|
||||
if (!$content) {
|
||||
$content = json_encode(array('result' => 'failed'));
|
||||
$content = array('result' => 'failed');
|
||||
}
|
||||
return $this->return_as_array ? json_decode($content, true) : $this->cleanResultObject(json_decode($content)); // Return the sanitized result
|
||||
return json_decode($content, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -760,10 +704,56 @@ class TransmissionRPC implements AbstractClientInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* 抽象方法,子类实现
|
||||
*/
|
||||
public function status()
|
||||
{
|
||||
return isset($this->sstats()->result) ? $this->sstats()->result : 'error';
|
||||
$rs = $this->sstats();
|
||||
return isset($rs['result']) ? $rs['result'] : 'error';
|
||||
}
|
||||
|
||||
/**
|
||||
* 抽象方法,子类实现
|
||||
*/
|
||||
public function getList(&$move = array())
|
||||
{
|
||||
$ids = array();
|
||||
$fields = array( "id", "status", "name", "hashString", "downloadDir", "torrentFile" );
|
||||
$res = $this->get($ids, $fields);
|
||||
if (isset($res['result']) && $res['result'] == 'success') {
|
||||
// 成功
|
||||
} else {
|
||||
// 失败
|
||||
echo "获取种子列表失败,可能transmission暂时无响应,请稍后重试!".PHP_EOL;
|
||||
return array();
|
||||
}
|
||||
if (empty($res['arguments']['torrents'])) {
|
||||
echo "未获取到正常做种数据,请多保种,然后重试!".PHP_EOL;
|
||||
return array();
|
||||
}
|
||||
$res = $res['arguments']['torrents'];
|
||||
// 过滤,只保留正常做种
|
||||
$res = array_filter($res, function ($v) {
|
||||
return isset($v['status']) && $v['status']===6;
|
||||
}, ARRAY_FILTER_USE_BOTH);
|
||||
|
||||
if (empty($res)) {
|
||||
echo "未获取到正常做种数据,请多保种,然后重试!".PHP_EOL;
|
||||
return array();
|
||||
}
|
||||
// 提取数组:hashString
|
||||
$info_hash = array_column($res, 'hashString');
|
||||
// 升序排序
|
||||
sort($info_hash);
|
||||
$json = json_encode($info_hash, JSON_UNESCAPED_UNICODE);
|
||||
// 去重 应该从文件读入,防止重复提交
|
||||
$sha1 = sha1($json);
|
||||
// 组装返回数据
|
||||
$hashArray['hash'] = $json;
|
||||
$hashArray['sha1'] = $sha1;
|
||||
// 变换数组:hashString为键
|
||||
$hashArray['hashString'] = array_column($res, "downloadDir", 'hashString');
|
||||
$move = array_column($res, null, 'hashString');
|
||||
return $hashArray;
|
||||
}
|
||||
}
|
276
app/Library/Table.php
Normal file
276
app/Library/Table.php
Normal file
@@ -0,0 +1,276 @@
|
||||
<?php
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
protected $format = [
|
||||
'compact' => [],
|
||||
'default' => [
|
||||
'top' => ['+', '-', '+', '+'],
|
||||
'cell' => ['|', ' ', '|', '|'],
|
||||
'middle' => ['+', '-', '+', '+'],
|
||||
'bottom' => ['+', '-', '+', '+'],
|
||||
'cross-top' => ['+', '-', '-', '+'],
|
||||
'cross-bottom' => ['+', '-', '-', '+'],
|
||||
],
|
||||
'markdown' => [
|
||||
'top' => [' ', ' ', ' ', ' '],
|
||||
'cell' => ['|', ' ', '|', '|'],
|
||||
'middle' => ['|', '-', '|', '|'],
|
||||
'bottom' => [' ', ' ', ' ', ' '],
|
||||
'cross-top' => ['|', ' ', ' ', '|'],
|
||||
'cross-bottom' => ['|', ' ', ' ', '|'],
|
||||
],
|
||||
'borderless' => [
|
||||
'top' => ['=', '=', ' ', '='],
|
||||
'cell' => [' ', ' ', ' ', ' '],
|
||||
'middle' => ['=', '=', ' ', '='],
|
||||
'bottom' => ['=', '=', ' ', '='],
|
||||
'cross-top' => ['=', '=', ' ', '='],
|
||||
'cross-bottom' => ['=', '=', ' ', '='],
|
||||
],
|
||||
'box' => [
|
||||
'top' => ['┌', '─', '┬', '┐'],
|
||||
'cell' => ['│', ' ', '│', '│'],
|
||||
'middle' => ['├', '─', '┼', '┤'],
|
||||
'bottom' => ['└', '─', '┴', '┘'],
|
||||
'cross-top' => ['├', '─', '┴', '┤'],
|
||||
'cross-bottom' => ['├', '─', '┬', '┤'],
|
||||
],
|
||||
'box-double' => [
|
||||
'top' => ['╔', '═', '╤', '╗'],
|
||||
'cell' => ['║', ' ', '│', '║'],
|
||||
'middle' => ['╠', '─', '╪', '╣'],
|
||||
'bottom' => ['╚', '═', '╧', '╝'],
|
||||
'cross-top' => ['╠', '═', '╧', '╣'],
|
||||
'cross-bottom' => ['╠', '═', '╤', '╣'],
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* 设置表格头信息 以及对齐方式
|
||||
* @access public
|
||||
* @param array $header 要输出的Header信息
|
||||
* @param int $align 对齐方式 默认1 ALGIN_LEFT 0 ALIGN_RIGHT 2 ALIGN_CENTER
|
||||
* @return void
|
||||
*/
|
||||
public function setHeader($header, $align = self::ALIGN_LEFT)
|
||||
{
|
||||
$this->header = $header;
|
||||
$this->headerAlign = $align;
|
||||
|
||||
$this->checkColWidth($header);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置输出表格数据 及对齐方式
|
||||
* @access public
|
||||
* @param array $rows 要输出的表格数据(二维数组)
|
||||
* @param int $align 对齐方式 默认1 ALGIN_LEFT 0 ALIGN_RIGHT 2 ALIGN_CENTER
|
||||
* @return void
|
||||
*/
|
||||
public function setRows($rows, $align = self::ALIGN_LEFT)
|
||||
{
|
||||
$this->rows = $rows;
|
||||
$this->cellAlign = $align;
|
||||
|
||||
foreach ($rows as $row) {
|
||||
$this->checkColWidth($row);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查列数据的显示宽度
|
||||
* @access public
|
||||
* @param mixed $row 行数据
|
||||
* @return void
|
||||
*/
|
||||
protected function checkColWidth($row)
|
||||
{
|
||||
if (is_array($row)) {
|
||||
foreach ($row as $key => $cell) {
|
||||
if (!isset($this->colWidth[$key]) || strlen($cell) > $this->colWidth[$key]) {
|
||||
$this->colWidth[$key] = strlen($cell);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加一行表格数据
|
||||
* @access public
|
||||
* @param mixed $row 行数据
|
||||
* @param bool $first 是否在开头插入
|
||||
* @return void
|
||||
*/
|
||||
public function addRow($row, $first = false)
|
||||
{
|
||||
if ($first) {
|
||||
array_unshift($this->rows, $row);
|
||||
} else {
|
||||
$this->rows[] = $row;
|
||||
}
|
||||
|
||||
$this->checkColWidth($row);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置输出表格的样式
|
||||
* @access public
|
||||
* @param string $style 样式名
|
||||
* @return void
|
||||
*/
|
||||
public function setStyle($style)
|
||||
{
|
||||
$this->style = isset($this->format[$style]) ? $style : 'default';
|
||||
}
|
||||
|
||||
/**
|
||||
* 输出分隔行
|
||||
* @access public
|
||||
* @param string $pos 位置
|
||||
* @return string
|
||||
*/
|
||||
protected function renderSeparator($pos)
|
||||
{
|
||||
$style = $this->getStyle($pos);
|
||||
$array = [];
|
||||
|
||||
foreach ($this->colWidth as $width) {
|
||||
$array[] = str_repeat($style[1], $width + 2);
|
||||
}
|
||||
|
||||
return $style[0] . implode($style[2], $array) . $style[3] . PHP_EOL;
|
||||
}
|
||||
|
||||
/**
|
||||
* 输出表格头部
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
protected function renderHeader()
|
||||
{
|
||||
$style = $this->getStyle('cell');
|
||||
$content = $this->renderSeparator('top');
|
||||
|
||||
foreach ($this->header as $key => $header) {
|
||||
$array[] = ' ' . str_pad($header, $this->colWidth[$key], $style[1], $this->headerAlign);
|
||||
}
|
||||
|
||||
if (!empty($array)) {
|
||||
$content .= $style[0] . implode(' ' . $style[2], $array) . ' ' . $style[3] . PHP_EOL;
|
||||
|
||||
if ($this->rows) {
|
||||
$content .= $this->renderSeparator('middle');
|
||||
}
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
protected function getStyle($style)
|
||||
{
|
||||
if ($this->format[$this->style]) {
|
||||
$style = $this->format[$this->style][$style];
|
||||
} else {
|
||||
$style = [' ', ' ', ' ', ' '];
|
||||
}
|
||||
|
||||
return $style;
|
||||
}
|
||||
|
||||
/**
|
||||
* 输出表格
|
||||
* @access public
|
||||
* @param array $dataList 表格数据
|
||||
* @return string
|
||||
*/
|
||||
public function render($dataList = [])
|
||||
{
|
||||
if ($dataList) {
|
||||
$this->setRows($dataList);
|
||||
}
|
||||
|
||||
// 输出头部
|
||||
$content = $this->renderHeader();
|
||||
$style = $this->getStyle('cell');
|
||||
|
||||
if ($this->rows) {
|
||||
foreach ($this->rows as $row) {
|
||||
if (is_string($row) && '-' === $row) {
|
||||
$content .= $this->renderSeparator('middle');
|
||||
} elseif (is_scalar($row)) {
|
||||
$content .= $this->renderSeparator('cross-top');
|
||||
$array = str_pad($row, 3 * (count($this->colWidth) - 1) + array_reduce($this->colWidth, function ($a, $b) {
|
||||
return $a + $b;
|
||||
}));
|
||||
|
||||
$content .= $style[0] . ' ' . $array . ' ' . $style[3] . PHP_EOL;
|
||||
$content .= $this->renderSeparator('cross-bottom');
|
||||
} else {
|
||||
$array = [];
|
||||
|
||||
foreach ($row as $key => $val) {
|
||||
$array[] = ' ' . str_pad($val, $this->colWidth[$key], ' ', $this->cellAlign);
|
||||
}
|
||||
|
||||
$content .= $style[0] . implode(' ' . $style[2], $array) . ' ' . $style[3] . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$content .= $this->renderSeparator('bottom');
|
||||
|
||||
return $content;
|
||||
}
|
||||
}
|
170
app/helper.php
170
app/helper.php
@@ -1,4 +1,8 @@
|
||||
<?php
|
||||
|
||||
use IYUU\Library\IFile;
|
||||
use IYUU\Library\Table;
|
||||
|
||||
/**
|
||||
* 调试函数
|
||||
* @param $data
|
||||
@@ -136,7 +140,7 @@ function send($site = '', $torrent = array())
|
||||
* @param string $method
|
||||
* @return mixed 返回的数据
|
||||
*/
|
||||
function download($url, $cookies, $useragent, $method = 'GET')
|
||||
function download($url, $cookies='', $useragent='', $method = 'GET')
|
||||
{
|
||||
$header = array(
|
||||
"Content-Type:application/x-www-form-urlencoded",
|
||||
@@ -145,7 +149,7 @@ function download($url, $cookies, $useragent, $method = 'GET')
|
||||
if ($method === 'POST') {
|
||||
curl_setopt($ch, CURLOPT_POST, true);
|
||||
}
|
||||
if (stripos($url, 'https://') !== false) {
|
||||
if (stripos($url, 'https://') === 0) {
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
||||
curl_setopt($ch, CURLOPT_SSLVERSION, 1);
|
||||
@@ -192,6 +196,38 @@ function convertToMB($from)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 字节数Byte转换为KB、MB、GB、TB
|
||||
*
|
||||
*/
|
||||
function getFilesize($num)
|
||||
{
|
||||
$p = 0;
|
||||
$format='bytes';
|
||||
if ($num>0 && $num<1024) {
|
||||
$p = 0;
|
||||
return number_format($num).' '.$format;
|
||||
}
|
||||
if ($num>=1024 && $num<pow(1024, 2)) {
|
||||
$p = 1;
|
||||
$format = 'KB';
|
||||
}
|
||||
if ($num>=pow(1024, 2) && $num<pow(1024, 3)) {
|
||||
$p = 2;
|
||||
$format = 'MB';
|
||||
}
|
||||
if ($num>=pow(1024, 3) && $num<pow(1024, 4)) {
|
||||
$p = 3;
|
||||
$format = 'GB';
|
||||
}
|
||||
if ($num>=pow(1024, 4) && $num<pow(1024, 5)) {
|
||||
$p = 3;
|
||||
$format = 'TB';
|
||||
}
|
||||
$num /= pow(1024, $p);
|
||||
return number_format($num, 2).$format;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 种子过滤器
|
||||
* @param string $site 站点标识
|
||||
@@ -286,22 +322,26 @@ function filter($site = '', $torrent = array())
|
||||
}
|
||||
|
||||
/**
|
||||
* transmission过滤函数,只保留正常做种
|
||||
* 日志记录函数
|
||||
*/
|
||||
function filterStatus($v)
|
||||
function wlog($data='', $name = '', $path = '')
|
||||
{
|
||||
return isset($v['status']) && $v['status']===6;
|
||||
}
|
||||
|
||||
/**
|
||||
* qBittorrent过滤函数,只保留正常做种
|
||||
*/
|
||||
function qbfilterStatus($v)
|
||||
{
|
||||
if (isset($v['state']) && in_array($v['state'], array('uploading','stalledUP','pausedUP','queuedUP','checkingUP','forcedUP'))) {
|
||||
return true;
|
||||
// 数据转换
|
||||
if (is_bool($data)) {
|
||||
$show_data=$data ? 'true' : 'false';
|
||||
} elseif (is_null($data)) {
|
||||
$show_data='null';
|
||||
} else {
|
||||
$show_data=print_r($data, true);
|
||||
}
|
||||
return false;
|
||||
// 写入日志
|
||||
$dir = $path===''? TORRENT_PATH . 'cache' . DS : $path;
|
||||
IFile::mkdir($dir);
|
||||
$myfile = $dir.$name.'.txt';
|
||||
$file_pointer = @fopen($myfile, "a");
|
||||
$worldsnum = @fwrite($file_pointer, $show_data);
|
||||
@fclose($file_pointer);
|
||||
return $worldsnum;
|
||||
}
|
||||
|
||||
//PHP stdClass Object转array
|
||||
@@ -317,3 +357,103 @@ function object_array($array)
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* 奇数
|
||||
*/
|
||||
function oddFilter($var)
|
||||
{
|
||||
// 返回$var最后一个二进制位,
|
||||
// 为1则保留(奇数的二进制的最后一位肯定是1)
|
||||
return($var & 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 偶数
|
||||
*/
|
||||
function evenFilter($var)
|
||||
{
|
||||
// 返回$var最后一个二进制位,
|
||||
// 为0则保留(偶数的二进制的最后一位肯定是0)
|
||||
return(!($var & 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布员签名
|
||||
* 注意:同时配置iyuu.cn与secret时,优先使用secret。
|
||||
*/
|
||||
function sign($timestamp)
|
||||
{
|
||||
global $configALL;
|
||||
// 爱语飞飞
|
||||
$token = isset($configALL['iyuu.cn']) && $configALL['iyuu.cn'] ? $configALL['iyuu.cn'] : '';
|
||||
// 鉴权
|
||||
$token = isset($configALL['secret']) && $configALL['secret'] ? $configALL['secret'] : $token;
|
||||
return sha1($timestamp . $token);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 分离token中的用户uid
|
||||
* token算法:IYUU + uid + T + sha1(openid+time+盐)
|
||||
* @param string $token 用户请求token
|
||||
*/
|
||||
function getUid($token)
|
||||
{
|
||||
//验证是否IYUU开头,strpos($token,'T')<15,token总长度小于60(40+10+5)
|
||||
return (strlen($token)<60)&&(strpos($token, 'IYUU')===0)&&(strpos($token, 'T')<15) ? substr($token, 4, strpos($token, 'T')-4): false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示支持的站点列表
|
||||
*/
|
||||
function ShowTableSites($dir = 'Protocols', $filter = array())
|
||||
{
|
||||
// 过滤的文件
|
||||
switch ($dir) {
|
||||
case 'Protocols':
|
||||
$filter = ['axxxx','decodeBase'];
|
||||
break;
|
||||
case 'Rss':
|
||||
$filter = ['AbstractRss'];
|
||||
break;
|
||||
default:
|
||||
# code...
|
||||
break;
|
||||
}
|
||||
$data = [];
|
||||
$i = $j = $k = 0; //i列、j序号、k行
|
||||
foreach (glob(APP_PATH.$dir.DS.'*.php') as $key => $start_file) {
|
||||
$start_file = str_replace("\\", "/", $start_file);
|
||||
$offset = strripos($start_file, '/');
|
||||
if ($offset===false) {
|
||||
$start_file = substr($start_file, 0, -4);
|
||||
} else {
|
||||
$start_file = substr($start_file, $offset+1, -4);
|
||||
}
|
||||
// 过滤示例、过滤解码接口
|
||||
if (in_array($start_file, $filter)) {
|
||||
continue;
|
||||
}
|
||||
// 控制多少列
|
||||
if ($i > 4) {
|
||||
$k++;
|
||||
$i = 0;
|
||||
}
|
||||
$i++;
|
||||
$j++;
|
||||
$data[$k][] = $j.". ".$start_file;
|
||||
}
|
||||
//输出表格
|
||||
$table = new Table();
|
||||
$table->setRows($data);
|
||||
echo($table->render());
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否win平台
|
||||
* @return bool
|
||||
*/
|
||||
function isWin()
|
||||
{
|
||||
return (DIRECTORY_SEPARATOR == '\\') ? true : false;
|
||||
}
|
||||
|
@@ -1,9 +1,18 @@
|
||||
{
|
||||
"name": "ledccn/iyuuautoreseed",
|
||||
"description": "IYUU自动辅种工具,目前能对国内大部分的PT站点自动辅种,支持下载器集群,支持多盘位,支持多下载目录,支持远程连接等。",
|
||||
"type": "project",
|
||||
"keywords": ["iyuu", "reseed"],
|
||||
"homepage": "https://github.com/ledccn/IYUUAutoReseed",
|
||||
"authors": [
|
||||
{
|
||||
"name": "David"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-curl": "*",
|
||||
"owner888/phpspider": "^2.1",
|
||||
"curl/curl": "^2.2"
|
||||
},
|
||||
"autoload": {
|
||||
|
60
composer.lock
generated
60
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "32806a4860870f6306b69cf349584387",
|
||||
"content-hash": "10281f19c929443b7db18d1ab159ec63",
|
||||
"packages": [
|
||||
{
|
||||
"name": "curl/curl",
|
||||
@@ -66,58 +66,6 @@
|
||||
"dot"
|
||||
],
|
||||
"time": "2018-12-04T19:47:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "owner888/phpspider",
|
||||
"version": "v2.1.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/owner888/phpspider.git",
|
||||
"reference": "e6021148adec201418c16ba26f39bc013ba5b4d9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/owner888/phpspider/zipball/e6021148adec201418c16ba26f39bc013ba5b4d9",
|
||||
"reference": "e6021148adec201418c16ba26f39bc013ba5b4d9",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||
"preferred": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-pcntl、ext-redis": "For better performance. "
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"phpspider\\": "./"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Seatle Yang",
|
||||
"email": "seatle@foxmail.com",
|
||||
"homepage": "http://www.phpspider.org",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "The PHPSpider Framework.",
|
||||
"homepage": "http://www.phpspider.org",
|
||||
"keywords": [
|
||||
"framework",
|
||||
"phpspider"
|
||||
],
|
||||
"time": "2018-08-15T08:04:29+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
@@ -126,6 +74,10 @@
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform": {
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-curl": "*"
|
||||
},
|
||||
"platform-dev": []
|
||||
}
|
||||
|
@@ -3,7 +3,15 @@
|
||||
* 技术讨论及后续更新,请加入QQ群!!!!!!!
|
||||
群名称:IYUU自动辅种交流
|
||||
QQ群号:859882209
|
||||
* 手动配置方法,请查看:https://www.iyuu.cn/archives/324/
|
||||
* IYUU自动辅种工具--最简配置(所有平台通用教程) https://www.iyuu.cn/archives/324/
|
||||
* IYUU自动辅种工具--如何下载最新源码? https://www.iyuu.cn/archives/338/
|
||||
* IYUU自动辅种工具--合作站点鉴权配置说明 https://www.iyuu.cn/archives/337/
|
||||
* IYUU自动下载种子--之RSS订阅使用教程 https://www.iyuu.cn/archives/349/
|
||||
* IYUU自动转移做种客户端--使用教程 https://www.iyuu.cn/archives/351/
|
||||
脚本仓库下载法:
|
||||
git clone https://github.com/ledccn/IYUUAutoReseed
|
||||
cd IYUUAutoReseed
|
||||
composer install
|
||||
*/
|
||||
return array(
|
||||
// 1.【必须配置】爱语飞飞 微信通知,请访问https://iyuu.cn 用微信扫码申请
|
||||
@@ -25,22 +33,51 @@ return array(
|
||||
'host' => 'http://127.0.0.1:9091/transmission/rpc', // 警告!注意:transmission/rpc这段别动,你只需要修改 127.0.0.1:9091
|
||||
'username' => '',
|
||||
'password' => '',
|
||||
'BT_backup' => '/var/lib/transmission/torrents', // 移动做种:如果脚本与当前客户端不在一台机器,必须配置
|
||||
'move' => 0, // 0不移动,1移动并辅种,2移动仅辅种自身,3未定义
|
||||
),
|
||||
# 结束
|
||||
# 开始
|
||||
array(
|
||||
'type' => 'qBittorrent', // 支持:transmission、qBittorrent
|
||||
'host' => 'http://www.baidu.com:8083',
|
||||
'host' => 'http://127.0.0.1:8083',
|
||||
'username' => '',
|
||||
'password' => '',
|
||||
'BT_backup' => 'C:\Users\ASUS\AppData\Local\qBittorrent\BT_backup', // 移动做种:必须配置,Linux搜索方法:find / -name BT_backup
|
||||
'move' => 0, // 0不移动,1移动并辅种,2移动仅辅种自身,3未定义
|
||||
),
|
||||
# 结束
|
||||
// 全局客户端设置 结束
|
||||
),
|
||||
// 移动做种必须配置
|
||||
'move' =>array(
|
||||
'type' => 2, // 0保持不变,1减,2加, 3直接替换
|
||||
'type' => 0, // 0保持不变,1减,2加,3替换
|
||||
'path' =>array(
|
||||
'/sda1' => '/volume1',
|
||||
// 当前路径 => 目标路径
|
||||
'/downloads' => '/volume1',
|
||||
),
|
||||
'paused' => 0, //转移成功,0开始,1暂停
|
||||
'skip_check' => 0, //转移成功,跳校验
|
||||
'delete_torrent' => 0, //转移成功,删除当前做种
|
||||
),
|
||||
'workingMode' => 0,
|
||||
'watch' => '/volume1/downloads',
|
||||
'filter' => array(
|
||||
'size'=>array(
|
||||
'min' => '1GB',
|
||||
'max' => '280GB',
|
||||
),
|
||||
'seeders'=>array(
|
||||
'min' => 1,
|
||||
'max' => 3,
|
||||
),
|
||||
'leechers'=>array(
|
||||
'min' => 0,
|
||||
'max' => 10000,
|
||||
),
|
||||
'completed'=>array(
|
||||
'min' => 0,
|
||||
'max' => 10000,
|
||||
),
|
||||
),
|
||||
'CONNECTTIMEOUT'=> 60,
|
||||
@@ -58,6 +95,23 @@ return array(
|
||||
'passkey' => '',
|
||||
// 种子Tracker的IP地址选择 可选:ipv4,ipv6
|
||||
'ip_type' => 'ipv4',
|
||||
'clients' => array(
|
||||
array(
|
||||
'type' => 'transmission', // 支持:transmission、qBittorrent
|
||||
'host' => 'http://127.0.0.1:9091/transmission/rpc', // 警告!注意:transmission/rpc这段别动,你只需要修改 127.0.0.1:9091
|
||||
'username' => '',
|
||||
'password' => '',
|
||||
'downloadDir'=> '',
|
||||
),
|
||||
),
|
||||
'workingMode' => 1,
|
||||
'watch' => '',
|
||||
'filter' => array(
|
||||
'size'=>array(
|
||||
'min' => '1GB',
|
||||
'max' => '280GB',
|
||||
),
|
||||
),
|
||||
),
|
||||
// keepfrds 序号:2
|
||||
'keepfrds' => array(
|
||||
@@ -65,6 +119,14 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'workingMode' => 1,
|
||||
'watch' => '',
|
||||
'filter' => array(
|
||||
'size'=>array(
|
||||
'min' => '1GB',
|
||||
'max' => '280GB',
|
||||
),
|
||||
),
|
||||
),
|
||||
// ourbits 序号:3
|
||||
'ourbits' => array(
|
||||
@@ -72,8 +134,15 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'id' => 0, // 用户ID
|
||||
'is_vip' => 0, // 是否具有VIP或特殊权限?0 普通,1 VIP
|
||||
'id' => 0, // 用户ID(不是用户名)
|
||||
'workingMode' => 0,
|
||||
'watch' => '/root/downloads',
|
||||
'filter' => array(
|
||||
'size'=>array(
|
||||
'min' => '1GB',
|
||||
'max' => '280GB',
|
||||
),
|
||||
),
|
||||
),
|
||||
// HDSky 序号:4
|
||||
'hdsky' => array(
|
||||
@@ -153,6 +222,8 @@ return array(
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
// 如果需要rss订阅,必须配置
|
||||
'rss' => '',
|
||||
),
|
||||
// nanyangpt 序号:15
|
||||
'nanyangpt' => array(
|
||||
@@ -273,7 +344,7 @@ return array(
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
),
|
||||
// hdbug 序号:32
|
||||
// hddisk.life 序号:32
|
||||
'hdbug' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
'cookie' => '',
|
||||
@@ -308,7 +379,7 @@ return array(
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
),
|
||||
// upxin 序号:37
|
||||
// hdu 序号:37
|
||||
'upxin' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
'cookie' => '',
|
||||
@@ -336,13 +407,6 @@ return array(
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
),
|
||||
// cnscg 序号:41 圣城
|
||||
'cnscg' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
),
|
||||
// nicept 序号:42 老师
|
||||
'nicept' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
@@ -357,6 +421,55 @@ return array(
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
),
|
||||
// byr 序号:44 北邮
|
||||
'byr' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
),
|
||||
// CCFBits 序号:45
|
||||
'ccfbits' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
),
|
||||
// hdbits 序号:46
|
||||
'hdbits' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
),
|
||||
// PTPBD 序号:47
|
||||
'ptpbd' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
),
|
||||
// HD-T 序号:48
|
||||
'hd-torrents' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
),
|
||||
// skyeysnow 序号:50 天雪
|
||||
'skyeysnow' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
),
|
||||
// pt.sjtu 序号:51 葡萄
|
||||
'pt' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
),
|
||||
|
||||
// 配置文件结束
|
||||
);
|
||||
|
3
config/git_pull.sh
Normal file
3
config/git_pull.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd /root/IYUUAutoReseed
|
||||
git pull
|
3
docker/Dockerfile
Normal file
3
docker/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM php:7.4-fpm
|
||||
EXPOSE 9000
|
||||
WORKDIR /var/www
|
51
docker/IYUUAutoReseed自动辅种docker安装教程.md
Normal file
51
docker/IYUUAutoReseed自动辅种docker安装教程.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# IYUUAutoReseed自动辅种docker安装教程
|
||||
|
||||
第一步:复制docker目录到您的Linux的任意目录内;
|
||||
|
||||
第二步:给予`build.sh`、`iyuu.sh`可执行权限;
|
||||
|
||||
第三步:编译镜像并运行容器,命令为:`./build.sh` 耐心等待完成;
|
||||
|
||||
第四步:测试是否安装完成,命令为:`./iyuu.sh`
|
||||
|
||||
然后看教程:https://www.iyuu.cn/archives/324/,来编辑配置即可。
|
||||
|
||||
#### 必读:脚本会在`/root`目录,创建`IYUUAutoReseed`文件夹,您只需要按照上述教程编辑好配置,放到`/root/IYUUAutoReseed/config/config.php`
|
||||
|
||||
|
||||
|
||||
### 辅种时执行的命令:`iyuu.sh`
|
||||
|
||||
|
||||
|
||||
## 如何定时辅种?
|
||||
|
||||
把`iyuu.sh`加入Linux计划任务内。
|
||||
|
||||
|
||||
|
||||
## 小钢炮qBittorrent连接失败?
|
||||
|
||||
v4.1.5无法连接,请安装灯大高版本的qbittorrent,做种列表不丢失且不用校验。
|
||||
|
||||
```sh
|
||||
IMAGE_NAME=80x86/qbittorrent
|
||||
WEB_PORT=8083
|
||||
DOWNLOAD_PATH=$(cat /var/lib/qbittorrent/.config/qBittorrent/qBittorrent.conf | grep -i 'Downloads\\SavePath' | cut -d'=' -f2)
|
||||
BT_PORT=8999
|
||||
QBT_AUTH_SERVER_ADDR=$(ip -4 addr show docker0 | grep inet | awk '{print $2}' | cut -d'/' -f1)
|
||||
docker run -d --name qbittorrent \
|
||||
-e PUID=$(id -u qbittorrent) \
|
||||
-e PGID=$(cat /etc/group | grep -e '^users' | cut -d':' -f3) \
|
||||
-e WEB_PORT=$WEB_PORT \
|
||||
-e BT_PORT=$BT_PORT \
|
||||
-e QBT_AUTH_SERVER_ADDR=$QBT_AUTH_SERVER_ADDR \
|
||||
--restart unless-stopped \
|
||||
-p $WEB_PORT:$WEB_PORT -p $BT_PORT:$BT_PORT/tcp -p $BT_PORT:$BT_PORT/udp \
|
||||
-v /var/lib/qbittorrent/.config/qBittorrent:/config \
|
||||
-v /var/lib/qbittorrent/.local/share/data/qBittorrent:/data \
|
||||
-v "$DOWNLOAD_PATH":/downloads \
|
||||
--mount type=tmpfs,destination=/tmp \
|
||||
${IMAGE_NAME}
|
||||
```
|
||||
|
9
docker/build.sh
Normal file
9
docker/build.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
wget -c https://gitee.com/ledc/IYUUAutoReseed/repository/archive/master.zip -O IYUUAutoReseed.zip
|
||||
wget -c http://api.iyuu.cn/uploads/vendor.zip -O vendor.zip
|
||||
unzip -o ./IYUUAutoReseed.zip -d /root
|
||||
unzip -o ./vendor.zip -d /root/IYUUAutoReseed
|
||||
rm ./IYUUAutoReseed.zip
|
||||
rm ./vendor.zip
|
||||
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
docker/iyuu.sh
Normal file
3
docker/iyuu.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin
|
||||
docker exec -it IYUUAutoReseed php iyuu.php
|
3
docker/task.sh
Normal file
3
docker/task.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin
|
||||
docker exec IYUUAutoReseed php iyuu.php
|
5
git自动更新.cmd
Normal file
5
git自动更新.cmd
Normal file
@@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
chcp 65001
|
||||
git fetch --all
|
||||
git reset --hard origin/master
|
||||
git pull
|
40
init.php
40
init.php
@@ -1,17 +1,13 @@
|
||||
<?php
|
||||
//----------------------------------
|
||||
// 公共入口文件
|
||||
//----------------------------------
|
||||
// 定义目录
|
||||
use IYUU\AutoReseed;
|
||||
|
||||
defined('ROOT_PATH') or define("ROOT_PATH", __DIR__);
|
||||
define('DS', DIRECTORY_SEPARATOR);
|
||||
defined('APP_PATH') or define('APP_PATH', ROOT_PATH.DS.'app'.DS);
|
||||
define('TORRENT_PATH', ROOT_PATH.DS.'torrent'.DS);
|
||||
|
||||
// 严格开发模式
|
||||
error_reporting(E_ALL);
|
||||
#ini_set('display_errors', 1);
|
||||
ini_set('display_errors', 1);
|
||||
|
||||
// 永不超时
|
||||
ini_set('max_execution_time', 0);
|
||||
@@ -28,7 +24,7 @@ if (PHP_SAPI != 'cli') {
|
||||
|
||||
// 设置时区
|
||||
date_default_timezone_set('Asia/Shanghai');
|
||||
|
||||
echo microtime(true).' 环境变量初始化完成!'.PHP_EOL;
|
||||
// 系统配置
|
||||
if (file_exists(ROOT_PATH."/config/config.php")) {
|
||||
// 配置(全局变量)
|
||||
@@ -36,15 +32,27 @@ if (file_exists(ROOT_PATH."/config/config.php")) {
|
||||
} else {
|
||||
// 示例配置
|
||||
$configALL = require_once ROOT_PATH . '/config/config.sample.php';
|
||||
echo microtime(true).' 缺少config.php,已载入config.sample.php示例配置。'.PHP_EOL;
|
||||
echo microtime(true).' 请把配置文件改名为config.php,以免后续版本升级覆盖配置!!!'.PHP_EOL;
|
||||
$t = 30;
|
||||
do {
|
||||
echo microtime(true)." 请把配置文件改名为config.php,{$t}秒后继续...".PHP_EOL;
|
||||
sleep(1);
|
||||
} while (--$t > 0);
|
||||
}
|
||||
|
||||
echo microtime(true).' 全局配置载入完成!'.PHP_EOL;
|
||||
// 读取支持列表
|
||||
if (is_file(ROOT_PATH . "/config/sites.json")) {
|
||||
$sitesJson = file_get_contents(ROOT_PATH . "/config/sites.json");
|
||||
$configALL['sitesALL'] = json_decode($sitesJson, true);
|
||||
echo microtime(true).' 支持站点JSON载入完成!'.PHP_EOL;
|
||||
}
|
||||
echo microtime(true).' 正在加载composer包管理器...'.PHP_EOL;
|
||||
require_once ROOT_PATH . '/vendor/autoload.php';
|
||||
|
||||
AutoReseed::init();
|
||||
$hashArray = AutoReseed::get();
|
||||
if (AutoReseed::$move != null) {
|
||||
echo "种子移动完毕,请重新编辑配置,再尝试辅种! \n\n";
|
||||
exit;
|
||||
echo microtime(true).' composer依赖载入完成!'.PHP_EOL;
|
||||
echo microtime(true).' 当前脚本运行环境:'.PHP_OS.PHP_EOL;
|
||||
global $argv;
|
||||
$start_file = str_replace("\\", "/", trim($argv[0]));
|
||||
if (substr($start_file, -8)==="init.php") {
|
||||
require_once __DIR__ . '/iyuu.php';
|
||||
}
|
||||
AutoReseed::call($hashArray);
|
||||
AutoReseed::wechatMessage();
|
||||
|
8
iyuu.php
Normal file
8
iyuu.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/init.php';
|
||||
use IYUU\AutoReseed;
|
||||
|
||||
echo microtime(true).' IYUU自动辅种正在初始化...'.PHP_EOL;
|
||||
AutoReseed::init();
|
||||
AutoReseed::call();
|
||||
exit(0);
|
40
readme.md
40
readme.md
@@ -29,20 +29,30 @@ 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圣城。
|
||||
学校、杜比、家园、天空、朋友、馒头、萌猫、我堡、猫站、铂金家、烧包、北洋、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、天雪、葡萄。
|
||||
|
||||
## 运行环境
|
||||
所有具备PHP运行环境的所有平台!官方下载的记得开启crul、fileinfo、mbstring,这3个扩展。
|
||||
例如:Linux、Windows、MacOS
|
||||
具备PHP运行环境的所有平台,例如:Linux、Windows、MacOS!
|
||||
|
||||
官方下载的记得开启crul、fileinfo、mbstring,这3个扩展。
|
||||
|
||||
1. Windows下安装php环境:https://www.php.net/downloads
|
||||
|
||||
|
||||
## 下载源码
|
||||
- github仓库:https://github.com/ledccn/IYUUAutoReseed
|
||||
- 码云仓库:https://gitee.com/ledc/IYUUAutoReseed
|
||||
- 仓库下载的源码,缺少vendor目录,可以去群内下载;或者通过安装php包管理器composer,进到源码目录内执行命令:`composer install`,会自动帮你安装vendor目录。
|
||||
|
||||
|
||||
## 使用方法
|
||||
详见Wiki: https://gitee.com/ledc/IYUUAutoReseed/wikis
|
||||
详见Wiki:
|
||||
|
||||
https://gitee.com/ledc/IYUUAutoReseed/tree/master/wiki
|
||||
|
||||
## 接口开发文档
|
||||
http://api.iyuu.cn/docs.php
|
||||
|
||||
|
||||
## 需求提交/错误反馈
|
||||
- 点击链接加入群聊【IYUU自动辅种交流】:[https://jq.qq.com/?_wv=1027&k=5JOfOlM][1]
|
||||
@@ -57,8 +67,6 @@ IYUU自动辅种工具(英文名:IYUUAutoReseed),是一款PHP语言编
|
||||
**您所有的打赏将用于服务器续期,增加服务的延续性。**
|
||||
|
||||
|
||||
![微信打赏.png][2]
|
||||
|
||||
|
||||
## 捐赠者列表
|
||||
感谢以下捐赠者,排名不分先后!
|
||||
@@ -100,6 +108,26 @@ IYUU自动辅种工具(英文名:IYUUAutoReseed),是一款PHP语言编
|
||||
| 寒山先生 | ¥100元 | 2020年1月9日11:51 |
|
||||
| 王浩淼 | ¥50元 | 2020年1月9日11:53 |
|
||||
| 寒山先生 | ¥100元 | 2020年1月11日11:47 |
|
||||
| 天空(感谢远程指导小意思) | ¥20元 | 2020年1月14日23:11 |
|
||||
| 寒山先生 | ¥200元 | 2020年1月18日12:37 |
|
||||
| 小城流水 | ¥5元 | 2020年1月22日22:14 |
|
||||
| 国旗(未署名) | ¥8.8元 | 2020年1月22日23:28 |
|
||||
| Alpha | ¥10.81元 | 2020年1月24日20:23 |
|
||||
| 羽生 | ¥88.88元 | 2020年1月24日21:06 |
|
||||
| 当下丶 | ¥100元 | 2020年1月28日1:45 |
|
||||
| 陈君政 | ¥10元 | 2020年2月3日11:32 |
|
||||
| 不寐夜游 | ¥10元 | 2020年2月8日17:17 |
|
||||
| Jack | ¥10元 | 2020年2月13日08:05 |
|
||||
| 陈伟平 | ¥28.88元 | 2020年2月13日12:35 |
|
||||
| PhalApi Pro商业授权 | ¥-950元 | 2020年2月14日21:56 |
|
||||
| jonnaszheng | ¥10元 | 2020年2月15日10:25 |
|
||||
| weekend(sd54zdk) | ¥10元 | 2020年2月17日14:31 |
|
||||
| 寒山先生 | ¥200元 | 2020年2月17日17:00 |
|
||||
| PLC组态远程服务 | ¥8.88元 | 2020年2月18日02:14 |
|
||||
| JeSsiE杰西 | ¥66元 | 2020年2月20日19:38 |
|
||||
| 黄叶梓(炮王) | ¥10元 | 2020年2月20日21:10 |
|
||||
| 里奥龙 | ¥88.8元 | 2020年2月20日21:48 |
|
||||
|
||||
|
||||
补充说明:
|
||||
|
||||
|
177
wiki/RSS订阅使用教程.md
Normal file
177
wiki/RSS订阅使用教程.md
Normal file
@@ -0,0 +1,177 @@
|
||||
# IYUU新推出RSS订阅功能!
|
||||
## 功能
|
||||
自动订阅站点的新种,自动添加下载任务,支持大小过滤。
|
||||
|
||||
## 优势
|
||||
1.弥补部分下载器没有RSS订阅的缺陷;
|
||||
2.与下载器本身的RSS功能相比:IYUU自动RSS订阅,支持远程连接下载器,支持下载器多盘位、支持多目录,支持筛选,支持下载器集群;
|
||||
|
||||
## 需要配置什么?
|
||||
1.必须配置各站的`passkey`秘钥,从各站点的`控制面板`复制到配置文件内对应站点`passkey`处即可;
|
||||
2.TTG的密钥比较特殊,请从RSS链接处复制,并给站点配置加一个`rss`配置项(详情参考示例配置文件TTG配置)。
|
||||
前期如果你正确使用了`IYUUAutoReseed自动辅种工具`的话,本部分就非常简单了。
|
||||
|
||||
----------
|
||||
|
||||
|
||||
## 如何配置`workingMode`工作模式、`watch`监控目录、`cliects`下载器?
|
||||
### 第一步完善全局配置
|
||||
```php
|
||||
'default' => array(
|
||||
// 5.【必须配置】浏览器UA,打开http://demo.iyuu.cn 复制过来即可
|
||||
'userAgent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36',
|
||||
// 6.【自动辅种必须配置】全局客户端设置(条目不够可以复制)
|
||||
'clients' => array(
|
||||
// 全局客户端设置 开始
|
||||
# 开始
|
||||
array(
|
||||
'type' => 'transmission', // 支持:transmission、qBittorrent
|
||||
'host' => 'http://127.0.0.1:9091/transmission/rpc', // 警告!注意:transmission/rpc这段别动,你只需要修改 127.0.0.1:9091
|
||||
'username' => '',
|
||||
'password' => '',
|
||||
),
|
||||
# 结束
|
||||
# 开始
|
||||
array(
|
||||
'type' => 'qBittorrent', // 支持:transmission、qBittorrent
|
||||
'host' => 'http://www.baidu.com:8083',
|
||||
'username' => '',
|
||||
'password' => '',
|
||||
),
|
||||
# 结束
|
||||
// 全局客户端设置 结束
|
||||
),
|
||||
'move' =>array(
|
||||
'type' => 2, // 0保持不变,1减,2加, 3直接替换
|
||||
'path' =>array(
|
||||
'/sda1' => '/volume1',
|
||||
),
|
||||
),
|
||||
'workingMode' => 0,
|
||||
'watch' => '/volume1/downloads',
|
||||
'filter' => array(
|
||||
'size'=>array(
|
||||
'min' => '10GB',
|
||||
'max' => '280GB',
|
||||
),
|
||||
'seeders'=>array(
|
||||
'min' => 1,
|
||||
'max' => 3,
|
||||
),
|
||||
'leechers'=>array(
|
||||
'min' => 0,
|
||||
'max' => 10000,
|
||||
),
|
||||
'completed'=>array(
|
||||
'min' => 0,
|
||||
'max' => 10000,
|
||||
),
|
||||
),
|
||||
'CONNECTTIMEOUT'=> 60,
|
||||
'TIMEOUT' => 600,
|
||||
),
|
||||
```
|
||||
|
||||
----------
|
||||
|
||||
|
||||
### 第二步,完善站点配置(示例配置:m-team)
|
||||
本部分以馒头为例,讲解`工作模式1:负载均衡`
|
||||
关键地方:`clients`、`workingMode`、`watch`、`filter`
|
||||
- 全局已经配置clients两个用来辅种,站点单独配置clients一个用来下载,在RSS订阅添加下载任务时,**以站点单独配置的clients为准**。
|
||||
- `workingMode=>1,` 代表当前站点将会工作在模式1;
|
||||
- `watch=>''` 因为站点工作在模式1,配置了也无效,**留空即可**;
|
||||
- 全局和站点都配置filter,该站点RSS订阅添加下载任务时,**过滤规则以站点配置为准**;
|
||||
下面是m-team的示例配置代码。
|
||||
```php
|
||||
'm-team' => array(
|
||||
// 14.m-team的cookie 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
'cookie' => 'tp=',
|
||||
// 15.m-team的passkey 【必须配置】
|
||||
'passkey' => '',
|
||||
// 种子Tracker的IP地址选择 可选:ipv4,ipv6
|
||||
'ip_type' => 'ipv4',
|
||||
'clients' => array(
|
||||
array(
|
||||
'type' => 'transmission', // 支持:transmission、qBittorrent
|
||||
'host' => 'http://127.0.0.1:9091/transmission/rpc', // 警告!注意:transmission/rpc这段别动,你只需要修改 127.0.0.1:9091
|
||||
'username' => '',
|
||||
'password' => '',
|
||||
),
|
||||
),
|
||||
'workingMode' => 1,
|
||||
'watch' => '',
|
||||
'filter' => array(
|
||||
'size'=>array(
|
||||
'min' => '1GB',
|
||||
'max' => '280GB',
|
||||
),
|
||||
),
|
||||
),
|
||||
```
|
||||
|
||||
----------
|
||||
|
||||
|
||||
### 第三步,完善站点配置(示例配置:keepfrds)
|
||||
本部分以朋友为例,讲解工作模式1:负载均衡
|
||||
关键地方:`clients`、`workingMode`、`watch`、`filter`
|
||||
- 全局已经配置clients两个用来辅种,**站点没有单独配置clients,在RSS订阅添加下载任务时,以全局配置的clients为准**。
|
||||
- `workingMode=>1,` 代表当前站点将会工作在模式1;
|
||||
- `watch=>''` 因为站点工作在模式1,配置了也无效,**留空即可**;
|
||||
- 全局和站点都配置filter,该站点RSS订阅添加下载任务时,**过滤规则以站点配置为准**;
|
||||
下面是keepfrds的示例配置代码。
|
||||
```php
|
||||
'keepfrds' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'workingMode' => 1,
|
||||
'watch' => '',
|
||||
'filter' => array(
|
||||
'size'=>array(
|
||||
'min' => '1GB',
|
||||
'max' => '280GB',
|
||||
),
|
||||
),
|
||||
),
|
||||
```
|
||||
|
||||
----------
|
||||
|
||||
|
||||
### 第四步,完善站点配置(示例配置:ourbits)
|
||||
本部分以我堡为例,讲解工作模式0:watch监控目录
|
||||
关键地方:`workingMode`、`watch`、`filter`
|
||||
- `workingMode=>0,` 代表当前站点将会工作在模式0:**脚本会往指定的watch目录内下载种子**,由下载器添加下载任务;
|
||||
- `watch=>'/root/downloads'` 脚本会往`/root/downloads`目录内下载种子,由下载器添加下载任务;
|
||||
- 全局和站点都配置filter,该站点RSS订阅添加下载任务时,**过滤规则以站点配置为准**;
|
||||
下面是ourbits的示例配置代码。
|
||||
```php
|
||||
'ourbits' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'id' => 0, // 用户ID
|
||||
'is_vip' => 0, // 是否具有VIP或特殊权限?0 普通,1 VIP
|
||||
'workingMode' => 0,
|
||||
'watch' => '/root/downloads',
|
||||
'filter' => array(
|
||||
'size'=>array(
|
||||
'min' => '1GB',
|
||||
'max' => '280GB',
|
||||
),
|
||||
),
|
||||
),
|
||||
```
|
||||
|
||||
## RSS订阅脚本名字:`rss.php`
|
||||
配置好后,执行命令:`php rss.php`,即可查看支持RSS的站点列表。
|
||||
![IYUU1.png][1]
|
||||
**总结:以上详细讲解了RSS订阅下载、下载免费种时的各种配置的情况,请仔细阅读务必理解!**
|
||||
其他站点设置RSS订阅,同样道理
|
||||
|
||||
|
||||
[1]: https://www.iyuu.cn/usr/uploads/2020/01/3194879294.png
|
51
wiki/下载最新源码.md
Normal file
51
wiki/下载最新源码.md
Normal file
@@ -0,0 +1,51 @@
|
||||
## 下载最新源码的两种方法
|
||||
### 第一种:下载完整的发行版
|
||||
**github:**[GITHUB仓库 发行版][1]
|
||||
**gitee:**[码云仓库 发行版][2]
|
||||
下载**`Release.zip`**后缀的压缩包,解压缩后即可配置使用。
|
||||
|
||||
### 第二种:git clone下载源码
|
||||
**拉取源码命令,下面两个仓库都可以:**
|
||||
- github:`git clone https://github.com/ledccn/IYUUAutoReseed`
|
||||
- gitee:`git clone https://gitee.com/ledc/IYUUAutoReseed.git`
|
||||
|
||||
----------
|
||||
|
||||
|
||||
**完整命令:**
|
||||
```bash
|
||||
git clone https://github.com/ledccn/IYUUAutoReseed
|
||||
cd IYUUAutoReseed
|
||||
composer install
|
||||
```
|
||||
Windows环境,完整过程演示:
|
||||
![git下载源码composer安装.png][3]
|
||||
```cmd
|
||||
E:\>git clone https://github.com/ledccn/IYUUAutoReseed
|
||||
Cloning into 'IYUUAutoReseed'...
|
||||
remote: Enumerating objects: 189, done.
|
||||
remote: Counting objects: 100% (189/189), done.
|
||||
remote: Compressing objects: 100% (120/120), done.
|
||||
Receiving objects: 97% (814/remote: Total 839 (delta 78), reused 171 (delta 64), pack-reused 650839), 380.00 KiB | 45.0R
|
||||
Receiving objects: 100% (839/839), 419.04 KiB | 50.00 KiB/s, done.
|
||||
Resolving deltas: 100% (468/468), done.
|
||||
|
||||
E:\>cd IYUUAutoReseed
|
||||
|
||||
E:\IYUUAutoReseed>composer install
|
||||
Loading composer repositories with package information
|
||||
Installing dependencies (including require-dev) from lock file
|
||||
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
|
||||
Package operations: 2 installs, 0 updates, 0 removals
|
||||
- Installing curl/curl (2.2.0): Loading from cache
|
||||
- Installing owner888/phpspider (v2.1.6): Loading from cache
|
||||
owner888/phpspider suggests installing ext-pcntl、ext-redis (For better performance. )
|
||||
Generating autoload files
|
||||
|
||||
E:\IYUUAutoReseed>
|
||||
```
|
||||
|
||||
|
||||
[1]: https://github.com/ledccn/IYUUAutoReseed/releases
|
||||
[2]: https://gitee.com/ledc/IYUUAutoReseed/releases
|
||||
[3]: https://www.iyuu.cn/usr/uploads/2020/01/314358689.png
|
29
wiki/公告栏.md
Normal file
29
wiki/公告栏.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# 公告栏
|
||||
|
||||
### 2020年2月22日12:28:55
|
||||
|
||||
转移做种常见错误:
|
||||
|
||||
1.Windows下运行脚本,却填写Linux路径(正确应该填写映射的路径);
|
||||
|
||||
2.Docker运行脚本,却填写实际路径(正确应该填写Docker内可读的路径)。
|
||||
请勿犯此类常识错误。
|
||||
另外,跳校验和删除当前做种的配置(第二次转移再用)。
|
||||
|
||||
### 2020年2月21日18:14:21
|
||||
|
||||
由于与海豚管理组沟通时,支持确认度上出现问题,现调整如下: 使用IYUUAutoReseed自动辅种海豚的小伙伴,私聊提供海豚UID,所有收集到的UID会提交海豚官方备案(提供UID不是为了ban,但也请遵守海豚的规则。),请在配置内删除海豚passkey、authkey。
|
||||
后续情况待定。
|
||||
|
||||
### 2020年2月21日07:42:14
|
||||
|
||||
【新增站点】dicmusic海豚音乐,版本升级v1.5.0;
|
||||
【支持辅种】学校、杜比、家园、天空、朋友、馒头、萌猫、我堡、猫站、铂金家、烧包、北洋、TCCF、南洋、TTG、映客、城市、52pt、brobits、备胎、SSD、CHD、ptmsg、leaguehd、聆音、瓷器、hdarea、eastgame(TLF)、1ptba、hdtime、hd4fans、opencd、hdbug、hdstreet、joyhd、u2、upxin(HDU)、oshen、discfan(GZT)、北邮、CCFBits、dicmusic。
|
||||
【重要提醒】Api/Reseed接口是合并所有客户端发起的请求,当做种超过10000时,存在失败可能,预备10天后停止。v1.3.0以上版本不受此影响。
|
||||
【升级方法】15号之后的版本,直接覆盖。
|
||||
|
||||
|
||||
|
||||
### 2020年1月9日12:06:03
|
||||
|
||||
使用IYUUAutoReseed自动化辅种工具本身是非常安全的,辅种过程不会跟PT站点服务器产生任何关系,只是会把下载种子链接推送给下载器。也就是说任何站点、任何技术都无法检测你是否使用了IYUU。建议不要自己手动跳校验,任何因为跳校验ban号,别怪我没提醒,也请出事不要怪到IYUU或者Reseed的头上。
|
@@ -6,22 +6,21 @@ IYUU自动辅种工具、Ourbits双方达成合作,可以对使用接口的用
|
||||
![微信通知1.png][1]
|
||||
![微信通知2.png][2]
|
||||
![微信通知3.png][3]
|
||||
2.复制您的token令牌到`/app/config/config.php`文件内的`iyuu.cn`对应的配置字段,保存。如图:
|
||||
2.复制您的token令牌到`/config/config.php`文件内的`iyuu.cn`对应的配置字段,保存。如图:
|
||||
![微信通知4.png][4]
|
||||
|
||||
### 设置Ourbits:
|
||||
![编辑配置4.png][5]
|
||||
`passkey`,在你的控制面板 - 密钥
|
||||
`is_vip`,根据你的实际情况填写,因站点有下载种子的流控,如果你不在限制之列,可以`设置为1`
|
||||
`id`,为用户中心打开后,浏览器地址栏**http://xxxxx.xxx/userdetails.php?id=`46880`**等号=后面的几个数字,如图:
|
||||
![编辑配置6.png][6]
|
||||
|
||||
到此,配置文件编辑完毕,请记得保存。
|
||||
如果提示保存格式,请保存为UTF8(无BOM)格式。
|
||||
|
||||
[1]: https://www.iyuu.cn/usr/uploads/2019/12/2331433923.png
|
||||
[2]: https://www.iyuu.cn/usr/uploads/2019/12/3324442680.png
|
||||
[3]: https://www.iyuu.cn/usr/uploads/2019/12/3181272964.png
|
||||
[4]: https://www.iyuu.cn/usr/uploads/2019/12/3669828008.png
|
||||
[5]: https://www.iyuu.cn/usr/uploads/2019/12/3696916642.png
|
||||
[6]: https://www.iyuu.cn/usr/uploads/2019/12/1230288911.png
|
||||
[1]: https://www.iyuu.cn/usr/uploads/2019/12/2331433923.png
|
||||
[2]: https://www.iyuu.cn/usr/uploads/2019/12/3324442680.png
|
||||
[3]: https://www.iyuu.cn/usr/uploads/2019/12/3181272964.png
|
||||
[4]: https://www.iyuu.cn/usr/uploads/2019/12/3669828008.png
|
||||
[5]: https://www.iyuu.cn/usr/uploads/2019/12/3696916642.png
|
||||
[6]: https://www.iyuu.cn/usr/uploads/2019/12/1230288911.png
|
@@ -3,7 +3,13 @@ php命令与脚本路径之间是有个空格,请注意!请注意!请注
|
||||
|
||||
|
||||
## IYUU自动辅种命令:
|
||||
`php ./init.php`
|
||||
`php ./iyuu.php`
|
||||
|
||||
|
||||
|
||||
## IYUU自动下载种子之RSS订阅
|
||||
|
||||
`php ./rss.php 站点名`
|
||||
|
||||
|
||||
|
||||
|
38
wiki/常见问题.md
38
wiki/常见问题.md
@@ -28,24 +28,6 @@
|
||||
|
||||
答:按站内说明,修改下载器所在设备的HOST,或者在具备修改HOST功能的路由器内修改。
|
||||
|
||||
#### 问:我拥有辅种时自动跳过站点的特殊权限,如何设置为可以辅种呢?
|
||||
|
||||
答:在站点的独立配置区域,添加一行代码`'is_vip' => 1,`即可。例如Ourbits:
|
||||
|
||||
```php
|
||||
// ourbits
|
||||
'ourbits' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'id' => 46880, // 用户ID
|
||||
'is_vip' => 1, // 是否具有VIP或特殊权限?0 普通,1 VIP
|
||||
),
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### 问:如何升级到最新版本?
|
||||
|
||||
答:从github或码云仓库,下载最新的源码,覆盖到本地即可。
|
||||
@@ -81,6 +63,26 @@
|
||||
|
||||
答:请退出登录,在登录时勾选下面两个SSL的选项,登录后复制cookie,重新配置。
|
||||
|
||||
#### 问:IYUU自动辅种失败,怎么排查问题?
|
||||
|
||||
答:1.输入种子链接,手动方法,看看种子是否还在?
|
||||
|
||||
2.手动下载种子,看看是否出现了下载种子的提示页?
|
||||
|
||||
3.瓷器、城市需要cookie辅种,请检查cookie是否配置正确!!如果下载出现提示页面,需要更新配置内的cookie、更新cookie!!!
|
||||
|
||||
如果整个站都失败,请按以上步骤排查。
|
||||
|
||||
#### 问:Windows下执行脚本时乱码?
|
||||
|
||||
答:用cmd和powershell执行脚本中文输出乱码,由于我是写php脚本的,非常喜欢国际化的uft8编码。注册表修改有些可以有些不可以,直接在控制面板修改。
|
||||
|
||||
控制面板\时钟和区域\区域\管理\更改系统区域设置\勾选beta版:使用unicode-utf8全球语言支持,保存重启即可(仅支持win10)
|
||||
|
||||
#### 问:小钢炮qBittorrent原装v4.1.5版本无法连接的解决办法?
|
||||
|
||||
答:请按照这篇文章升级,种子不用重新校验,数据不丢失。小钢炮使用docker版qb 4.1.6 简明教程http://nanodm.net:8092/archives/43/
|
||||
|
||||
#### 问:如何反馈问题?
|
||||
|
||||
答:1、点击链接加入群聊【IYUU自动辅种交流】:[https://jq.qq.com/?_wv=1027&k=5JOfOlM][1]
|
||||
|
12
wiki/开发计划.md
12
wiki/开发计划.md
@@ -6,10 +6,14 @@
|
||||
| m-team IPv4、IPv6自定义配置 | 已完成 | 2019年12月25日 | 2019年12月25日 |
|
||||
| 未配置客户端智能过滤 | 已完成 | 2019年12月25日 | 2019年12月25日 |
|
||||
| 自动辅种结束微信通知 | 已完成 | 2019年12月25日 | 2019年12月27日 |
|
||||
| 做种客户端间转移 | 已完成 | 2019年12月25日 | 2020年1月14日 |
|
||||
| 做种客户端间转移(需联网) | 已完成 | 2019年12月25日 | 2020年1月14日 |
|
||||
| 手动辅种按目录分组 | 已完成 | 2019年12月26日 | 2020年1月14日 |
|
||||
| WEB页面生成配置 | 暂未开始 | | |
|
||||
| 自动转移客户端 | 暂未开始 | | |
|
||||
| 脚本docker容器化 | 暂未开始 | | |
|
||||
| 自动转移客户端 | 已完成 | 2020年1月27日 | 2020年1月29日 |
|
||||
| 做种客户端本地转移 | 已完成 | 2020年2月21日 | 2020年2月21日 |
|
||||
| Google身份验证器(谷歌动态口令) | 开发中 | 2020年2月21日 | |
|
||||
| 自动更新 | 开发中 | 2020年2月21日 | |
|
||||
| WEB页面生成配置 | 开发中 | 2020年2月21日 | |
|
||||
| 种子删除自动同步 | 开发中 | 2020年2月21日 | |
|
||||
| 脚本docker容器化(测试版) | 已完成 | 2020年2月21日 | 2020年2月21日 |
|
||||
| 浏览器插件 | 暂未开始 | | |
|
||||
| 合集自动拆包辅种 | 暂未开始 | | |
|
||||
|
84
wiki/数据清理.md
84
wiki/数据清理.md
@@ -1,46 +1,46 @@
|
||||
## 404数据最后清理时间
|
||||
|标志 | 最后清理时间 | 状态 |
|
||||
| :-: | :-: | ---- |
|
||||
| 兽 | | |
|
||||
|老师 | | |
|
||||
|伊甸园 | | |
|
||||
|CHD | | |
|
||||
|hdzone | | |
|
||||
|港知堂(discfan) | | |
|
||||
|海豚 | | |
|
||||
|oshen | | |
|
||||
|HDU(upxin) | | |
|
||||
|U2 | | |
|
||||
|joyhd | | |
|
||||
|高清街 | | |
|
||||
|HDTIME | | |
|
||||
|hddisk(hdbug) | | |
|
||||
|HDArea | | |
|
||||
|1ptba | | |
|
||||
|烧包 | | |
|
||||
|LeagueHD | | |
|
||||
|聆音 | | |
|
||||
|TLFBits | | |
|
||||
|备胎 | | |
|
||||
|Brobits | | |
|
||||
|52pt | | |
|
||||
| 南洋 | | 已完成 |
|
||||
|映客 | | 已完成 |
|
||||
| ttg | | |
|
||||
|城市 | 2020年1月17日01:48:27 | 已完成 |
|
||||
|萌猫 | 2020年1月16日12:07:12 | 已完成 |
|
||||
|ptmsg | 2020年1月16日12:07:17 | 已完成 |
|
||||
|瓷器 | | |
|
||||
|杜比 | 2020年1月16日11:34:19 | 已完成 |
|
||||
|tccf | 2020年1月17日01:48:36 | 已完成 |
|
||||
|馒头 | | |
|
||||
|春天 | 2020年1月16日00:23:05 | 已完成 |
|
||||
|北洋 | 2020年1月16日00:23:05 | 已完成 |
|
||||
|猫站 | 2020年1月17日01:48:43 | 已完成 |
|
||||
|朋友 | 2020年1月16日00:23:05 | 已完成 |
|
||||
|铂金家 | 2020年1月16日00:23:05 | 已完成 |
|
||||
|家园 | 2020年1月16日00:23:05 | 已完成 |
|
||||
|学校 | 2020年1月16日00:19:24 | 已完成 |
|
||||
| 我堡 | 2020年1月15日13:56:22 | 已完成 |
|
||||
| 天空 | 2020年1月15日20:49:33 | 已完成 |
|
||||
| 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 | 已完成 |
|
||||
|
||||
|
46
wiki/更新历史.md
46
wiki/更新历史.md
@@ -1,3 +1,49 @@
|
||||
### 2020年2月26日
|
||||
|
||||
1. 新增:葡萄pt
|
||||
2. 升级docker制作脚本,每次制作都是最新版。
|
||||
3. 优化过滤transmission连接URL兼容性(修复网址后有斜杠,无法连接的问题)
|
||||
4. 发布包到composer,支持composer安装
|
||||
5. 加入git自动更新脚本
|
||||
6. 优化提高Windows平台转移做种客户端的兼容性
|
||||
7. 更新文档、新增支持站点天雪
|
||||
|
||||
### 2020年2月21日
|
||||
|
||||
发行版:v1.5.0
|
||||
|
||||
1. 新增做种列表备份功能,便于紧急恢复。
|
||||
2. 新增docker容器安装使用方法
|
||||
3. 修复transmission添加任务后,ID无法显示的bug
|
||||
4. 优化https判断
|
||||
5. 新增通知接口
|
||||
6. 修复扩展参数extra_options错误
|
||||
7. 删除示例配置圣城cnscg
|
||||
8. 新增教程:小钢炮qBittorrent连接失败的处理办法
|
||||
9. 优化大于一万条做种,防止因精简配置,可能导致的超时设置无效。
|
||||
10. 增加转移做种搜索目录命令find / -name BT_backup
|
||||
11. 新增海豚音乐dicmusic
|
||||
|
||||
### 2020年1月30日
|
||||
|
||||
新增:CCFBits站点辅种
|
||||
|
||||
### 2020年1月28日
|
||||
|
||||
新增:北邮站点辅种
|
||||
|
||||
新增:做种客户端转移功能
|
||||
|
||||
优化:删除用不到的依赖包
|
||||
|
||||
### 2020年1月21日
|
||||
|
||||
新增:支持的站点列表json本地化
|
||||
|
||||
新增:在线查询支持站点控制台显示
|
||||
|
||||
新增:Windows系统composer install安装依赖包命令
|
||||
|
||||
### 2020年1月17日
|
||||
|
||||
优化:文件结构,辅种脚本前置检查;
|
||||
|
@@ -1,102 +1,125 @@
|
||||
以下教程以windows为基础进行讲解,其他系统同理。
|
||||
博客链接:https://www.iyuu.cn/archives/324/
|
||||
以下教程以windows为基础进行讲解,通用威联通、群晖、铁威马等Linux系统。
|
||||
|
||||
# 重要提示:请先完整阅读完再动手操作!请先完整阅读完再动手操作!
|
||||
|
||||
## 第一步 下载压缩包
|
||||
从[码云仓库][1],下载最新源码,解压缩到D盘的根目录下。
|
||||
从[码云仓库][1],下载最新源码,源码需安装依赖才可运行(必须用composer install安装依赖包),解压缩到D盘的根目录下。
|
||||
**特殊说明:如果不会用composer安装依赖,请去群内下载zip压缩包,或者[点此下载vendor.zip][2],解压到上述目录内。**
|
||||
|
||||
|
||||
## 第二步 复制一份配置文件
|
||||
打开`D:\IYUUAutoReseed\config`目录,复制一份`config.sample.php`,另存为`config.php`。
|
||||
打开`D:\IYUUAutoReseed\config`目录,复制一份`config.sample.php`,保存为`config.php`。这样操作后,需要升级新版本时,直接覆盖即可,不会影响到配置。
|
||||
|
||||
这样操作后,需要升级新版本时,直接覆盖即可,不会影响到配置。
|
||||
|
||||
## 第三步 编辑配置文件
|
||||
提醒:千万不要用windows记事本来编辑配置文件(会导致乱码)!!
|
||||
提醒:千万不要用windows记事本来编辑配置文件!!
|
||||
推荐编辑软件:`VS code`、`EditPlus`、`SublimeText`、`Notepad++`等(保存格式,选UTF8 无BOM);
|
||||
配置文件内容较多,新手往往很迷茫,不知道改哪里,在这里我重点强调2个步骤:
|
||||
`1.编辑全局客户端; 2.编辑各站的秘钥,即passkey。`
|
||||
|
||||
配置文件内容较多,新手往往很迷茫,不知道改哪里,在这里我重点强调3个步骤:
|
||||
`1.申请爱语飞飞token;2.编辑全局客户端; 3.编辑各站的密钥,即passkey。`
|
||||
其他配置,如果不懂也没有关系;先保持默认,等脚本运行起来,再修改也不迟。另外,修改时一定要细心,仔细看教程。
|
||||
打开`D:\IYUUAutoReseed\config\config.php`文件,如下图:
|
||||
![编辑配置1.png][2]
|
||||
**下面开始详细步骤!!!!**
|
||||
### 申请爱语飞飞微信通知token,新用户访问:http://iyuu.cn 申请!
|
||||
1.点击`开始使用`,出现二维码,用`微信扫码`
|
||||
![微信通知1.png][3]
|
||||
![微信通知2.png][4]
|
||||
![微信通知3.png][5]
|
||||
2.复制您的token令牌到`/config/config.php`文件内的`iyuu.cn`对应的配置字段,保存。如图:
|
||||
![微信通知4.png][6]
|
||||
|
||||
|
||||
### 填写全局客户端
|
||||
打开`D:\IYUUAutoReseed\config\config.php`文件,如下图:
|
||||
![编辑配置1.png][7]
|
||||
上图红框内的是`transmission`的示例配置,绿框是`qBittorrent`的示例配置;
|
||||
IYUU自动辅种工具,目前支持这两种下载器,支持多盘位,辅种时全自动对应资源的下载目录。
|
||||
1,编辑`transmission`下载器
|
||||
`http://127.0.0.1:9091/transmission/rpc`是下载器的连接参数,你要修改的部分是`127.0.0.1:9091`改成你的IP与端口(本机使用无需修改),局域网内的机器请填写局域网IP与端口;远程使用请填写DDNS的远程连接域名与端口。
|
||||
username是用户名、password是密码。
|
||||
如果你没有用到`transmission`下载器,请把红框的内容都删除。
|
||||
#### 1,编辑`transmission`下载器
|
||||
`http://127.0.0.1:9091/transmission/rpc`是下载器的连接参数,你要修改的部分是`127.0.0.1:9091`改成你的IP与端口(本机使用IP无需修改,端口改成你的),局域网内的机器请填写局域网IP与端口;远程使用请填写DDNS的远程连接域名与端口。
|
||||
username是用户名、password是密码。(没有用户名和密码的都填写`null`)
|
||||
如果你没有用到`transmission`下载器,红框内不要做任何改动,也无需删除(脚本内会自动处理)。
|
||||
|
||||
2,编辑`qBittorrent`下载器
|
||||
方法与上一步相同,只需填写ip、端口、用户名、密码即可。如果您是windows下的qBittorrent,请参考下图打开`WEB用户界面`:
|
||||
![qb设置WEB用户界面.png][3]
|
||||
#### 2,编辑`qBittorrent`下载器
|
||||
方法与上一步相同,只需填写ip、端口、用户名、密码即可。如果您是windows下的qBittorrent,请打开`WEB用户界面`,设置如下图:
|
||||
![qb设置WEB用户界面.png][8]
|
||||
|
||||
因为我两个下载器都在用,编辑好后,如图:
|
||||
![编辑配置2.png][4]
|
||||
![编辑配置2.png][9]
|
||||
|
||||
### 填写各站秘钥passkey
|
||||
IYUU自动辅种:需要您配置各站的passkey(没有配置passkey的站点会自动跳过)。
|
||||
从各站点的控制面板,找到您的`秘钥`复制粘贴过来即可。
|
||||
IYUU自动辅种:需要您配置各站的passkey(目前支持40多个站点的自动辅种,没有配置passkey的站点会自动跳过)。
|
||||
从各站点的控制面板,找到您的`密钥`复制粘贴过来即可。
|
||||
配置好后如图:
|
||||
![编辑配置3.png][5]
|
||||
![编辑配置3.png][10]
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
## 第四步,重点讲解Ourbits站点的配置
|
||||
IYUU自动辅种工具、Ourbits双方达成合作,可以对使用接口的用户,实现认证。
|
||||
### 申请爱语飞飞微信通知token,新用户访问:http://iyuu.cn 申请!
|
||||
1.点击`开始使用`,出现二维码,用`微信扫码`
|
||||
![微信通知1.png][6]
|
||||
![微信通知2.png][7]
|
||||
![微信通知3.png][8]
|
||||
2.复制您的token令牌到`/app/config/config.php`文件内的`iyuu.cn`对应的配置字段,保存。如图:
|
||||
![微信通知4.png][9]
|
||||
|
||||
### 设置Ourbits:
|
||||
![编辑配置4.png][10]
|
||||
![编辑配置4.png][11]
|
||||
`passkey`,在你的控制面板 - 密钥
|
||||
`is_vip`,根据你的实际情况填写,因站点有下载种子的流控,如果你不在限制之列,可以`设置为1`
|
||||
`id`,为用户中心打开后,浏览器地址栏**http://xxxxx.xxx/userdetails.php?id=`46880`**等号=后面的几个数字,如图:
|
||||
![编辑配置6.png][11]
|
||||
![编辑配置6.png][12]
|
||||
|
||||
到此,配置文件编辑完毕,请记得保存。
|
||||
如果提示保存格式,请保存为UTF8(无BOM)格式。
|
||||
|
||||
------
|
||||
|
||||
## 群晖、铁威马、威联通等Linux环境
|
||||
----------
|
||||
|
||||
## 群晖、铁威马、威联通等Linux的php环境
|
||||
**群晖、铁威马、威联通自带php运行环境,非常简单。**
|
||||
经过上面步骤,其实已经完成了配置,只需要把脚本复制到设备内,用php命令运行脚本即可。
|
||||
|
||||
群晖php命令:`php`
|
||||
|
||||
威联通php命令:`/mnt/ext/opt/apache/bin/php`
|
||||
|
||||
威联通php命令: `/mnt/ext/opt/apache/bin/php`
|
||||
铁威马php命令:`php`
|
||||
|
||||
----------
|
||||
|
||||
## Windows安装PHP运行环境
|
||||
也可以去官方下载【https://www.php.net/downloads】,官方下载的记得开启`curl、fileinfo、mbstring`,这3个扩展。
|
||||
另外我打包了一份,下载地址:
|
||||
微云链接:https://share.weiyun.com/5EiXLfn 密码:ezsvnb
|
||||
也可以去官方下载【https://www.php.net/downloads】
|
||||
**特别提醒:官方下载的记得开启`curl、fileinfo、mbstring`,这3个扩展。**
|
||||
**特别提醒:官方下载的记得开启`curl、fileinfo、mbstring`,这3个扩展。**
|
||||
**特别提醒:官方下载的记得开启`curl、fileinfo、mbstring`,这3个扩展。**
|
||||
![php开启扩展.png][13]
|
||||
**特别提醒:官方下载的记得开启`curl、fileinfo、mbstring`,这3个扩展。**
|
||||
**特别提醒:官方下载的记得开启`curl、fileinfo、mbstring`,这3个扩展。**
|
||||
**特别提醒:官方下载的记得开启`curl、fileinfo、mbstring`,这3个扩展。**
|
||||
|
||||
**另外我打包了一份【扩展已开启】,下载地址:**
|
||||
!!!
|
||||
<a href="http://dawei.hk:81/php-7.4.2-nts-Win32-vc15-x86.zip" target="_blank"><h3><code>http://dawei.hk:81/php-7.4.2-nts-Win32-vc15-x86.zip</code></h3></a>
|
||||
<a href="http://dawei.hk:81/php-7.4.2-nts-Win32-vc15-x64.zip" target="_blank"><h3><code>http://dawei.hk:81/php-7.4.2-nts-Win32-vc15-x64.zip</code></h3></a>
|
||||
!!!
|
||||
|
||||
|
||||
----------
|
||||
|
||||
|
||||
链接:https://share.weiyun.com/5I13dek 密码:utcjsx
|
||||
链接:https://share.weiyun.com/57uYFrn 密码:gurkdc
|
||||
下载回来是一个ZIP压缩包,解压到`D:\IYUUAutoReseed\`目录内,文件结构如图:
|
||||
![编辑配置7.png][12]
|
||||
![编辑配置7.png][14]
|
||||
点击红框内`执行辅种`即可。
|
||||
如果你前期严格按照配置一步步操作,这里会正常显示跑动的辅种列表。正常如图:
|
||||
![编辑配置8.png][13]
|
||||
![编辑配置8.png][15]
|
||||
|
||||
|
||||
[1]: https://gitee.com/ledc/IYUUAutoReseed
|
||||
[2]: https://www.iyuu.cn/usr/uploads/2019/12/2720183833.png
|
||||
[3]: https://www.iyuu.cn/usr/uploads/2019/12/405587689.png
|
||||
[4]: https://www.iyuu.cn/usr/uploads/2019/12/441257656.png
|
||||
[5]: https://www.iyuu.cn/usr/uploads/2019/12/890327305.png
|
||||
[6]: https://www.iyuu.cn/usr/uploads/2019/12/2331433923.png
|
||||
[7]: https://www.iyuu.cn/usr/uploads/2019/12/3324442680.png
|
||||
[8]: https://www.iyuu.cn/usr/uploads/2019/12/3181272964.png
|
||||
[9]: https://www.iyuu.cn/usr/uploads/2019/12/3669828008.png
|
||||
[10]: https://www.iyuu.cn/usr/uploads/2019/12/3696916642.png
|
||||
[11]: https://www.iyuu.cn/usr/uploads/2019/12/1230288911.png
|
||||
[12]: https://www.iyuu.cn/usr/uploads/2019/12/3189986236.png
|
||||
[13]: https://www.iyuu.cn/usr/uploads/2019/12/2523845772.png
|
||||
[1]: https://gitee.com/ledc/IYUUAutoReseed
|
||||
[2]: https://www.iyuu.cn/usr/uploads/2020/02/3155906692.zip
|
||||
[3]: https://www.iyuu.cn/usr/uploads/2019/12/2331433923.png
|
||||
[4]: https://www.iyuu.cn/usr/uploads/2019/12/3324442680.png
|
||||
[5]: https://www.iyuu.cn/usr/uploads/2019/12/3181272964.png
|
||||
[6]: https://www.iyuu.cn/usr/uploads/2019/12/3669828008.png
|
||||
[7]: https://www.iyuu.cn/usr/uploads/2019/12/2720183833.png
|
||||
[8]: https://www.iyuu.cn/usr/uploads/2019/12/405587689.png
|
||||
[9]: https://www.iyuu.cn/usr/uploads/2019/12/441257656.png
|
||||
[10]: https://www.iyuu.cn/usr/uploads/2019/12/890327305.png
|
||||
[11]: https://www.iyuu.cn/usr/uploads/2019/12/3696916642.png
|
||||
[12]: https://www.iyuu.cn/usr/uploads/2019/12/1230288911.png
|
||||
[13]: https://www.iyuu.cn/usr/uploads/2019/12/3007415838.png
|
||||
[14]: https://www.iyuu.cn/usr/uploads/2019/12/3189986236.png
|
||||
[15]: https://www.iyuu.cn/usr/uploads/2019/12/2523845772.png
|
4
执行辅种.cmd
Normal file
4
执行辅种.cmd
Normal file
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
chcp 65001
|
||||
%cd%\php-7.4.2-nts-Win32-vc15-x86\php %cd%\iyuu.php
|
||||
pause
|
Reference in New Issue
Block a user