Compare commits

...

14 Commits

Author SHA1 Message Date
iyuu.cn
afe1a863ac 移除Arm64v8.Dockerfile 2020-07-30 21:00:10 +08:00
iyuu.cn
2a7947b9fa bash+ 2020-07-30 15:19:18 +08:00
iyuu.cn
fa6a38b7b3 移除swoft/alphp:base 2020-07-30 14:44:35 +08:00
iyuu.cn
02eb245ae0 更新Arm64v8.Dockerfile,测试自动编译。 2020-07-30 14:34:14 +08:00
iyuu.cn
3fc4e14b93 优化docker的Readme.md注释 2020-07-29 19:12:16 +08:00
iyuu.cn
6a5d375044 修复编码错误。 2020-07-29 16:00:43 +08:00
iyuu.cn
da0cb81ab2 修复笔误。 2020-07-29 15:28:48 +08:00
iyuu.cn
41ebed71c7 本地编译更改基础镜像为arm64v8/alpine:3.12,并使用国内镜像源 2020-07-29 15:26:12 +08:00
iyuu.cn
05426489f0 新增Docker自动Builds文件Arm64v8.Dockerfile; 2020-07-29 15:25:07 +08:00
iyuu.cn
8489b07b35 精简和优化readme中相关项目说明 2020-07-29 15:20:22 +08:00
iyuu.cn
3e28685731 Dockerfile使用官方源 2020-07-29 03:02:53 +08:00
iyuu.cn
2d5ab5ae9b 新增Dockerfile 2020-07-29 02:14:37 +08:00
iyuu.cn
fa61ad21e0 优化hdsky下载url后的显示效果。 2020-07-29 00:37:23 +08:00
iyuu.cn
1f95e62d95 v1.10.0 2020-07-29 00:32:47 +08:00
6 changed files with 136 additions and 30 deletions

105
Dockerfile Normal file
View File

@@ -0,0 +1,105 @@
FROM swoft/alphp:base
#FROM swoft/alphp:cli
#FROM alpine:latest
LABEL maintainer="david <367013672@qq.com>" version="1.0"
##
# ---------- env settings ----------
##
# --build-arg timezone=Asia/Shanghai
ARG timezone
# prod pre test dev
ARG app_env=prod
# default use www-data user
# ARG add_user=www-data
ENV APP_ENV=${app_env:-"prod"} \
TIMEZONE=${timezone:-"Asia/Shanghai"}
##
# ---------- building ----------
##
RUN set -ex \
# change apk source repo
# && sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/' /etc/apk/repositories \
&& apk update \
&& apk add --no-cache \
# Install base packages ('ca-certificates' will install 'nghttp2-libs')
# ca-certificates \
# curl \
# tar \
# xz \
# libressl \
# openssh \
# openssl \
git \
tzdata \
# pcre \
# install php7 and some extensions
php7 \
# php7-common \
# php7-bcmath \
php7-curl \
# php7-ctype \
php7-dom \
# php7-fileinfo \
# php7-gettext \
# php7-gd \
# php7-iconv \
# php7-imagick \
php7-json \
php7-mbstring \
#php7-mongodb \
# php7-mysqlnd \
# php7-openssl \
# php7-opcache \
# php7-pdo \
# php7-pdo_mysql \
# php7-pdo_sqlite \
# php7-phar \
# php7-posix \
# php7-redis \
php7-simplexml \
# php7-sockets \
# php7-sodium \
# php7-sqlite \
# php7-session \
# php7-sysvshm \
# php7-sysvmsg \
# php7-sysvsem \
# php7-tokenizer \
php7-zip \
# php7-zlib \
php7-xml \
&& git clone https://gitee.com/ledc/IYUUAutoReseed.git /var/www \
&& cp /var/www/config/config.sample.php /var/www/config/config.php \
&& ln -sf /var/www/config/config.php /config.php \
&& apk del --purge *-dev \
&& rm -rf /var/cache/apk/* /tmp/* /usr/share/man /usr/share/php7 \
# ---------- some config,clear work ----------
&& cd /etc/php7 \
# - config PHP
&& { \
echo "upload_max_filesize=100M"; \
echo "post_max_size=108M"; \
echo "memory_limit=1024M"; \
echo "date.timezone=${TIMEZONE}"; \
} | tee conf.d/99-overrides.ini \
# - config timezone
&& ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \
&& echo "${TIMEZONE}" > /etc/timezone \
# ---------- some config work ----------
# - ensure 'www-data' user exists(82 is the standard uid/gid for "www-data" in Alpine)
# && addgroup -g 82 -S ${add_user} \
# && adduser -u 82 -D -S -G ${add_user} ${add_user} \
# # - create user dir
# && mkdir -p /data \
# && chown -R ${add_user}:${add_user} /data \
&& echo -e "\033[42;37m Build Completed :).\033[0m\n"
EXPOSE 9000
# VOLUME ["/var/www", "/data"]
WORKDIR /var/www

View File

@@ -13,7 +13,7 @@ use IYUU\Library\Table;
class AutoReseed class AutoReseed
{ {
// 版本号 // 版本号
const VER = '1.9.9'; const VER = '1.10.1';
// RPC连接 // RPC连接
private static $links = []; private static $links = [];
// 客户端配置 // 客户端配置
@@ -486,7 +486,7 @@ class AutoReseed
sleep(1); sleep(1);
} while (--$t > 0); } while (--$t > 0);
ff($siteName. '站点,辅种时触发第一次下载提示!'); ff($siteName. '站点,辅种时触发第一次下载提示!');
self::$noReseed[] = 'hdchina'; self::$noReseed[] = $siteName;
$reseedPass = true; $reseedPass = true;
} }
if (strpos($url, '系统检测到过多的种子下载请求') != false) { if (strpos($url, '系统检测到过多的种子下载请求') != false) {
@@ -570,23 +570,16 @@ class AutoReseed
$url = download($_url, $cookie, $userAgent); $url = download($_url, $cookie, $userAgent);
if (strpos($url, '第一次下载提示') != false) { if (strpos($url, '第一次下载提示') != false) {
echo "当前站点触发第一次下载提示,已加入排除列表".PHP_EOL; echo "当前站点触发第一次下载提示,已加入排除列表".PHP_EOL;
echo "请进入瓷器详情页,点右上角蓝色框:下载种子成功后更新cookie".PHP_EOL; echo "请进入种子详情页下载种子成功后更新cookie".PHP_EOL;
$t = 30; $t = 30;
do { do {
echo microtime(true)." 请进入瓷器详情页,点右上角蓝色框:下载种子成功后更新cookie{$t}秒后继续...".PHP_EOL; echo microtime(true)." 请进入种子详情页下载种子成功后更新cookie{$t}秒后继续...".PHP_EOL;
sleep(1); sleep(1);
} while (--$t > 0); } while (--$t > 0);
ff($siteName. '站点,辅种时触发第一次下载提示!'); ff($siteName. '站点,辅种时触发第一次下载提示!');
self::$noReseed[] = $siteName; self::$noReseed[] = $siteName;
$reseedPass = true; $reseedPass = true;
} }
if (strpos($url, '系统检测到过多的种子下载请求') != false) {
echo "当前站点触发人机验证,已加入排除列表".PHP_EOL;
ff($siteName. '站点,辅种时触发人机验证!');
$configALL[$siteName]['limit'] = 1;
self::$noReseed[] = $siteName;
$reseedPass = true;
}
break; break;
default: default:
// 默认站点推送给下载器种子URL链接 // 默认站点推送给下载器种子URL链接
@@ -605,6 +598,7 @@ class AutoReseed
// 按站点规范日志内容 // 按站点规范日志内容
switch ($siteName) { switch ($siteName) {
case 'hdchina': case 'hdchina':
case 'hdsky':
$url = $details_url; $url = $details_url;
break; break;
case 'hdcity': case 'hdcity':
@@ -613,7 +607,6 @@ class AutoReseed
default: default:
break; break;
} }
// 添加成功的种子以infohash为文件名写入缓存
$log = 'clients_'.$k.PHP_EOL.$downloadDir.PHP_EOL.$url.PHP_EOL.PHP_EOL; $log = 'clients_'.$k.PHP_EOL.$downloadDir.PHP_EOL.$url.PHP_EOL.PHP_EOL;
if ($ret) { if ($ret) {
// 成功的种子 // 成功的种子
@@ -625,7 +618,7 @@ class AutoReseed
$configALL[$siteName]['limitRule']['time'] = time(); $configALL[$siteName]['limitRule']['time'] = time();
} }
} }
wlog($log, $value['info_hash'], self::$cacheHash); wlog($log, $value['info_hash'], self::$cacheHash); // 添加成功的种子以infohash为文件名写入缓存
wlog($log, 'reseedSuccess'); wlog($log, 'reseedSuccess');
// 成功累加 // 成功累加
self::$wechatMsg['reseedSuccess']++; self::$wechatMsg['reseedSuccess']++;
@@ -849,7 +842,7 @@ class AutoReseed
} }
} else { } else {
//同时设置过滤器、选择器 //同时设置过滤器、选择器
if (\is_array($path_selector) && \is_array($path_filter)) { if (\is_array($path_filter) && \is_array($path_selector)) {
//先过滤器 //先过滤器
foreach ($path_filter as $pathName) { foreach ($path_filter as $pathName) {
if (strpos($path, $pathName)===0) { if (strpos($path, $pathName)===0) {

View File

@@ -1,6 +1,7 @@
FROM swoft/alphp:base FROM swoft/alphp:base
#FROM swoft/alphp:cli #FROM swoft/alphp:cli
#FROM alpine:latest #FROM alpine:latest
LABEL maintainer="david <367013672@qq.com>" version="1.0" LABEL maintainer="david <367013672@qq.com>" version="1.0"
## ##

View File

@@ -1,12 +1,16 @@
FROM arm64v8/alpine # FROM arm64v8/alpine
#FROM arm64v8/alpine:latest # FROM arm64v8/alpine:latest
#FROM arm64v8/alpine:3.12 FROM arm64v8/alpine:3.12
ENV TZ Asia/Shanghai ENV TZ Asia/Shanghai
ENV cron="0 9 * * 0" ENV cron="0 9 * * 0"
RUN set -ex \ RUN set -ex \
&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/' /etc/apk/repositories \ && sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/' /etc/apk/repositories \
# && sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.cn/' /etc/apk/repositories \ # && sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.cn/' /etc/apk/repositories \
&& apk --update add --no-cache \ && apk update \
&& apk add --no-cache \
tzdata \ tzdata \
php7 php7-curl php7-json php7-mbstring php7-dom php7-simplexml php7-xml php7-zip \ php7 php7-curl php7-json php7-mbstring php7-dom php7-simplexml php7-xml php7-zip \
git \ git \

View File

@@ -38,12 +38,12 @@ iyuucn/iyuuautoreseed:latest
**命令解释** **命令解释**
| 参数 | 解释 | | 参数 | 解释 |
| --------- | ------------------------------------------- | | ----------- | ------------------------------------------------------------ |
| --name | 容器名字 | | `--name` | 容器名字 |
| -e | 定时任务执行时间 | | `-e` | 环境变量,定时任务执行时间 |
| -v | 本地目录或文件:容器目录文件,资源挂载到容器 | | `-v` | 本地目录或文件:容器目录文件,资源挂载到容器<br />请把你的配置文件放在/root/config.php会把你的配置映射进容器内。 |
| --restart | 启动模式 | | `--restart` | 启动模式 |
------ ------

View File

@@ -77,12 +77,15 @@ IYUU自动辅种工具英文名IYUUAutoReseed是一款PHP语言编
## 相关项目 ## 相关项目
- IYUU GUI地址https://github.com/Rhilip/IYUU-GUI简介这是一个基于IYUU提供的API产生的一个可视化操作项目。 目的是为了降低直接上手PHP版IYUUAutoReseed的难度。
- IYUU-Fly地址https://github.com/PlexPt/iyuu-fly简介带GUI的iyuu自动辅种程序。 | 项目名| 简介|
- goreseed地址https://github.com/gaoluhua99/goreseed简介golang编写调用IYUU接口的CLI辅种程序。 | - | --- |
- IYUUAutoReseed-web地址https://github.com/goveeta/IYUUAutoReseed-web | [IYUU GUI](https://github.com/Rhilip/IYUU-GUI) | 这是一个基于IYUU提供的API产生一个可视化操作项目。目的是为了降低直接上手PHP版IYUUAutoReseed的困难。 |
- AutoPT地址https://github.com/lysssssss/AutoPT简介此程序用于自动下载PT免费种子并自动辅种和一体化管理。开发目的为了释放双手专注观影 | [IYUU-Fly](https://github.com/PlexPt/iyuu-fly) | 带GUI的iyuu自动辅种程序。 |
- flexget_qbittorrent_mod地址https://github.com/IvonWei/flexget_qbittorrent_mod简介Flexget qBittorrent插件实现全自动化辅种、删种、免费种筛选、签到等。 | [goreseed](https://github.com/gaoluhua99/goreseed) | golang编写调用IYUU接口的CLI辅种程序。 |
| [IYUUAutoReseed-web](https://github.com/goveeta/IYUUAutoReseed-web) | |
| [AutoPT](https://github.com/lyssssssss/AutoPT) | 此程序用于自动下载PT免费种子并自动辅种和一体化管理。开发目的为了释放双手专注观影 |
| [flexget_qbittorrent_mod](https://github.com/IvonWei/flexget_qbittorrent_mod) | Flexget qBittorrent插件实现全自动化辅种删除种免费种筛选签到等。|
## 需求提交/错误反馈 ## 需求提交/错误反馈