mirror of
https://gitee.com/ledc/IYUUAutoReseed
synced 2025-08-24 15:04:50 +00:00
Compare commits
53 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
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 |
9
.gitignore
vendored
9
.gitignore
vendored
@@ -1,9 +0,0 @@
|
||||
/torrent
|
||||
/config/config.php
|
||||
/config/sites.json
|
||||
/php-7.2.12-nts
|
||||
/*.bat
|
||||
/*.sh
|
||||
.idea
|
||||
.php_cs.cache
|
||||
vendor
|
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,20 +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;
|
||||
@@ -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());
|
||||
@@ -301,10 +295,56 @@ class qBittorrent implements AbstractClientInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @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
|
||||
@@ -139,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->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;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -175,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);
|
||||
}
|
||||
@@ -191,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);
|
||||
}
|
||||
@@ -207,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);
|
||||
}
|
||||
@@ -223,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);
|
||||
}
|
||||
@@ -358,6 +332,16 @@ class TransmissionRPC implements AbstractClientInterface
|
||||
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
|
||||
* @param extra options Optional extra torrent options
|
||||
*/
|
||||
public function add($torrent_location, $save_path = '', $extra_options = array())
|
||||
{
|
||||
return $this->add_file($torrent_location, $save_path, $extra_options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a torrent using the raw torrent data
|
||||
*
|
||||
@@ -377,16 +361,6 @@ class TransmissionRPC implements AbstractClientInterface
|
||||
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
|
||||
* @param extra options Optional extra torrent options
|
||||
*/
|
||||
public function add($torrent_location, $save_path = '', $extra_options = array())
|
||||
{
|
||||
return $this->add_file($torrent_location, $save_path, $extra_options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove torrent from transmission
|
||||
*
|
||||
@@ -395,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);
|
||||
@@ -594,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
|
||||
}
|
||||
@@ -603,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())
|
||||
@@ -694,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);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -767,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;
|
||||
}
|
||||
}
|
@@ -149,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);
|
||||
@@ -343,24 +343,6 @@ function wlog($data='', $name = '', $path = '')
|
||||
@fclose($file_pointer);
|
||||
return $worldsnum;
|
||||
}
|
||||
/**
|
||||
* transmission过滤函数,只保留正常做种
|
||||
*/
|
||||
function filterStatus($v)
|
||||
{
|
||||
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;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//PHP stdClass Object转array
|
||||
function object_array($array)
|
||||
@@ -439,7 +421,7 @@ function ShowTableSites($dir = 'Protocols', $filter = array())
|
||||
break;
|
||||
}
|
||||
$data = [];
|
||||
$i = $j = $k = 0;
|
||||
$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, '/');
|
||||
@@ -466,3 +448,12 @@ function ShowTableSites($dir = 'Protocols', $filter = array())
|
||||
$table->setRows($data);
|
||||
echo($table->render());
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否win平台
|
||||
* @return bool
|
||||
*/
|
||||
function isWin()
|
||||
{
|
||||
return (DIRECTORY_SEPARATOR == '\\') ? true : false;
|
||||
}
|
@@ -1,4 +1,13 @@
|
||||
{
|
||||
"name": "ledccn/iyuuautoreseed",
|
||||
"description": "IYUU自动辅种工具,目前能对国内大部分的PT站点自动辅种,支持下载器集群,支持多盘位,支持多下载目录,支持远程连接等。",
|
||||
"keywords": ["iyuu", "reseed"],
|
||||
"homepage": "https://github.com/ledccn/IYUUAutoReseed",
|
||||
"authors": [
|
||||
{
|
||||
"name": "David"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
|
@@ -6,8 +6,8 @@
|
||||
* 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/
|
||||
* IYUU自动下载种子--之RSS订阅使用教程 https://www.iyuu.cn/archives/349/
|
||||
* IYUU自动转移做种客户端--使用教程 https://www.iyuu.cn/archives/351/
|
||||
脚本仓库下载法:
|
||||
git clone https://github.com/ledccn/IYUUAutoReseed
|
||||
cd IYUUAutoReseed
|
||||
@@ -33,7 +33,8 @@ return array(
|
||||
'host' => 'http://127.0.0.1:9091/transmission/rpc', // 警告!注意:transmission/rpc这段别动,你只需要修改 127.0.0.1:9091
|
||||
'username' => '',
|
||||
'password' => '',
|
||||
#'move' => 0, // 0不移动,1移动并辅种,2移动仅辅种自身,3未定义,4未定义
|
||||
'BT_backup' => '/var/lib/transmission/torrents', // 移动做种:如果脚本与当前客户端不在一台机器,必须配置
|
||||
'move' => 0, // 0不移动,1移动并辅种,2移动仅辅种自身,3未定义
|
||||
),
|
||||
# 结束
|
||||
# 开始
|
||||
@@ -42,16 +43,21 @@ return array(
|
||||
'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' => 0, // 0保持不变,1减,2加,3替换
|
||||
'path' =>array(
|
||||
// 当前路径 => 目标路径
|
||||
'/downloads' => '/volume1',
|
||||
),
|
||||
'skip_check' => 0, //转移成功,跳校验
|
||||
'delete_torrent' => 0, //转移成功,删除当前做种
|
||||
),
|
||||
'workingMode' => 0,
|
||||
'watch' => '/volume1/downloads',
|
||||
@@ -128,7 +134,6 @@ return array(
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
'id' => 0, // 用户ID
|
||||
'is_vip' => 0, // 是否具有VIP或特殊权限?0 普通,1 VIP
|
||||
'workingMode' => 0,
|
||||
'watch' => '/root/downloads',
|
||||
'filter' => array(
|
||||
@@ -401,13 +406,6 @@ return array(
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
),
|
||||
// cnscg 序号:41 圣城
|
||||
'cnscg' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
'cookie' => '',
|
||||
// 如果需要自动辅种,必须配置
|
||||
'passkey' => '',
|
||||
),
|
||||
// nicept 序号:42 老师
|
||||
'nicept' => array(
|
||||
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
|
||||
@@ -436,6 +434,34 @@ return array(
|
||||
// 如果需要自动辅种,必须配置
|
||||
'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' => '',
|
||||
),
|
||||
|
||||
// 配置文件结束
|
||||
);
|
||||
|
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}
|
||||
```
|
||||
|
6
docker/build.sh
Normal file
6
docker/build.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
curl -o ./IYUUAutoReseed.zip http://api.iyuu.cn/IYUUAutoReseed.zip
|
||||
unzip -o ./IYUUAutoReseed.zip -d /root
|
||||
rm ./IYUUAutoReseed.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
|
2
docker/iyuu.sh
Normal file
2
docker/iyuu.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
docker exec -it IYUUAutoReseed php iyuu.php
|
10
init.php
10
init.php
@@ -32,6 +32,13 @@ 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;
|
||||
// 读取支持列表
|
||||
@@ -40,9 +47,10 @@ if (is_file(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';
|
||||
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") {
|
||||
|
3
iyuu.php
3
iyuu.php
@@ -4,6 +4,5 @@ use IYUU\AutoReseed;
|
||||
|
||||
echo microtime(true).' IYUU自动辅种正在初始化...'.PHP_EOL;
|
||||
AutoReseed::init();
|
||||
$hashArray = AutoReseed::get();
|
||||
AutoReseed::call($hashArray);
|
||||
AutoReseed::call();
|
||||
exit(0);
|
||||
|
23
readme.md
23
readme.md
@@ -29,7 +29,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。
|
||||
学校、杜比、家园、天空、朋友、馒头、萌猫、我堡、猫站、铂金家、烧包、北洋、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运行环境的所有平台,例如:Linux、Windows、MacOS!
|
||||
@@ -42,15 +42,16 @@ IYUU自动辅种工具(英文名:IYUUAutoReseed),是一款PHP语言编
|
||||
## 下载源码
|
||||
- github仓库:https://github.com/ledccn/IYUUAutoReseed
|
||||
- 码云仓库:https://gitee.com/ledc/IYUUAutoReseed
|
||||
- 仓库下载的源码,缺少vendor目录,可以去群内下载;或者通过安装php包管理器composer,进到源码目录内执行命令:`composer install`,会自动帮你安装vendor目录。
|
||||
|
||||
|
||||
## 使用方法
|
||||
详见Wiki:
|
||||
https://gitee.com/ledc/IYUUAutoReseed/wikis
|
||||
|
||||
https://gitee.com/ledc/IYUUAutoReseed/tree/master/wiki
|
||||
|
||||
## 接口文档
|
||||
http://api.iyuu.cn/docs.php?type=expand
|
||||
## 接口开发文档
|
||||
http://api.iyuu.cn/docs.php
|
||||
|
||||
|
||||
## 需求提交/错误反馈
|
||||
@@ -111,7 +112,21 @@ http://api.iyuu.cn/docs.php?type=expand
|
||||
| 寒山先生 | ¥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 |
|
||||
|
||||
|
||||
补充说明:
|
||||
|
@@ -1,4 +1,4 @@
|
||||
IYUU新推出RSS订阅功能!
|
||||
# IYUU新推出RSS订阅功能!
|
||||
## 功能
|
||||
自动订阅站点的新种,自动添加下载任务,支持大小过滤。
|
||||
|
||||
@@ -167,4 +167,11 @@ IYUU新推出RSS订阅功能!
|
||||
),
|
||||
```
|
||||
|
||||
**总结:以上概况讲解了RSS订阅下载、下载免费种时的各种配置的情况,请仔细阅读务必理解!**
|
||||
## RSS订阅脚本名字:`rss.php`
|
||||
配置好后,执行命令:`php rss.php`,即可查看支持RSS的站点列表。
|
||||
![IYUU1.png][1]
|
||||
**总结:以上详细讲解了RSS订阅下载、下载免费种时的各种配置的情况,请仔细阅读务必理解!**
|
||||
其他站点设置RSS订阅,同样道理
|
||||
|
||||
|
||||
[1]: https://www.iyuu.cn/usr/uploads/2020/01/3194879294.png
|
@@ -2,7 +2,7 @@
|
||||
### 第一种:下载完整的发行版
|
||||
**github:**[GITHUB仓库 发行版][1]
|
||||
**gitee:**[码云仓库 发行版][2]
|
||||
下载**`Release.zip`**后缀的压缩包,解压缩后即可配置适用。
|
||||
下载**`Release.zip`**后缀的压缩包,解压缩后即可配置使用。
|
||||
|
||||
### 第二种:git clone下载源码
|
||||
**拉取源码命令,下面两个仓库都可以:**
|
||||
|
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的头上。
|
@@ -79,6 +79,10 @@
|
||||
|
||||
控制面板\时钟和区域\区域\管理\更改系统区域设置\勾选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]
|
||||
|
10
wiki/开发计划.md
10
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日 |
|
||||
| 自动转移客户端 | 已完成 | 2020年1月27日 | 2020年1月29日 |
|
||||
| WEB页面生成配置 | 暂未开始 | | |
|
||||
| 脚本docker容器化 | 暂未开始 | | |
|
||||
| 做种客户端本地转移 | 已完成 | 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日 |
|
||||
| 浏览器插件 | 暂未开始 | | |
|
||||
| 合集自动拆包辅种 | 暂未开始 | | |
|
||||
|
@@ -43,5 +43,4 @@
|
||||
| ttg-听听歌 | 2020年1月19日12:00:00 | 已完成 |
|
||||
| upxin | 2020年1月19日12:00:00 | 已完成 |
|
||||
| yingk-映客 | 2020年1月19日12:00:00 | 已完成 |
|
||||
| ziyuan-资源 | | |
|
||||
|
||||
|
16
wiki/更新历史.md
16
wiki/更新历史.md
@@ -1,3 +1,19 @@
|
||||
### 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站点辅种
|
||||
|
@@ -1,102 +1,125 @@
|
||||
以下教程以windows为基础进行讲解,通用威联通、群晖、铁威马等Linux系统。
|
||||
博客链接:https://www.iyuu.cn/archives/324/
|
||||
|
||||
# 重要提示:请先完整阅读完再动手操作!请先完整阅读完再动手操作!
|
||||
|
||||
## 第一步 下载压缩包
|
||||
从[码云仓库][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令牌到`/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/5I13dek 密码:utcjsx
|
||||
也可以去官方下载【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
|
2
执行辅种.cmd
2
执行辅种.cmd
@@ -1,4 +1,4 @@
|
||||
@echo off
|
||||
chcp 65001
|
||||
%cd%\php-7.2.12-nts\php %cd%\iyuu.php
|
||||
%cd%\php-7.4.2-nts-Win32-vc15-x86\php %cd%\iyuu.php
|
||||
pause
|
Reference in New Issue
Block a user