Compare commits

...

180 Commits

Author SHA1 Message Date
iyuu.cn
c79d5e4592 v1.10.2版本以后的docker,每5小时会自动拉取最新代码;从此,您只需要看公告更新配置就行啦。 2020-07-31 09:34:18 +08:00
iyuu.cn
c9fb5c6a6a 更改Dockerfile,每5小时自动拉取最新代码 2020-07-31 09:17:57 +08:00
iyuu.cn
a744f5e785 更改本地ARM平台打包标签为:iyuu:arm64v8 2020-07-31 07:59:55 +08:00
iyuu.cn
84394c3a71 精简配置,移除容易迷惑人的项目 2020-07-31 07:52:00 +08:00
iyuu.cn
fd61ee86a1 新增.dockerignore,排除编译不必要的文件 2020-07-31 07:47:11 +08:00
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
iyuu.cn
a84b193d14 调整hdsky流控参数20/20,适配天空辅种。 2020-07-29 00:29:54 +08:00
iyuu.cn
e2dddfdead 新增AMD64平台docker构建脚本 2020-07-28 08:33:40 +08:00
iyuu.cn
f78e9c737c 新增Docker构建amd64镜像 2020-07-28 06:49:26 +08:00
iyuu.cn
8813afbd73 新增docker镜像Arm64v8 2020-07-28 03:27:59 +08:00
iyuu.cn
8b1bd9cdb5 fix 2020-07-25 20:37:57 +08:00
iyuu.cn
5418c02227 修复缺少isset($configALL['notify_on_change'])判断警告 2020-07-24 16:03:59 +08:00
iyuu.cn
a9d9fb637d 当配置不存在时,生成配置后再延时提示。 2020-07-24 14:01:03 +08:00
iyuu.cn
4247457cb6 更新readme.md相关项目 2020-07-24 13:27:34 +08:00
iyuu.cn
0047450161 更新readme.md相关项目;修改微信通知支持条件触发:有变化才发送通知(辅种成功 + 失败 > 0)。 2020-07-24 13:16:24 +08:00
iyuu.cn
15f9905004 合并hxsf提交,修改buile.sh 2020-07-24 13:07:05 +08:00
David
63b2bfc2bc Merge pull request #17 from hxsf/master
some features
2020-07-24 13:50:37 +08:00
hxsf
c5c2feb9d3 add notify_on_change feature 2020-07-24 13:39:22 +08:00
hxsf
6c06d9fb6a add new DockerFile and docker-compose example 2020-07-24 13:36:33 +08:00
iyuu.cn
6578397ee3 更新相关项目4个。 2020-07-23 19:53:01 +08:00
iyuu.cn
29c2e43405 首次运行生成config.php;提高瓷器、城市兼容性。 2020-07-23 18:47:06 +08:00
iyuu.cn
18cdd7abed 新增pthome流控参数 2020-07-22 21:21:59 +08:00
iyuu.cn
4fbf795811 增强客户端空密码检查 2020-07-22 03:28:42 +08:00
iyuu.cn
88ebc12ce5 微信报表新增失败详情提示 2020-07-21 19:42:17 +08:00
iyuu.cn
08b4b58083 新增hddolby流控参数 2020-07-21 19:24:04 +08:00
iyuu.cn
ca02231431 加入github徽章 2020-07-21 16:43:21 +08:00
iyuu.cn
7d638eba40 新增hdhome流控参数 2020-07-19 17:20:27 +08:00
iyuu.cn
c35c23583c 新增Ourbits、SSD、hdchina、hdsky、moecat、pt等站点的流控规则 2020-07-18 14:34:07 +08:00
iyuu.cn
b2b9000a86 优化代码结构 2020-07-17 23:02:21 +08:00
iyuu.cn
b80a5b89cc 更新Readme.md 2020-07-17 20:39:45 +08:00
iyuu.cn
c2e5b4d00b 新增移动做种微信报告 2020-07-17 19:55:53 +08:00
iyuu.cn
207320ede7 fix 2020-07-16 20:59:41 +08:00
iyuu.cn
6e1653fc1e fix 2020-07-14 16:44:28 +08:00
iyuu.cn
32ec80d552 提高对旧配置的兼容性 2020-07-14 02:13:20 +08:00
iyuu.cn
2b989f9e0e 新增瓷器、城市cookie过期微信通知 2020-07-13 10:19:36 +08:00
iyuu.cn
ff16781da9 fix 2020-07-13 08:47:00 +08:00
iyuu.cn
6a01b492ce 更新公告栏 2020-07-13 07:58:39 +08:00
iyuu.cn
de41bc0131 1.优化App.Api.Sites接口带版本号请求;2.新增异步间隔流控算法:各站独立、执行时间最优;3.config.sample.php各站点新增url_replace、url_join、limitRule参数。 2020-07-13 07:32:15 +08:00
iyuu.cn
6b83e9081b fix:优化代码 2020-07-12 21:29:41 +08:00
iyuu.cn
87f06ec5c4 接口域名部署SSL证书,支持双协议http/https。如:https://api.iyuu.cn 2020-07-12 19:39:19 +08:00
iyuu.cn
8a051d4d1f fix:优化转移做种时过滤器、选择器提示顺序。 2020-07-11 20:39:09 +08:00
iyuu.cn
0e32e625a4 新增功能:转移过滤器、选择器;可以只转移指定路径的种子,也可以排除指令路径的种子,按需转移。 2020-07-11 18:09:04 +08:00
iyuu.cn
a09dacbd20 优化微信通知提示 2020-07-11 02:46:59 +08:00
iyuu.cn
e3a9c32174 微信通知增加辅种缓存位置提示。 2020-07-10 19:33:51 +08:00
iyuu.cn
c8a94bfcff 优化代码结构,美化微信通知消息,删除多余的运行提示信息等 2020-07-10 19:17:12 +08:00
iyuu.cn
fd87d07539 更新md文档 2020-07-03 17:20:25 +08:00
iyuu.cn
df7100e4e9 更新QQ群信息:859882209、931954050 2020-07-03 17:19:51 +08:00
iyuu.cn
44f5b82650 新增HDfans站点 2020-07-03 13:01:03 +08:00
iyuu.cn
f5a33843e6 v1.8.3 2020-06-18 08:45:40 +08:00
iyuu.cn
7428144aa8 移除SSD站点辅种计数器。 2020-06-18 08:44:57 +08:00
iyuu.cn
cc325dc128 删除无用.cmd批处理 2020-06-10 23:09:20 +08:00
iyuu.cn
3d675ed4bd qBittorrent下载器增加root_folder配置项:是否创建子文件夹 2020-06-10 10:31:40 +08:00
iyuu.cn
eabb51c54a fix 2020-06-01 21:51:48 +08:00
iyuu.cn
1e1a7bfc59 $configALL[$siteName]['count'] 初始化。 2020-06-01 21:48:38 +08:00
iyuu.cn
005788827d SSD加入辅种计数器(限制每次辅种10个),降低初次辅种过多ban禁IP的可能性。 2020-06-01 21:45:57 +08:00
iyuu.cn
ffb600c334 新增上报错误种子403状态码,例如:兼容杜比等站已删除种子返回403状态码的情况。 2020-05-18 12:52:57 +08:00
iyuu.cn
290bfbe5c9 优化build.sh编译脚本 2020-05-12 18:41:52 +08:00
iyuu.cn
6ecf4f1d54 更新README.MD 2020-05-06 16:37:54 +08:00
iyuu.cn
c809e8d052 v1.7.9 2020-05-06 12:38:27 +08:00
iyuu.cn
8d7dffbf3d 新增站点:海胆haidan 2020-05-06 12:37:43 +08:00
iyuu.cn
cc50804b40 优化URL获取的代码结构 2020-05-01 09:43:35 +08:00
iyuu.cn
4444aec4fb v1.7.8 2020-04-26 22:15:06 +08:00
iyuu.cn
68e128e5cd 小钢炮安装脚本添加/BT_backup目录挂载至docker 2020-04-26 22:14:14 +08:00
iyuu.cn
ec7032698d 更改文件名与Readme.md 2020-04-17 11:57:06 +08:00
iyuu.cn
5308c691b6 更新Readme.md 2020-04-11 13:59:04 +08:00
iyuu.cn
c7f4859cb7 新增支持站点伊甸园hdbd。 2020-04-11 10:16:25 +08:00
iyuu.cn
dc651174b8 v1.7.6 2020-04-07 23:19:28 +08:00
iyuu.cn
a95e579cf6 v1.7.6 2020-04-07 23:00:29 +08:00
iyuu.cn
4811937f42 优化注释 2020-04-06 15:03:19 +08:00
iyuu.cn
f9674c1898 微信报表,增加脚本版本号显示 2020-04-06 15:03:04 +08:00
iyuu.cn
2fdacc6936 更新教程 2020-04-06 15:02:06 +08:00
iyuu.cn
a2034f2840 新增合作站点MoeCat 2020-04-03 22:27:08 +08:00
iyuu.cn
4894464fdd 优化部分php环境CURLOPT_SSL_VERIFYHOST参数设置为false后,卡顿问题。 2020-04-03 21:03:58 +08:00
iyuu.cn
c90acbec6c 路径转换方法:提高替换模式的兼容性。 2020-04-03 12:19:03 +08:00
iyuu.cn
c4a8cef4ce 修改build.sh脚本,新增小钢炮专用脚本 2020-03-27 14:59:26 +08:00
iyuu.cn
cc7eb9b06a 添加、修改教程。 2020-03-27 14:58:41 +08:00
iyuu.cn
ea3f3deaa8 更新小钢炮docker脚本环境构建教程,新增小钢炮专用创建脚本。 2020-03-27 14:23:38 +08:00
iyuu.cn
44c0bcdeb4 没用$path == $key判断,是为了提高兼容性 2020-03-27 11:41:10 +08:00
iyuu.cn
d015cd56a6 fix 2020-03-26 23:49:56 +08:00
iyuu.cn
4cf1222b37 注释curl证书验证,本设置会引起部分站点的https访问失败,返回Empty reply from server错误 2020-03-26 18:31:08 +08:00
iyuu.cn
b5f4537df7 新增站点HDRoute 2020-03-25 23:49:17 +08:00
iyuu.cn
1e428a04b7 优化精简路径转换返回 2020-03-25 19:20:35 +08:00
iyuu.cn
4c7fd2cf3d 更新readme.md接口说明的部分 2020-03-25 19:02:13 +08:00
iyuu.cn
43b8bc050b 精简示例配置 2020-03-25 18:49:24 +08:00
iyuu.cn
1c1ecd33b8 提示当前脚本路径。 2020-03-25 17:44:56 +08:00
iyuu.cn
e201505dca 优化git_pull.sh脚本:自动拉取最新代码,然后执行辅种脚本。 2020-03-25 13:49:58 +08:00
iyuu.cn
e02d32b129 v1.7.1 2020-03-25 12:43:09 +08:00
iyuu.cn
01a9b71e9f 为避免多php版本带来困扰,cmd批处理内php采用环境变量调用。 2020-03-25 12:31:30 +08:00
iyuu.cn
f89b5f7325 v1.7.0 2020-03-23 13:19:45 +08:00
iyuu.cn
5880f563e8 增加通用备份脚本,可以添加进计划任务。 2020-03-23 13:05:03 +08:00
iyuu.cn
61eb8f69c9 简化辅种输出。 2020-03-22 11:29:47 +08:00
iyuu.cn
b4ca455a75 优化输出提示,未填写passkey的站点自动跳过,不提示。 2020-03-22 11:24:52 +08:00
iyuu.cn
02205e6ce3 修复transmission往qBittorrent转移种子,错误的问题。 2020-03-21 19:33:50 +08:00
iyuu.cn
818794a19b 错误提示后面增加换行符。 2020-03-19 19:58:10 +08:00
iyuu.cn
88bc79ff58 版本升级至v1.6.7 2020-03-16 15:00:00 +08:00
iyuu.cn
f9164b6e53 修改php文件夹名称,让脚本更通用 2020-03-16 14:50:33 +08:00
iyuu.cn
687a83f80d 添加公告 2020-03-15 23:20:07 +08:00
iyuu.cn
253cff0e23 增加Windows从gitee安装脚本批处理。 2020-03-15 13:12:50 +08:00
iyuu.cn
ed1d4fbe11 新增合作站点pthome,可以对使用接口的用户进行认证绑定。 2020-03-15 12:42:27 +08:00
iyuu.cn
99c2655fd4 调整配置顺序 2020-03-15 00:54:58 +08:00
iyuu.cn
7adbadd700 修复一处错误。 2020-03-14 22:55:31 +08:00
iyuu.cn
6e4c530128 减少sleep等待时间为1秒。 2020-03-14 17:21:20 +08:00
iyuu.cn
9d183d742d 优化完善转移做种客户端时,出现的错误提示。 2020-03-14 17:20:46 +08:00
iyuu.cn
f5bc84e23d 优化合作站点登录逻辑,设置登录缓存,减少请求。 2020-03-14 17:20:02 +08:00
iyuu.cn
77443896dd 更新教程 2020-03-13 23:40:04 +08:00
iyuu.cn
657f092eef 新增公告 2020-03-13 23:35:06 +08:00
iyuu.cn
59b2d5b4ca 简化docker编译文件 2020-03-13 23:30:00 +08:00
iyuu.cn
b64abe55d5 新增3篇安装教程 2020-03-13 21:29:23 +08:00
iyuu.cn
df6761bbc3 composer dump-autoload 2020-03-13 21:28:58 +08:00
iyuu.cn
880775b815 新增hdhome合作站点用户id认证配置 2020-03-13 14:51:25 +08:00
iyuu.cn
0a29e7ed2f 修复瓷器辅种显示乱码不美观的问题 2020-03-12 08:08:01 +08:00
iyuu.cn
75e66e3b0b 新增合作站点hdhome,可以对使用接口的用户进行认证绑定。 2020-03-12 00:00:53 +08:00
iyuu.cn
948e68f55b 版本号升级到:v1.6.0 2020-03-11 23:46:42 +08:00
iyuu.cn
c35bbe0c91 新增合作站点hddolby,可以对使用接口的用户进行认证绑定。 2020-03-11 23:42:39 +08:00
iyuu.cn
fb68d21589 更新最简配置wiki 2020-03-10 14:38:28 +08:00
iyuu.cn
fa31319399 增加composer一键安装批处理 2020-03-09 13:48:36 +08:00
iyuu.cn
9597182628 新增3种安装方式,并提供安装命令 2020-03-09 13:48:02 +08:00
iyuu.cn
61d3ca843d 修复因不支持站点辅种缓存引起的错误提示。 2020-03-09 13:37:59 +08:00
iyuu.cn
4a63353d27 增加git更新批处理 2020-03-03 16:43:12 +08:00
iyuu.cn
07b0b2626d 紧急修复:qBittorrent的paused自动暂停参数为字符串的bug(此问题为上次转移做种配置项添加自定义后留下来的问题。) 2020-03-02 00:32:05 +08:00
iyuu.cn
755bb1d526 优化git自动更新sh脚本,防止因手动更改文件导致更新失败。 2020-03-01 13:39:09 +08:00
iyuu.cn
9a39306990 人性化的加入vendor目录。 2020-03-01 13:36:03 +08:00
iyuu.cn
43a90f40d3 优化做种客户端转移配置的提示,更清晰易懂。 2020-02-29 21:46:57 +08:00
iyuu.cn
fa60001758 修改示例配置的注释,以免混淆 2020-02-26 21:46:36 +08:00
iyuu.cn
80ca5e9690 添加git自动更新命令 2020-02-26 17:33:45 +08:00
iyuu.cn
550e53d5e0 转移种子,设置自动开始开关 2020-02-26 16:07:51 +08:00
iyuu.cn
ccd0acd7f6 添加更新历史 2020-02-26 16:07:36 +08:00
iyuu.cn
b788ef1245 新增站点:葡萄pt 2020-02-25 23:30:15 +08:00
iyuu.cn
17e9a494ee 升级docker制作脚本,每次制作都是最新版。 2020-02-25 21:03:54 +08:00
iyuu.cn
0ccc4f6342 优化过滤transmission连接URL兼容性(修复网址后有斜杠,无法连接的问题) 2020-02-24 14:47:36 +08:00
iyuu.cn
93208b3dc3 从composer创建工程 2020-02-23 19:49:21 +08:00
iyuu.cn
082700cf5d 发布包到composer,v1.5.3 2020-02-23 19:35:47 +08:00
iyuu.cn
d2269aa1ef git@github.com:ledccn/IYUUAutoReseed.git 2020-02-23 19:26:36 +08:00
iyuu.cn
95a81499c3 创建composer包:ledccn/IYUUAutoReseed 2020-02-23 19:19:37 +08:00
iyuu.cn
2f4ad383a7 创建composer包:iyuu/IYUUAutoReseed 2020-02-23 19:12:21 +08:00
iyuu.cn
9b62e84cda 加入git自动更新脚本 2020-02-23 16:25:38 +08:00
iyuu.cn
125394ee0b 优化提高Windows平台转移做种客户端的兼容性 2020-02-23 01:19:25 +08:00
iyuu.cn
efa11d280d 更新教程 2020-02-22 20:56:13 +08:00
iyuu.cn
18f860713f 新增公告:转移做种常见错误 2020-02-22 16:35:17 +08:00
iyuu.cn
264aef754e 更新文档、新增支持站点天雪v1.5.2 2020-02-21 21:24:22 +08:00
iyuu.cn
c178046435 新增站点天雪,添加配置即可辅种。 2020-02-21 21:08:17 +08:00
iyuu.cn
397106cad9 更新公告 2020-02-21 19:07:14 +08:00
iyuu.cn
cc3a4ec1b8 删除海豚音乐配置 2020-02-21 18:14:05 +08:00
iyuu.cn
d87029c4f4 修复bug 修订版本号+1 2020-02-21 08:59:27 +08:00
iyuu.cn
7f2889ba1e 修正海豚音乐torrent_pass、authkey正确名称
紧急更新v1.5.1
2020-02-21 08:40:29 +08:00
iyuu.cn
185157a00c 添加部分,更新历史 2020-02-21 07:23:42 +08:00
iyuu.cn
9ad36efed8 更新开发计划 2020-02-21 07:23:17 +08:00
iyuu.cn
d0fc64beb1 更新wiki教程 2020-02-21 07:23:03 +08:00
iyuu.cn
426e47337d 版本号升级至1.5.0
新增海豚音乐
2020-02-21 06:46:53 +08:00
iyuu.cn
37809f7bfe 新增海豚音乐示例配置 2020-02-21 06:42:54 +08:00
iyuu.cn
721aaf217b 新增海豚音乐dicmusic,更新捐赠名单 2020-02-21 06:42:35 +08:00
iyuu.cn
aa18b23dbb 增加转移做种搜索目录命令find / -name BT_backup 2020-02-20 21:03:31 +08:00
iyuu.cn
4d452e3909 优化大于一万条做种,防止精简配置,导致超时设置无效。 2020-02-20 18:09:50 +08:00
iyuu.cn
741ccb4fb4 优化大于一万条做种时辅种失败问题。 2020-02-20 17:49:50 +08:00
iyuu.cn
e336970fca 小钢炮使用docker版qb 4.1.6 简明教程 2020-02-20 17:48:24 +08:00
iyuu.cn
0321deee01 小钢炮qBittorrent连接失败的处理办法 2020-02-20 17:05:57 +08:00
iyuu.cn
08ef3769c2 删除示例配置圣城cnscg 2020-02-20 16:33:31 +08:00
iyuu.cn
1355398f76 修复扩展参数extra_options错误 2020-02-20 16:13:15 +08:00
iyuu.cn
53533df4b9 新增两个API接口 2020-02-20 09:20:16 +08:00
iyuu.cn
53902ee878 优化https判断 2020-02-20 06:52:31 +08:00
iyuu.cn
60430f6550 代码格式化 2020-02-19 13:33:58 +08:00
iyuu.cn
9445547378 修复transmission添加任务后,ID无法显示的bug 2020-02-19 02:45:27 +08:00
iyuu.cn
8ba1ef1ff4 新增docker容器安装使用方法 2020-02-18 21:23:19 +08:00
iyuu.cn
ca148bac6b 更新忽略列表 2020-02-18 18:02:40 +08:00
iyuu.cn
3393eae7e7 新增做种列表备份功能,便于紧急恢复。 2020-02-18 16:02:16 +08:00
iyuu.cn
06c00f88dc 增加版本号,用于服务器端限定 2020-02-18 15:08:57 +08:00
iyuu.cn
854121884b 新增转移成功跳校验、转移成功删除当前做种功能。 2020-02-18 14:48:35 +08:00
64 changed files with 3884 additions and 565 deletions

2
.dockerignore Normal file
View File

@@ -0,0 +1,2 @@
.git
*

9
.gitignore vendored
View File

@@ -1,9 +0,0 @@
/torrent
/config/config.php
/config/sites.json
/*.bat
/*.sh
.idea
.php_cs.cache
vendor
php-7.4.2-nts-Win32-vc15-x86

7
8.git更新与辅种.cmd Normal file
View File

@@ -0,0 +1,7 @@
@echo off
chcp 65001
git fetch --all
git reset --hard origin/master
#git pull
php %cd%\iyuu.php
pause

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

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

109
Dockerfile Normal file
View File

@@ -0,0 +1,109 @@
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"} \
cron="0 10 * * 0"
##
# ---------- 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 \
&& echo '2 */5 * * * cd /var/www && git fetch --all && git reset --hard origin/master' >> /etc/crontabs/root \
# ---------- 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
CMD ["sh", "-c", "/usr/bin/php /var/www/iyuu.php ; /usr/sbin/crond ; (crontab -l ;echo \"$cron /usr/bin/php /var/www/iyuu.php &> /dev/null\") | crontab - ; tail -f /dev/null"]

View File

@@ -13,19 +13,17 @@ use IYUU\Library\Table;
class AutoReseed
{
// 版本号
const VER = '1.0.0';
const VER = '1.10.2';
// RPC连接
private static $links = array();
private static $links = [];
// 客户端配置
private static $clients = array();
private static $clients = [];
// 站点列表
private static $sites = array();
// 不辅种的站点 'ourbits','hdchina'
private static $noReseed = array();
// 不转移的站点 'hdarea','hdbd'
private static $noMove = array('hdarea');
private static $sites = [];
// 不辅种的站点 'pt','hdchina'
private static $noReseed = [];
// cookie检查
private static $cookieCheck = array('hdchina','hdcity');
private static $cookieCheck = ['hdchina','hdcity','hdsky'];
// 缓存路径
public static $cacheDir = TORRENT_PATH.'cache'.DS;
public static $cacheHash = TORRENT_PATH.'cachehash'.DS;
@@ -36,13 +34,14 @@ class AutoReseed
'login' => '/user/login',
'sites' => '/api/sites',
'infohash'=> '/api/infohash',
'notify' => '/api/notify',
'notify' => '/api/notify',
'hash' => '/api/hash',
);
// curl
private static $curl = null;
// 退出状态码
public static $ExitCode = 0;
// 客户端转移做种
// 客户端转移做种 格式:['客户端key', '移动参数move']
private static $move = null;
// 微信消息体
private static $wechatMsg = array(
@@ -54,6 +53,8 @@ class AutoReseed
'reseedRepeat' => 0, // 重复:客户端已做种
'reseedSkip' => 0, // 跳过因未设置passkey而跳过
'reseedPass' => 0, // 忽略:因上次成功添加、存在缓存,而跳过
'MoveSuccess' => 0, // 移动成功
'MoveError' => 0, // 移动失败
);
// 错误通知消息体
private static $errNotify = array(
@@ -67,13 +68,23 @@ class AutoReseed
public static function init()
{
global $configALL;
echo "正在初始化运行参数,版本号:".self::VER.PHP_EOL;
sleep(mt_rand(1, 3));
self::backup('config', $configALL);
self::$curl = new Curl();
self::$curl->setOpt(CURLOPT_SSL_VERIFYPEER, false);
self::$curl->setOpt(CURLOPT_SSL_VERIFYHOST, false);
self::$curl->setOpt(CURLOPT_SSL_VERIFYHOST, 2);
// 合作站点鉴权绑定
Oauth::login(self::$apiUrl . self::$endpoints['login']);
// 显示支持站点列表
self::ShowTableSites();
self::$clients = isset($configALL['default']['clients']) && $configALL['default']['clients'] ? $configALL['default']['clients'] : array();
echo "程序正在初始化运行参数... ".PHP_EOL;
if (empty(self::$clients)) {
die('全局客户端为空!');
}
// 递归删除上次历史记录
IFile::rmdir(self::$cacheDir, true);
// 建立目录
@@ -82,23 +93,24 @@ class AutoReseed
IFile::mkdir(self::$cacheMove);
// 连接全局客户端
self::links();
// 合作站点自动注册鉴权
Oauth::login(self::$apiUrl . self::$endpoints['login']);
}
/**
* 显示支持站点列表
*/
private static function ShowTableSites()
{
$list[] = 'gitee 源码仓库https://gitee.com/ledc/IYUUAutoReseed';
$list[] = 'github源码仓库https://github.com/ledccn/IYUUAutoReseed';
$list[] = '教程https://gitee.com/ledc/IYUUAutoReseed/tree/master/wiki';
$list[] = "QQ群859882209 【IYUU自动辅种交流】".PHP_EOL;
foreach ($list as $key => $value) {
$list = [
'gitee源码仓库https://gitee.com/ledc/IYUUAutoReseed',
'github源码仓库https://github.com/ledccn/IYUUAutoReseed',
'教程https://gitee.com/ledc/IYUUAutoReseed/tree/master/wiki',
'问答社区http://wenda.iyuu.cn',
'【IYUU自动辅种交流】QQ群859882209、931954050'.PHP_EOL,
'正在连接IYUUAutoReseed服务器查询支持列表……'.PHP_EOL
];
foreach ($list as $value) {
echo $value.PHP_EOL;
}
echo "正在连接IYUUAutoReseed服务器查询支持列表…… ".PHP_EOL;
$res = self::$curl->get(self::$apiUrl.self::$endpoints['sites'].'?sign='.Oauth::getSign());
$res = self::$curl->get(self::$apiUrl.self::$endpoints['sites'].'?sign='.Oauth::getSign().'&version='.self::VER);
$rs = json_decode($res->response, true);
$sites = isset($rs['data']['sites']) && $rs['data']['sites'] ? $rs['data']['sites'] : false;
// 数据写入本地
@@ -113,7 +125,7 @@ class AutoReseed
@fclose($file_pointer);
} else {
if (isset($rs['msg']) && $rs['msg']) {
die($rs['msg']);
die($rs['msg'].PHP_EOL);
}
die('远端服务器无响应,请稍后再试!!!');
}
@@ -130,7 +142,7 @@ class AutoReseed
$data[$k][] = $j.". ".$v['site'];
}
echo "IYUUAutoReseed自动辅种脚本目前支持以下站点".PHP_EOL;
//输出表格
// 输出支持站点表格
$table = new Table();
$table->setRows($data);
echo($table->render());
@@ -138,7 +150,7 @@ class AutoReseed
/**
* 连接远端RPC下载器
*/
public static function links()
private static function links()
{
foreach (self::$clients as $k => $v) {
// 跳过未配置的客户端
@@ -153,14 +165,15 @@ class AutoReseed
self::$links[$k]['rpc'] = $client;
self::$links[$k]['type'] = $v['type'];
self::$links[$k]['BT_backup'] = isset($v['BT_backup']) && $v['BT_backup'] ? $v['BT_backup'] : '';
self::$links[$k]['root_folder'] = isset($v['root_folder']) ? $v['root_folder'] : 1;
$result = $client->status();
print $v['type'].''.$v['host']." Rpc连接 [{$result}] \n";
// 检查转移做种
if (isset($v['move']) && $v['move'] && is_null(self::$move)) {
// 检查转移做种 (self::$move为空移动配置为真)
if (is_null(self::$move) && isset($v['move']) && $v['move']) {
self::$move = array($k,$v['move']);
}
} catch (\Exception $e) {
die('[Links ERROR] ' . $e->getMessage() . PHP_EOL);
die('[连接错误] ' . $e->getMessage() . PHP_EOL);
}
}
}
@@ -182,7 +195,7 @@ class AutoReseed
// 判断
switch ($type) {
case 'transmission':
$extra_options['paused'] = true;
$extra_options['paused'] = isset($extra_options['paused']) ? $extra_options['paused'] : true;
if ($is_url) {
$result = self::$links[$rpcKey]['rpc']->add($torrent, $save_path, $extra_options); // 种子URL添加下载任务
} else {
@@ -190,15 +203,15 @@ class AutoReseed
}
if (isset($result['result']) && $result['result'] == 'success') {
$id = $name = '';
if (isset($result['arguments']['torrent_duplicate'])) {
$id = $result['arguments']['torrent_duplicate']['id'];
$name = $result['arguments']['torrent_duplicate']['name'];
} elseif (isset($result['arguments']['torrent_added'])) {
$id = $result['arguments']['torrent_added']['id'];
$name = $result['arguments']['torrent_added']['name'];
if (isset($result['arguments']['torrent-duplicate'])) {
$id = $result['arguments']['torrent-duplicate']['id'];
$name = $result['arguments']['torrent-duplicate']['name'];
} elseif (isset($result['arguments']['torrent-added'])) {
$id = $result['arguments']['torrent-added']['id'];
$name = $result['arguments']['torrent-added']['name'];
}
print "名字:".$name . PHP_EOL;
print "********RPC添加下载任务成功 [" .$result['result']. "] (id=$id)".PHP_EOL.PHP_EOL;
print "名字:" .$name . PHP_EOL;
print "********RPC添加下载任务成功 [" .$result['result']. "] (id=" .$id. ")".PHP_EOL.PHP_EOL;
return true;
} else {
$errmsg = isset($result['result']) ? $result['result'] : '未知错误,请稍后重试!';
@@ -210,7 +223,15 @@ class AutoReseed
break;
case 'qBittorrent':
$extra_options['autoTMM'] = 'false'; //关闭自动种子管理
$extra_options['paused'] = 'true';
#$extra_options['skip_checking'] = 'true'; //跳校验
// 添加任务校验后是否暂停
if (isset($extra_options['paused'])) {
$extra_options['paused'] = $extra_options['paused'] ? 'true' : 'false';
} else {
$extra_options['paused'] = 'true';
}
// 是否创建根目录
$extra_options['root_folder'] = self::$links[$rpcKey]['root_folder'] ? 'true' : 'false';
if ($is_url) {
$result = self::$links[$rpcKey]['rpc']->add($torrent, $save_path, $extra_options); // 种子URL添加下载任务
} else {
@@ -227,16 +248,16 @@ class AutoReseed
}
break;
default:
echo '[add ERROR] '.$type. PHP_EOL. PHP_EOL;
echo '[下载器类型错误] '.$type. PHP_EOL. PHP_EOL;
break;
}
} catch (\Exception $e) {
echo '[add ERROR] ' . $e->getMessage() . PHP_EOL;
echo '[添加下载任务出错] ' . $e->getMessage() . PHP_EOL;
}
return false;
}
/**
* 转移、辅种总入口
* 辅种或转移,总入口
*/
public static function call()
{
@@ -245,17 +266,18 @@ class AutoReseed
}
self::reseed();
self::wechatMessage();
exit(self::$ExitCode);
}
/**
* IYUUAutoReseed辅种
*/
public static function reseed()
private static function reseed()
{
global $configALL;
// 支持站点数量
self::$wechatMsg['sitesCount'] = count(self::$sites);
$sites = self::$sites;
// 客户端循环辅种 开始
// 遍历客户端 开始
foreach (self::$links as $k => $v) {
if (empty($v)) {
echo "clients_".$k." 用户名或密码未配置,已跳过".PHP_EOL.PHP_EOL;
@@ -272,7 +294,7 @@ class AutoReseed
// 失败
continue;
}
// 此处需要优化大于一万条做种时,应分批上传
self::backup('clients_'.$k, $hashArray);
$infohash_Dir = $hashArray['hashString'];
unset($hashArray['hashString']);
// 签名
@@ -282,6 +304,14 @@ class AutoReseed
// 写请求日志
wlog($hashArray, 'hashString'.$k);
self::$wechatMsg['hashCount'] +=count($infohash_Dir);
// 此处优化大于一万条做种时,设置超时
if (count($infohash_Dir) > 5000) {
$connecttimeout = isset($configALL['default']['CONNECTTIMEOUT']) && $configALL['default']['CONNECTTIMEOUT']>60 ? $configALL['default']['CONNECTTIMEOUT'] : 60;
$timeout = isset($configALL['default']['TIMEOUT']) && $configALL['default']['TIMEOUT']>600 ? $configALL['default']['TIMEOUT'] : 600;
self::$curl->setOpt(CURLOPT_CONNECTTIMEOUT, $connecttimeout);
self::$curl->setOpt(CURLOPT_TIMEOUT, $timeout);
}
// P($infohash_Dir); // 调试:打印目录对应表
echo "正在向服务器提交 clients_".$k." 种子哈希……".PHP_EOL;
$res = self::$curl->post(self::$apiUrl . self::$endpoints['infohash'], $hashArray);
$res = json_decode($res->response, true);
@@ -295,18 +325,17 @@ class AutoReseed
// 判断返回值
if (empty($res['msg'])) {
echo "clients_".$k." 辅种数据下载成功!!!".PHP_EOL.PHP_EOL;
echo '【提醒】未配置passkey的站点都会跳过'.PHP_EOL.PHP_EOL;
} else {
$errmsg = isset($res['msg']) && $res['msg'] ? $res['msg'] : '远端服务器无响应,请稍后重试!';
echo '-----辅种失败,原因:' .$errmsg.PHP_EOL.PHP_EOL;
continue;
}
// 当前客户端可辅种数据
// 遍历当前客户端可辅种数据
foreach ($reseed as $info_hash => $vv) {
// 当前种子哈希对应的目录
$downloadDir = $infohash_Dir[$info_hash];
foreach ($vv['torrent'] as $id => $value) {
$_url = $url = '';
$download_page = $details_url = '';
// 匹配的辅种数据累加
self::$wechatMsg['reseedCount']++;
// 站点id
@@ -314,21 +343,30 @@ class AutoReseed
// 种子id
$torrent_id = $value['torrent_id'];
// 站点名
if (empty($sites[$sid]['site'])) {
echo '-----当前站点不受支持,已跳过。' .PHP_EOL.PHP_EOL;
self::$wechatMsg['reseedSkip']++;
continue;
}
$siteName = $sites[$sid]['site'];
// 错误通知
self::setNotify($siteName, $sid, $torrent_id);
// 页面规则
$download_page = str_replace('{}', $torrent_id, $sites[$sid]['download_page']);
$_url = 'https://' .$sites[$sid]['base_url']. '/' .$download_page;
echo "clients_".$k."正在辅种... {$siteName}".PHP_EOL;
// 协议
$protocol = $sites[$sid]['is_https'] == 0 ? 'http://' : 'https://';
$_url = $protocol . $sites[$sid]['base_url']. '/' .$download_page;
/**
* 前置检测
*/
// passkey检测
if (empty($configALL[$siteName]['passkey'])) {
echo '-------因当前' .$siteName. "站点未设置passkey已跳过".PHP_EOL.PHP_EOL;
// 配置与passkey检测
if (empty($configALL[$siteName]) || empty($configALL[$siteName]['passkey'])) {
//echo '-------因当前' .$siteName. "站点未设置passkey已跳过".PHP_EOL.PHP_EOL;
self::$wechatMsg['reseedSkip']++;
continue;
} else {
echo "clients_".$k."正在辅种... {$siteName}".PHP_EOL;
}
// cookie检测
if (in_array($siteName, self::$cookieCheck) && empty($configALL[$siteName]['cookie'])) {
@@ -368,53 +406,75 @@ class AutoReseed
wlog('clients_'.$k.PHP_EOL.$downloadDir.PHP_EOL.$_url.PHP_EOL.PHP_EOL, $siteName);
continue;
}
// 操作站点流控的配置
if (isset($configALL[$siteName]['limitRule']) && $configALL[$siteName]['limitRule']) {
$limitRule = $configALL[$siteName]['limitRule'];
if (isset($limitRule['count']) && isset($limitRule['sleep'])) {
if ($limitRule['count'] <= 0) {
echo '-------当前站点辅种数量已满足规则,保障账号安全已跳过:'.$_url.PHP_EOL.PHP_EOL;
self::$wechatMsg['reseedPass']++;
continue;
} else {
// 异步间隔流控算法:各站独立、执行时间最优
$lastTime = isset($limitRule['time']) ? $limitRule['time'] : 0; // 最近一次辅种成功的时间
if ($lastTime) {
$interval = time() - $lastTime; // 间隔时间
if ($interval < $limitRule['sleep']) {
$t = $limitRule['sleep'] - $interval + mt_rand(1, 5);
do {
echo microtime(true)." 为账号安全,辅种进程休眠 {$t} 秒后继续...".PHP_EOL;
sleep(1);
} while (--$t > 0);
}
}
}
} else {
echo '-------当前站点流控规则错误缺少count或sleep参数请重新配置'.$_url.PHP_EOL.PHP_EOL;
self::$wechatMsg['reseedPass']++;
continue;
}
}
/**
* 种子URL组合方式区分
*/
$url = self::getTorrentUrl($siteName, $_url);
$reseedPass = false;
// 特殊站点:推送给下载器种子元数据
$reseedPass = false; // 标志:跳过辅种
// 特殊站点:种子元数据推送给下载器
switch ($siteName) {
case 'hdchina':
$cookie = isset($configALL[$siteName]['cookie']) ? $configALL[$siteName]['cookie'] : '';
$cookie = $configALL[$siteName]['cookie'];
$userAgent = $configALL['default']['userAgent'];
// 拼接URL
// 拼接详情页URL
$details_page = str_replace('{}', $value['torrent_id'], 'details.php?id={}&hit=1');
$details_url = 'https://' .$sites[$sid]['base_url']. '/' .$details_page;
$details_url = $protocol .$sites[$sid]['base_url']. '/' .$details_page;
print "种子详情页:".$details_url.PHP_EOL;
$details_html = download($details_url, $cookie, $userAgent);
if (empty($details_html)) {
// 删种检查
if (strpos($details_html, '没有该ID的种子') != false) {
echo '种子已被删除!'.PHP_EOL;
self::sendNotify('404');
$reseedPass = true;
break;
}
// 提取种子下载地址
$offset = strpos($details_html, str_replace('{hash}', '', $sites[$sid]['download_page']));
if ($offset === false) {
ff($siteName. '站点cookie已过期请更新后重新辅种');
echo 'cookie已过期请更新后重新辅种已加入排除列表'.PHP_EOL;
$t = 30;
$t = 15;
do {
echo microtime(true)." cookie已过期请更新后重新辅种已加入排除列表{$t}秒后继续...".PHP_EOL;
sleep(1);
} while (--$t > 0);
$configALL[$siteName]['cookie'] = '';
// 标志:跳过辅种
$reseedPass = true;
break;
}
if (strpos($details_html, '没有该ID的种子') != false) {
echo '种子已被删除!'.PHP_EOL;
self::sendNotify('404');
// 标志:跳过辅种
$reseedPass = true;
break;
}
// 提取种子下载地址
$download_page = str_replace('{}', '', $sites[$sid]['download_page']);
$offset = strpos($details_html, $download_page);
$urlTemp = substr($details_html, $offset, 50);
// 种子地址
$_url = substr($urlTemp, 0, strpos($urlTemp, '">'));
if (empty($_url)) {
echo '未知错误未提取到种子URL请联系脚本作者'.PHP_EOL;
// 标志:跳过辅种
$reseedPass = true;
break;
}
$_url = 'https://' .$sites[$sid]['base_url']. '/' . $_url;
$regex = "/download.php\?hash\=(.*?)[\"|\']/i"; // 提取种子hash的正则表达式
preg_match($regex, $details_html, $matchs);
$download_page = str_replace('{hash}', $matchs[1], $sites[$sid]['download_page']);
$_url = $protocol . $sites[$sid]['base_url']. '/' . $download_page;
print "种子下载页:".$_url.PHP_EOL;
$url = download($_url, $cookie, $userAgent);
if (strpos($url, '第一次下载提示') != false) {
@@ -426,21 +486,19 @@ class AutoReseed
sleep(1);
} while (--$t > 0);
ff($siteName. '站点,辅种时触发第一次下载提示!');
self::$noReseed[] = 'hdchina';
// 标志:跳过辅种
self::$noReseed[] = $siteName;
$reseedPass = true;
}
if (strpos($url, '系统检测到过多的种子下载请求') != false) {
echo "当前站点触发人机验证,已加入排除列表".PHP_EOL;
ff($siteName. '站点,辅种时触发人机验证!');
$configALL[$siteName]['limit'] = 1;
self::$noReseed[] = 'hdchina';
// 标志:跳过辅种
self::$noReseed[] = $siteName;
$reseedPass = true;
}
break;
case 'hdcity':
$cookie = isset($configALL[$siteName]['cookie']) ? $configALL[$siteName]['cookie'] : '';
$cookie = $configALL[$siteName]['cookie'];
$userAgent = $configALL['default']['userAgent'];
print "种子:".$_url.PHP_EOL;
if (isset($configALL[$siteName]['cuhash'])) {
@@ -448,14 +506,21 @@ class AutoReseed
# code...
} else {
// 获取cuhash
$html = download('https://' .$sites[$sid]['base_url']. '/pt', $cookie, $userAgent);
$html = download($protocol .$sites[$sid]['base_url']. '/pt', $cookie, $userAgent);
// 提取种子下载地址
$offset = strpos($html, 'cuhash=');
$len = strlen('cuhash=');
$cuhashTemp = substr($html, $offset+$len, 40);
$configALL[$siteName]['cuhash'] = substr($cuhashTemp, 0, strpos($cuhashTemp, '"'));
if ($offset === false) {
ff($siteName. '站点cookie已过期请更新后重新辅种');
echo 'cookie已过期请更新后重新辅种'.PHP_EOL;
$configALL[$siteName]['cookie'] = '';
$reseedPass = true;
break;
}
$regex = "/cuhash\=(.*?)[\"|\']/i"; // 提取种子cuhash的正则表达式
preg_match($regex, $html, $matchs);
$configALL[$siteName]['cuhash'] = $matchs[1];
}
$url = $_url."&cuhash=". $configALL[$siteName]['cuhash'];
$url = str_replace('{cuhash}', $configALL[$siteName]['cuhash'], $_url);
// 城市下载种子时会302转向
$url = download($url, $cookie, $userAgent);
if (strpos($url, 'Non-exist torrent id!') != false) {
@@ -465,6 +530,57 @@ class AutoReseed
$reseedPass = true;
}
break;
case 'hdsky':
$cookie = $configALL[$siteName]['cookie'];
$userAgent = $configALL['default']['userAgent'];
// 拼接详情页URL
$details_page = str_replace('{}', $value['torrent_id'], 'details.php?id={}&hit=1');
$details_url = $protocol .$sites[$sid]['base_url']. '/' .$details_page;
print "种子详情页:".$details_url.PHP_EOL;
$details_html = download($details_url, $cookie, $userAgent);
// 删种检查
if (strpos($details_html, '没有该ID的种子') != false) {
echo '种子已被删除!'.PHP_EOL;
self::sendNotify('404');
$reseedPass = true;
break;
}
// 提取种子下载地址
$remove = 'id={}&passkey={passkey}';
$offset = strpos($details_html, str_replace($remove, '', $sites[$sid]['download_page']));
if ($offset === false) {
ff($siteName. '站点cookie已过期请更新后重新辅种');
echo 'cookie已过期请更新后重新辅种已加入排除列表'.PHP_EOL;
$t = 15;
do {
echo microtime(true)." cookie已过期请更新后重新辅种已加入排除列表{$t}秒后继续...".PHP_EOL;
sleep(1);
} while (--$t > 0);
$configALL[$siteName]['cookie'] = '';
$reseedPass = true;
break;
}
// 种子地址
$regex = '/download.php\?(.*?)["|\']/i';
if (preg_match($regex, $details_html, $matchs)) {
$download_page = str_replace($remove, '', $sites[$sid]['download_page']).str_replace('&amp;', '&', $matchs[1]);
}
$_url = $protocol . $sites[$sid]['base_url']. '/' . $download_page;
print "种子下载页:".$_url.PHP_EOL;
$url = download($_url, $cookie, $userAgent);
if (strpos($url, '第一次下载提示') != false) {
echo "当前站点触发第一次下载提示,已加入排除列表".PHP_EOL;
echo "请进入种子详情页下载种子成功后更新cookie".PHP_EOL;
$t = 30;
do {
echo microtime(true)." 请进入种子详情页下载种子成功后更新cookie{$t}秒后继续...".PHP_EOL;
sleep(1);
} while (--$t > 0);
ff($siteName. '站点,辅种时触发第一次下载提示!');
self::$noReseed[] = $siteName;
$reseedPass = true;
}
break;
default:
// 默认站点推送给下载器种子URL链接
break;
@@ -482,6 +598,7 @@ class AutoReseed
// 按站点规范日志内容
switch ($siteName) {
case 'hdchina':
case 'hdsky':
$url = $details_url;
break;
case 'hdcity':
@@ -490,11 +607,18 @@ class AutoReseed
default:
break;
}
// 添加成功的种子以infohash为文件名写入缓存
$log = 'clients_'.$k.PHP_EOL.$downloadDir.PHP_EOL.$url.PHP_EOL.PHP_EOL;
if ($ret) {
// 成功的种子
wlog($log, $value['info_hash'], self::$cacheHash);
// 操作流控参数
if (isset($configALL[$siteName]['limitRule']) && $configALL[$siteName]['limitRule']) {
$limitRule = $configALL[$siteName]['limitRule'];
if ($limitRule['count']) {
$configALL[$siteName]['limitRule']['count']--;
$configALL[$siteName]['limitRule']['time'] = time();
}
}
wlog($log, $value['info_hash'], self::$cacheHash); // 添加成功的种子以infohash为文件名写入缓存
wlog($log, 'reseedSuccess');
// 成功累加
self::$wechatMsg['reseedSuccess']++;
@@ -514,16 +638,21 @@ class AutoReseed
/**
* IYUUAutoReseed做种客户端转移
*/
public static function move()
private static function move()
{
global $configALL;
$sites = self::$sites;
//遍历客户端
foreach (self::$links as $k => $v) {
if (self::$move[0] == $k) {
echo "clients_".$k."是目标转移客户端,避免冲突,已跳过!".PHP_EOL.PHP_EOL;
continue;
}
if (empty(self::$links[$k])) {
echo "clients_".$k." 用户名或密码未配置,已跳过".PHP_EOL.PHP_EOL;
continue;
}
echo "正在从下载器 clients_".$k." 获取种子哈希……".PHP_EOL;
$move = []; // 客户端做种列表 传址
$hashArray = self::$links[$k]['rpc']->getList($move);
if (empty($hashArray)) {
// 失败
@@ -539,13 +668,18 @@ class AutoReseed
echo "clients_".$k." 全部转移成功,本次无需转移!".PHP_EOL.PHP_EOL;
continue;
}
// 循环转移做种客户端
//遍历当前客户端种子
foreach ($infohash_Dir as $info_hash => $downloadDir) {
// 调用路径过滤
if (self::pathFilter($downloadDir)) {
continue;
}
// 做种实际路径与相对路径之间互转
echo '转换前:'.$downloadDir.PHP_EOL;
$downloadDir = self::pathReplace($downloadDir);
echo '转换后:'.$downloadDir.PHP_EOL;
if (is_null($downloadDir)) {
echo 'IYUU自动转移做种客户端--使用教程 https://www.iyuu.cn/archives/351/'.PHP_EOL;
die("全局配置的move数组内路径转换参数配置错误请重新配置".PHP_EOL);
}
// 种子目录:脚本要能够读取到
@@ -566,6 +700,7 @@ class AutoReseed
break;
case 'qBittorrent':
if (empty($path)) {
echo 'IYUU自动转移做种客户端--使用教程 https://www.iyuu.cn/archives/351/'.PHP_EOL;
die("clients_".$k." 未设置种子的BT_backup目录无法完成转移");
}
$torrentPath = $path .DS. $info_hash . '.torrent';
@@ -576,21 +711,27 @@ class AutoReseed
break;
}
if (!is_file($torrentPath)) {
echo 'IYUU自动转移做种客户端--使用教程 https://www.iyuu.cn/archives/351/'.PHP_EOL;
die("clients_".$k." 的种子文件{$torrentPath}不存在,无法完成转移!");
}
echo '存在种子:'.$torrentPath.PHP_EOL;
$torrent = file_get_contents($torrentPath);
// 正式开始转移
echo "种子已推送给下载器,正在转移做种...".PHP_EOL;
$ret = false;
// 目标下载器类型
$rpcKey = self::$move[0];
$type = self::$links[$rpcKey]['type'];
$extra_options = array();
// 转移后,是否开始?
$extra_options['paused'] = isset($configALL['default']['move']['paused']) && $configALL['default']['move']['paused'] ? true : false;
if ($type == 'qBittorrent') {
#$extra_options['skip_checking'] = "true"; //转移时,跳校验
if (isset($configALL['default']['move']['skip_check']) && $configALL['default']['move']['skip_check'] === 1) {
$extra_options['skip_checking'] = "true"; //转移成功,跳校验
}
} else {
$extra_options = array();
}
// 添加转移任务成功返回true
$ret = self::add(self::$move[0], $torrent, $downloadDir, $extra_options);
/**
@@ -598,15 +739,18 @@ class AutoReseed
*/
$log = $info_hash.PHP_EOL.$torrentPath.PHP_EOL.$downloadDir.PHP_EOL.PHP_EOL;
if ($ret) {
// 删除做种,不删资源
#self::$links[$k]['rpc']->delete($torrentDelete);
//转移成功时,删除做种,不删资源
if (isset($configALL['default']['move']['delete_torrent']) && $configALL['default']['move']['delete_torrent'] === 1) {
self::$links[$k]['rpc']->delete($torrentDelete);
}
// 转移成功的种子以infohash为文件名写入缓存
wlog($log, $info_hash, self::$cacheMove);
wlog($log, 'MoveSuccess'.$k);
self::$wechatMsg['MoveSuccess']++;
} else {
// 失败的种子
wlog($log, 'MoveError'.$k);
self::$wechatMsg['MoveError']++;
}
}
}
@@ -614,7 +758,7 @@ class AutoReseed
/**
* 过滤已转移的种子hash
*/
public static function hashFilter(&$infohash_Dir = array())
private static function hashFilter(&$infohash_Dir = array())
{
foreach ($infohash_Dir as $info_hash => $dir) {
if (is_file(self::$cacheMove . $info_hash.'.txt')) {
@@ -627,11 +771,12 @@ class AutoReseed
/**
* 实际路径与相对路径之间互相转换
*/
public static function pathReplace($path = '')
private static function pathReplace($path = '')
{
global $configALL;
$type = $configALL['default']['move']['type'];
$pathArray = $configALL['default']['move']['path'];
$path = rtrim($path, DIRECTORY_SEPARATOR); // 提高Windows转移兼容性
switch ($type) {
case 1: // 减
foreach ($pathArray as $key => $val) {
@@ -642,66 +787,150 @@ class AutoReseed
break;
case 2: // 加
foreach ($pathArray as $key => $val) {
if (strpos($path, $key)===0) {
if (strpos($path, $key)===0) { // 没用$path == $key判断是为了提高兼容性
return $val . $path;
}
}
break;
case 3: // 替换
foreach ($pathArray as $key => $val) {
if (strpos($path, $key)===0) {
if (strpos($path, $key)===0) { // 没用$path == $key判断是为了提高兼容性
return $val . substr($path, strlen($key));
}
}
break;
default:
default: // 不变
return $path;
break;
}
return null;
}
/**
* 获取站点种子的URL
* 处理转移种子时所设置的过滤器、选择器
* @return bool true 过滤 | false 不过滤
*/
public static function getTorrentUrl($site = '', $_url = '')
private static function pathFilter(&$path = '')
{
global $configALL;
switch ($site) {
case 'ttg':
$url = $_url."/". $configALL[$site]['passkey'];
break;
case 'm-team':
case 'moecat':
$ip_type = '';
if (isset($configALL[$site]['ip_type'])) {
$ip_type = $configALL[$site]['ip_type'] == 'ipv6' ? '&ipv6=1' : '';
$path = rtrim($path, DIRECTORY_SEPARATOR); // 提高Windows转移兼容性
// 转移过滤器、选择器 David/2020年7月11日
$path_filter = isset($configALL['default']['move']['path_filter']) && !empty($configALL['default']['move']['path_filter']) ? $configALL['default']['move']['path_filter'] : null;
$path_selector = isset($configALL['default']['move']['path_selector']) && !empty($configALL['default']['move']['path_selector']) ? $configALL['default']['move']['path_selector'] : null;
if (\is_null($path_filter) && \is_null($path_selector)) {
return false;
} elseif (\is_null($path_filter)) {
//选择器
if (\is_array($path_selector)) {
foreach ($path_selector as $pathName) {
if (strpos($path, $pathName)===0) { // 没用$path == $key判断是为了提高兼容性
return false;
}
}
$url = $_url."&passkey=". $configALL[$site]['passkey'] . $ip_type. "&https=1";
break;
case 'ccfbits':
$url = str_replace('{passkey}', $configALL[$site]['passkey'], $_url);
break;
default:
$url = $_url."&passkey=". $configALL[$site]['passkey'];
break;
echo '已跳过!转移选择器未匹配到:'.$path.PHP_EOL;
return true;
}
} elseif (\is_null($path_selector)) {
//过滤器
if (\is_array($path_filter)) {
foreach ($path_filter as $pathName) {
if (strpos($path, $pathName)===0) { // 没用$path == $key判断是为了提高兼容性
echo '已跳过!转移过滤器匹配到:'.$path.PHP_EOL;
return true;
}
}
return false;
}
} else {
//同时设置过滤器、选择器
if (\is_array($path_filter) && \is_array($path_selector)) {
//先过滤器
foreach ($path_filter as $pathName) {
if (strpos($path, $pathName)===0) {
echo '已跳过!转移过滤器匹配到:'.$path.PHP_EOL;
return true;
}
}
//后选择器
foreach ($path_selector as $pathName) {
if (strpos($path, $pathName)===0) {
return false;
}
}
echo '已跳过!转移选择器未匹配到:'.$path.PHP_EOL;
return true;
}
}
return false;
}
/**
* 获取站点种子的URL
* @param string $site
* @param string $url
* @return string
*/
private static function getTorrentUrl($site = '', $url = '')
{
global $configALL;
// 兼容旧配置
if (isset($configALL[$site]['passkey']) && $configALL[$site]['passkey']) {
if (empty($configALL[$site]['url_replace'])) {
$configALL[$site]['url_replace'] = array('{passkey}' => $configALL[$site]['passkey']);
}
if (empty($configALL[$site]['url_join'])) {
$configALL[$site]['url_join'] = array();
if (in_array($site, array('m-team','mocat','hdbd'))) {
if (isset($configALL[$site]['ip_type'])) {
$configALL[$site]['url_join'][] = $configALL[$site]['ip_type'].'=1';
}
$configALL[$site]['url_join'][] = 'https=1';
}
}
}
// 通用操作:替换
if (isset($configALL[$site]['url_replace']) && $configALL[$site]['url_replace']) {
$url = strtr($url, $configALL[$site]['url_replace']);
}
// 通用操作:拼接
if (isset($configALL[$site]['url_join']) && $configALL[$site]['url_join']) {
$url = $url.(strpos($url, '?') === false ? '?' : '&').implode('&', $configALL[$site]['url_join']);
}
return $url;
}
/**
* 微信模板消息拼接方法
*/
public static function wechatMessage()
private static function wechatMessage()
{
global $configALL;
if (isset($configALL['notify_on_change']) && $configALL['notify_on_change'] && self::$wechatMsg['reseedSuccess'] == 0 && self::$wechatMsg['reseedError'] == 0) {
return;
}
$br = PHP_EOL;
$text = 'IYUU自动辅种-统计报表';
$desp = '总做种'.self::$wechatMsg['hashCount'] . ' [客户端正在做种的hash总数]' .$br;
$desp .= '返回数据'.self::$wechatMsg['reseedCount']. ' [服务器返回的可辅种数据]' .$br;
$desp .= '支持站点'.self::$wechatMsg['sitesCount']. ' [当前支持自动辅种的站点数量]' .$br;
$desp .= '成功'.self::$wechatMsg['reseedSuccess']. ' [辅种成功会把hash加入缓存]' .$br;
$desp .= '失败'.self::$wechatMsg['reseedError']. ' [下载器下载种子失败或网络超时引起,可以重试]' .$br;
$desp .= '重复'.self::$wechatMsg['reseedRepeat']. ' [客户端已做种]' .$br;
$desp .= '跳过'.self::$wechatMsg['reseedSkip']. ' [未设置passkey]' .$br;
$desp .= '忽略'.self::$wechatMsg['reseedPass']. ' [成功添加存在缓存]' .$br;
$desp = '### 版本号'. self::VER . $br;
$desp .= '**支持站点'.self::$wechatMsg['sitesCount']. '** [当前支持自动辅种的站点数量]' .$br;
$desp .= '**总做种'.self::$wechatMsg['hashCount'] . '** [客户端做种的hash总数]' .$br;
$desp .= '**返回数据'.self::$wechatMsg['reseedCount']. '** [服务器返回的可辅种数据]' .$br;
$desp .= '**成功'.self::$wechatMsg['reseedSuccess']. '** [会把hash加入辅种缓存]' .$br;
$desp .= '**失败'.self::$wechatMsg['reseedError']. '** [种子下载失败或网络超时引起]' .$br;
$desp .= '**重复'.self::$wechatMsg['reseedRepeat']. '** [客户端已做种]' .$br;
$desp .= '**跳过'.self::$wechatMsg['reseedSkip']. '** [未设置passkey]' .$br;
$desp .= '**忽略:'.self::$wechatMsg['reseedPass']. '** [成功添加存在缓存]' .$br;
// 失败详情
if (self::$wechatMsg['reseedError']) {
$desp .= '**失败详情,见 ./torrent/cache/reseedError.txt**'.$br;
}
// 重新辅种
$desp .= '**如需重新辅种,请删除 ./torrent/cachehash 辅种缓存。**'.$br;
// 移动做种
if (self::$wechatMsg['MoveSuccess'] || self::$wechatMsg['MoveError']) {
$desp .= $br.'----------'.$br;
$desp .= '**移动成功:'.self::$wechatMsg['MoveSuccess']. '** [会把hash加入移动缓存]' .$br;
$desp .= '**移动失败:'.self::$wechatMsg['MoveError']. '** [解决错误提示,可以重试]' .$br;
$desp .= '**如需重新移动,请删除 ./torrent/cachemove 移动缓存。**'.$br;
}
$desp .= $br.'*此消息将在3天后过期*。';
return ff($text, $desp);
}
/**
@@ -721,7 +950,7 @@ class AutoReseed
$res = self::$curl->get(self::$apiUrl.self::$endpoints['notify'].'?'.$notify);
$res = json_decode($res->response, true);
if (isset($res['data']['success']) && $res['data']['success']) {
echo '感谢您的参与,种子被删除,上报成功!!'.PHP_EOL;
echo '感谢您的参与,失效种子上报成功!!'.PHP_EOL;
}
return true;
}
@@ -737,4 +966,16 @@ class AutoReseed
'torrent_id'=> $torrent_id,
);
}
/**
* 备份功能
*/
private static function backup($key = '', $array = [])
{
$json = json_encode($array, JSON_UNESCAPED_UNICODE);
$myfile = ROOT_PATH.DS.'config'.DS.$key.'.json';
$file_pointer = @fopen($myfile, "w");
$worldsnum = @fwrite($file_pointer, $json);
@fclose($file_pointer);
return $worldsnum;
}
}

View File

@@ -82,7 +82,7 @@ class qBittorrent extends AbstractClient
$this->api_version = $api_version;
$this->curl = new Curl();
$this->curl->setOpt(CURLOPT_SSL_VERIFYPEER, false); // 禁止验证证书
$this->curl->setOpt(CURLOPT_SSL_VERIFYHOST, false); // 不检查证书
$this->curl->setOpt(CURLOPT_SSL_VERIFYHOST, 2); // 不检查证书
$this->curl->setOpt(CURLOPT_CONNECTTIMEOUT, 60); // 超时
$this->curl->setOpt(CURLOPT_TIMEOUT, 600); // 超时
// Authenticate and get cookie, else throw exception

View File

@@ -133,7 +133,7 @@ class transmission extends AbstractClient
*/
public function __construct($url = 'http://127.0.0.1:9091/transmission/rpc', $username = null, $password = null)
{
$this->url = $url;
$this->url = rtrim($url, '/');
$this->username = $username;
$this->password = $password;
}

View File

@@ -1,9 +1,4 @@
<?php
/**
* @brief 文件处理
* @version 0.6
*/
namespace IYUU\Library;
/**
@@ -13,7 +8,6 @@ namespace IYUU\Library;
class IFile
{
private $resource = null; //文件资源句柄
/**
* @brief 构造函数,打开资源流,并独占锁定
* @param String $fileName 文件路径名

View File

@@ -1,15 +1,15 @@
<?php
/**
* IYUU用户注册、认证
*/
namespace IYUU\Library;
use Curl\Curl;
/**
* IYUU用户注册、认证
*/
class Oauth
{
// 合作的站点
public static $sites = ['ourbits'];
public static $sites = ['ourbits','hddolby','hdhome','pthome','moecat'];
// 爱语飞飞token
public static $token = '';
// 合作站点用户id
@@ -18,25 +18,8 @@ class Oauth
public static $passkey = '';
// 合作站名字
public static $site = '';
/**
* 初始化配置
*/
public static function init()
{
global $configALL;
foreach (self::$sites as $name) {
if (isset($configALL[$name]['passkey']) && $configALL[$name]['passkey'] && isset($configALL[$name]['id']) && $configALL[$name]['id']) {
self::$token = self::getSign();
self::$user_id = $configALL[$name]['id'];
self::$passkey = sha1($configALL[$name]['passkey']); // 避免泄露用户passkey秘钥
self::$site = $name;
return true;
}
}
echo "-----缺少合作站点登录参数token, user_id, passkey, site \n";
echo "-----当前正在使用测试接口,功能可能会受到限制! \n\n";
return false;
}
// 登录缓存路径
public static $SiteLoginCache = ROOT_PATH.DS.'config'.DS.'siteLoginCache_{}.json';
/**
* 从配置文件内读取爱语飞飞token作为鉴权参数
*/
@@ -57,22 +40,61 @@ class Oauth
* 作用在服务器端实现微信用户与合作站点用户id的关联
* 参数爱语飞飞token + 合作站点用户id + sha1(合作站点密钥passkey) + 合作站点标识
*/
public static function login($apiUrl = '')
public static function login($apiUrl = '', $sites = array())
{
$is_oauth = self::init();
if ($is_oauth) {
$curl = new Curl();
$curl->setOpt(CURLOPT_SSL_VERIFYPEER, false);
$data = [
'token' => self::$token,
'id' => self::$user_id,
'passkey'=> self::$passkey,
'site' => self::$site,
];
$res = $curl->get($apiUrl, $data);
p($res->response);
return true;
global $configALL;
// 云端下发合作的站点标识
self::$sites = $sites ? $sites : self::$sites;
$ret = false;
self::$token = self::getSign();
foreach (self::$sites as $name) {
if (is_file(str_replace('{}', $name, self::$SiteLoginCache))) {
// 存在鉴权缓存
$ret = true;
continue;
}
if (isset($configALL[$name]['passkey']) && $configALL[$name]['passkey'] && isset($configALL[$name]['id']) && $configALL[$name]['id']) {
self::$user_id = $configALL[$name]['id'];
self::$passkey = sha1($configALL[$name]['passkey']); // 避免泄露用户passkey秘钥
self::$site = $name;
$curl = new Curl();
$curl->setOpt(CURLOPT_SSL_VERIFYPEER, false);
$data = [
'token' => self::$token,
'id' => self::$user_id,
'passkey'=> self::$passkey,
'site' => self::$site,
];
$res = $curl->get($apiUrl, $data);
p($res->response);
$rs = json_decode($res->response, true);
if (isset($rs['ret']) && $rs['ret'] == 200 && isset($rs['data']['success']) && $rs['data']['success']) {
self::setSiteLoginCache($name, $rs);
$ret = true;
} else {
$msg = isset($rs['msg']) && $rs['msg'] ? $rs['msg'] : '远端服务器无响应,请稍后重试!';
$msg = isset($rs['data']['errmsg']) && $rs['data']['errmsg'] ? $rs['data']['errmsg'] : $msg;
echo $msg . PHP_EOL;
}
} else {
echo $name.'合作站点参数配置不完整请同时填写passkey和用户id。' . PHP_EOL;
echo '合作站点鉴权配置请查阅https://www.iyuu.cn/archives/337/'. PHP_EOL. PHP_EOL;
}
}
return false;
return $ret;
}
/**
* 写鉴权成功缓存
* @desc 作用:减少对服务器请求,跳过鉴权提示信息;
*/
private static function setSiteLoginCache($key = '', $array = [])
{
$json = json_encode($array, JSON_UNESCAPED_UNICODE);
$myfile = str_replace('{}', $key, self::$SiteLoginCache);
$file_pointer = @fopen($myfile, "w");
$worldsnum = @fwrite($file_pointer, $json);
@fclose($file_pointer);
}
}

View File

@@ -1,54 +1,47 @@
<?php
namespace IYUU\Library;
/**
* Created by PhpStorm.
* User: 大卫
* Date: 2020-1-19
* Time: 17:44
*/
namespace IYUU\Library;
class Table
{
const ALIGN_LEFT = 1;
const ALIGN_RIGHT = 0;
const ALIGN_CENTER = 2;
/**
* 头信息数据
* @var array
*/
protected $header = [];
/**
* 头部对齐方式 默认1 ALGIN_LEFT 0 ALIGN_RIGHT 2 ALIGN_CENTER
* @var int
*/
protected $headerAlign = 1;
/**
* 表格数据(二维数组)
* @var array
*/
protected $rows = [];
/**
* 单元格对齐方式 默认1 ALGIN_LEFT 0 ALIGN_RIGHT 2 ALIGN_CENTER
* @var int
*/
protected $cellAlign = 1;
/**
* 单元格宽度信息
* @var array
*/
protected $colWidth = [];
/**
* 表格输出样式
* @var string
*/
protected $style = 'default';
/**
* 表格样式定义
* @var array

View File

@@ -1,5 +1,4 @@
<?php
use IYUU\Library\IFile;
use IYUU\Library\Table;
@@ -149,7 +148,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);
@@ -448,3 +447,12 @@ function ShowTableSites($dir = 'Protocols', $filter = array())
$table->setRows($data);
echo($table->render());
}
/**
* 是否win平台
* @return bool
*/
function isWin()
{
return (DIRECTORY_SEPARATOR == '\\') ? true : false;
}

24
backup.sh Normal file
View File

@@ -0,0 +1,24 @@
#!/bin/sh
# 传入的种子备份参数
if [ $1 ]; then
AppName=$1
fi
if [ $2 ]; then
torrentDir=$2
fi
# 脚本当前目录
pwddir=$(cd $(dirname $0); pwd)
# 当前日期
DATE=$(date +%Y%m%d)
# 备份在当前目录
backupdir=$pwddir"/"$AppName$DATE
echo "种子备份目录:"$backupdir
mkdir $backupdir -p
# 种子目录
torrentDir=$torrentDir"/*"
# 备份
cp -rf $torrentDir $backupdir
# 成功提示
echo "ok";

View File

@@ -1,2 +0,0 @@
@echo off
composer install

View File

@@ -1,4 +1,14 @@
{
"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": "*",

View File

@@ -2,63 +2,73 @@
/**
* 技术讨论及后续更新请加入QQ群
群名称IYUU自动辅种交流
QQ群号859882209
QQ群号859882209、931954050
* IYUU自动辅种工具-【安装篇】如何下载最新源码? https://www.iyuu.cn/archives/338/
* IYUU自动辅种工具-【安装篇】Windows之git https://www.iyuu.cn/archives/367/
* IYUU自动辅种工具-【安装篇】群晖Linux之git https://www.iyuu.cn/archives/372/
* IYUU自动辅种工具-【安装篇】小钢炮手把手教程 https://www.iyuu.cn/archives/386/
* 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
* IYUU自动下载种子--之RSS订阅使用教程 https://www.iyuu.cn/archives/349/
* IYUU自动转移做种客户端--使用教程 https://www.iyuu.cn/archives/351/
脚本仓库GIT下载法:
git clone https://gitee.com/ledc/IYUUAutoReseed.git
cd IYUUAutoReseed
composer install
php ./iyuu.php
*/
return array(
// 有变化才发送通知(辅种成功 + 失败 > 0
'notify_on_change' => false,
// 1.【必须配置】爱语飞飞 微信通知请访问https://iyuu.cn 用微信扫码申请
'iyuu.cn' => 'IYUU',
// 2.server酱 微信通知配置
'sc.ftqq.com' => '',
// 3.发布员鉴权
'secret' => '',
// 4.全局默认配置
// 2.全局默认配置
'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.【自动辅种必须配置】全局客户端设置(条目不够可以复制)
// 3.【必须配置】浏览器UA打开http://demo.iyuu.cn 复制过来即可
'userAgent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.1303.189 Safari/537.36',
// 4.【自动辅种必须配置】全局客户端设置(条目不够可以复制)
'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' => '',
'BT_backup' => '/var/lib/transmission/torrents', // 移动做种:如果脚本与当前客户端不在一台机器,必须配置
'move' => 0, // 0不移动1移动并辅种2移动仅辅种自身3未定义
'username' => '', // 没有用户名请填写null
'password' => '', // 没有密码 请填写null
'BT_backup' => '/torrents', // 移动做种:如果脚本与当前客户端不在一台机器,必须配置
'move' => 0, // 0不移动1移动并辅种2移动且只在当前客户端辅种
),
# 结束
# 开始
array(
'type' => 'qBittorrent', // 支持transmission、qBittorrent
'host' => 'http://127.0.0.1:8083',
'username' => '',
'username' => 'admin',
'password' => '',
'BT_backup' => 'C:\Users\ASUS\AppData\Local\qBittorrent\BT_backup', // 移动做种:必须配置
'move' => 0, // 0不移动1移动并辅种2移动仅辅种自身3未定义
'root_folder'=> 1, // 0不创建根目录1创建根目录
'BT_backup' => '/BT_backup', // 移动做种必须配置Linux搜索方法find / -name BT_backup
'move' => 0, // 0不移动1移动并辅种2移动且只在当前客户端辅种
),
# 结束
// 全局客户端设置 结束
),
// 移动做种必须配置
// 5.移动做种必须配置
'move' =>array(
'type' => 0, // 0保持不变1减2加3替换
'path' =>array(
// 当前路径 => 目标路径
'/downloads' => '/volume1',
),
'path_filter'=> array(), //转移过滤器:不转移此路径内文件
'path_selector' => array(), //转移选择器:只转移此路径内文件(为空时,全转移) 【优先级:过滤器 选择器】
'paused' => 0, //转移成功自动开始任务0开始1暂停
'skip_check' => 0, //转移成功跳校验0不跳、1跳校验
'delete_torrent' => 0, //转移成功删除当前做种0不删除、1删除
),
// 6.RSS工作模式
'workingMode' => 0,
'watch' => '/volume1/downloads',
// 7.监控目录
'watch' => '/volume1/watch',
// 8.RSS过滤参数配置
'filter' => array(
'size'=>array(
'min' => '1GB',
@@ -80,59 +90,30 @@ return array(
'CONNECTTIMEOUT'=> 60,
'TIMEOUT' => 600,
),
// 9.server酱 微信通知配置
'sc.ftqq.com' => '',
// 10.发布员鉴权
'secret' => '',
/**
* 以下为各站点的独立配置(互不影响、互不冲突)
* 自动辅种需要配置各站的passkey没有配置passkey的站点会自动跳过
*/
// m-team 序号1
'm-team' => array(
// 14.m-team的cookie 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => 'tp=',
// 15.m-team的passkey 【必须配置】
'passkey' => '',
// 种子Tracker的IP地址选择 可选ipv4ipv6
'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(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'workingMode' => 1,
'watch' => '',
'filter' => array(
'size'=>array(
'min' => '1GB',
'max' => '280GB',
),
),
),
// ourbits 序号3
// ourbits
'ourbits' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'id' => 0, // 用户ID
'is_vip' => 0, // 是否具有VIP或特殊权限0 普通1 VIP
'id' => 0, // 用户ID(不是用户名)
'url_replace' => array(),
'url_join' => array(
//'ipv6=1', // 种子Tracker的IP地址选择 可选ipv4ipv6
//'https=1',
),
'limitRule' => array(
'count' => 20, // 每次辅种20个
'sleep' => 15, // 最少休眠15秒
),
'workingMode' => 0,
'watch' => '/root/downloads',
'filter' => array(
@@ -141,326 +122,521 @@ return array(
'max' => '280GB',
),
),
),
// HDSky 序号4
'hdsky' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
),
// pter 序号5
'pter' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
),
// tjupt 序号6
'tjupt' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
),
// hdhome 序号7
'hdhome' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
),
// btschool 序号8
'btschool' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
),
// PTHome 序号9
'pthome' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
),
// hddolby 序号10
// hddolby
'hddolby' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'id' => 0, // 用户ID(不是用户名)
'url_replace' => array(),
'url_join' => array(),
'limitRule' => array(
'count' => 20, // 每次辅种20个
'sleep' => 5, // 最少休眠5秒
),
),
// TorrentCCF 序号11
'torrentccf' => array(
// hdhome
'hdhome' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'id' => 0, // 用户ID(不是用户名)
'url_replace' => array(),
'url_join' => array(),
'limitRule' => array(
'count' => 20, // 每次辅种20个
'sleep' => 5, // 最少休眠5秒
),
),
// PTMSG 序号12
'ptmsg' => array(
// PTHome
'pthome' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'id' => 0, // 用户ID(不是用户名)
'url_replace' => array(),
'url_join' => array(),
'limitRule' => array(
'count' => 20, // 每次辅种20个
'sleep' => 5, // 最少休眠5秒
),
),
// MoeCat 序号13
// MoeCat
'moecat' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
// 种子Tracker的IP地址选择 可选ipv4ipv6
'ip_type' => 'ipv4',
'id' => 0, // 用户ID(不是用户名)
'url_replace' => array(),
'url_join' => array(
//'ipv6=1', // 种子Tracker的IP地址选择 可选ipv4ipv6
'https=1',
),
'limitRule' => array(
'count' => 20, // 每次辅种20个
'sleep' => 15, // 最少休眠15秒
),
),
// totheglory 序号14
// m-team
'm-team' => array(
// 14.m-team的cookie 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => 'tp=',
// 15.m-team的passkey 【必须配置】
'passkey' => '',
'url_replace' => array(),
'url_join' => array(
//'ipv6=1', // 种子Tracker的IP地址选择 可选ipv4ipv6
'https=1',
),
),
// keepfrds
'keepfrds' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
'workingMode' => 1,
'watch' => '',
'filter' => array(
'size'=>array(
'min' => '1GB',
'max' => '280GB',
),
),
),
// pter
'pter' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// tjupt
'tjupt' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// btschool
'btschool' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// HDSky
'hdsky' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'limitRule' => array(
'count' => 20, // 每次辅种50个
'sleep' => 20, // 最少休眠15秒
),
'url_replace' => array(),
'url_join' => array(),
),
// TorrentCCF
'torrentccf' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// PTMSG
'ptmsg' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// totheglory
'ttg' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
// 如果需要rss订阅必须配置
'url_replace' => array(),
'url_join' => array(),
'rss' => '',
),
// nanyangpt 序号15
// nanyangpt
'nanyangpt' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// springsunday.net 序号16
// springsunday.net
'ssd' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
'limitRule' => array(
'count' => 20, // 每次辅种20个
'sleep' => 15, // 最少休眠15秒
),
),
// yingk 序号17
// yingk
'yingk' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// hdcity 序号18
// hdcity
'hdcity' => array(
// 必须配置
'cookie' => '',
// 如果需要自动辅种必须配置cuhash
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// 52pt.site 序号19
// 52pt.site
'52pt' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// brobits.cc 序号20
// brobits
'brobits' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// www.beitai.pt 序号21
// beitai
'beitai' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// pt.eastgame.org 序号22
// eastgame
'eastgame' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// pt.soulvoice.club 序号23
// soulvoice
'soulvoice' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// chdbits 序号24
// chdbits
'chdbits' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// leaguehd 序号25
// leaguehd
'leaguehd' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// ptsbao.club 序号26
// ptsbao
'ptsbao' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// hdchina 序号27
// hdchina
'hdchina' => array(
// 必须配置
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
'limitRule' => array(
'count' => 10, // 每次辅种10个
'sleep' => 5, // 最少休眠15秒
),
),
// hdarea 序号28
// hdarea
'hdarea' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// hdtime 序号29
// hdtime
'hdtime' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// 1ptba 序号30
// 1ptba
'1ptba' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// hd4fans 序号31
// hd4fans
'hd4fans' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// hddisk.life 序号32
// hddisk.life
'hdbug' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// opencd 序号33 皇后
// opencd皇后
'opencd' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// hdstreet 序号34
// hdstreet
'hdstreet' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// joyhd 序号35
// joyhd
'joyhd' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// dmhy 序号36 幼儿园
// dmhy幼儿园
'dmhy' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// hdu 序号37
// hdu
'upxin' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// oshen 序号38
// oshen
'oshen' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// discfan 序号39 港知堂
// discfan港知堂
'discfan' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// hdzone 序号40
// hdzone
'hdzone' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// cnscg 序号41 圣城
'cnscg' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
),
// nicept 序号42 老师
// nicept老师
'nicept' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// hdbd 序号43 伊甸园
// hdbd伊甸园
'hdbd' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(
//'ipv6=1', // 种子Tracker的IP地址选择 可选ipv4ipv6
//'https=1',
),
),
// byr 序号44 北邮
// byr北邮
'byr' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// CCFBits 序号45
// CCFBits
'ccfbits' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// hdbits 序号46
// hdbits
'hdbits' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// PTPBD 序号47
// PTPBD
'ptpbd' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// HD-T 序号48
// HD-T
'hd-torrents' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// 配置文件结束
// skyeysnow天雪
'skyeysnow' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// pt.sjtu葡萄
'pt' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
'limitRule' => array(
'count' => 20, // 每次辅种20个
'sleep' => 20, // 最少休眠20秒
),
),
// hdroute
'hdroute' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// haidan
'haidan' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// hdfans
'hdfans' => array(
// 如果需要用下载免费种脚本,须配置(只是自动辅种,可以不配置此项)
'cookie' => '',
// 如果需要自动辅种,必须配置
'passkey' => '',
'url_replace' => array(),
'url_join' => array(),
),
// 配置结束,后面的一行不能删除,必须保留!!!
);

109
docker/AMD64/Dockerfile Normal file
View File

@@ -0,0 +1,109 @@
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"} \
cron="0 10 * * 0"
##
# ---------- 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 \
&& echo '2 */5 * * * cd /var/www && git fetch --all && git reset --hard origin/master' >> /etc/crontabs/root \
# ---------- 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
CMD ["sh", "-c", "/usr/bin/php /var/www/iyuu.php ; /usr/sbin/crond ; (crontab -l ;echo \"$cron /usr/bin/php /var/www/iyuu.php &> /dev/null\") | crontab - ; tail -f /dev/null"]

4
docker/AMD64/build.sh Normal file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
docker build -t iyuu:latest .
docker run -it -v /root/config.php:/config.php --network bridge --name IYUUAutoReseed --restart always -d iyuu:latest
docker exec -it IYUUAutoReseed php iyuu.php

28
docker/Arm64v8/Dockerfile Normal file
View File

@@ -0,0 +1,28 @@
# FROM arm64v8/alpine
# FROM arm64v8/alpine:latest
FROM arm64v8/alpine:3.12
ENV TZ Asia/Shanghai
ENV cron="0 9 * * 0"
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.aliyun.cn/' /etc/apk/repositories \
&& apk update \
&& apk add --no-cache \
tzdata \
php7 php7-curl php7-json php7-mbstring php7-dom php7-simplexml php7-xml php7-zip \
git \
&& git clone https://gitee.com/ledc/IYUUAutoReseed.git /IYUU \
&& cp /IYUU/config/config.sample.php /IYUU/config/config.php \
&& ln -sf /IYUU/config/config.php /config.php \
&& apk del --purge *-dev \
&& rm -rf /var/cache/apk/* /tmp/* /usr/share/man \
&& echo "${TZ}" > /etc/timezone \
&& ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo '2 */6 * * * cd /IYUU && git fetch --all && git reset --hard origin/master' >> /etc/crontabs/root
WORKDIR /IYUU
CMD ["sh", "-c", "/usr/bin/php /IYUU/iyuu.php ; /usr/sbin/crond ; (crontab -l ;echo \"$cron /usr/bin/php /IYUU/iyuu.php &> /dev/null\") | crontab - ; tail -f /dev/null"]

View File

@@ -0,0 +1,4 @@
#!/bin/sh
docker build -t iyuu:arm64v8 .
docker run -it -v /root/config.php:/config.php -v /var/lib/transmission/torrents:/torrents -v /var/lib/qbittorrent/.local/share/data/qBittorrent/BT_backup:/BT_backup --network bridge --name IYUUAutoReseed --restart always -d iyuu:arm64v8
docker exec -it IYUUAutoReseed php iyuu.php

4
docker/Arm64v8/build.sh Normal file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
docker build -f Dockerfile -t iyuu:arm64v8 .
docker run -it -v /root/config.php:/config.php --network bridge --name IYUUAutoReseed --restart always -d iyuu:arm64v8
docker exec -it IYUUAutoReseed php iyuu.php

3
docker/Arm64v8/iyuu.sh Normal file
View 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

137
docker/Readme.md Normal file
View File

@@ -0,0 +1,137 @@
# 使用方法:
### 1.拉取镜像、创建容器,运行
#### ARM平台通用方法
```
docker run -d \
--name IYUUAutoReseed \
-e cron='0 9 * * 0' \
-v /root/config.php:/config.php \
--restart=always \
iyuucn/iyuuautoreseed:arm64v8
```
#### 小钢炮方法:
```
docker run -d \
--name IYUUAutoReseed \
-e cron='0 8 * * 0' \
-v /root/config.php:/config.php \
-v /var/lib/transmission/torrents:/torrents \
-v /var/lib/qbittorrent/.local/share/data/qBittorrent/BT_backup:/BT_backup \
--restart always \
iyuucn/iyuuautoreseed:arm64v8
```
#### AMD64平台MAC OS、台式、服务器、NAS等
```
docker run -d \
--name IYUUAutoReseed \
-e cron='0 9 * * 0' \
-v /root/config.php:/config.php \
--restart=always \
iyuucn/iyuuautoreseed:latest
```
**命令解释**
| 参数 | 解释 |
| ----------- | ------------------------------------------------------------ |
| `--name` | 容器名字 |
| `-e` | 环境变量,定时任务执行时间 |
| `-v` | 本地目录或文件:容器目录文件,资源挂载到容器。<br />请把你的配置文件放在/root/config.php会把你的配置映射进容器内。 |
| `--restart` | 启动模式 |
------
### 2.停止
```
docker stop IYUUAutoReseed
```
### 3.运行
```
docker start IYUUAutoReseed
```
### 4.删除容器
```
docker rm IYUUAutoReseed
```
### 5.删除镜像
```
docker rmi iyuucn/iyuuautoreseed:arm64v8
```
------
#### 功能
IYUU自动辅种工具功能分为两大块自动辅种、自动转移。
- 自动辅种目前能对国内大部分的PT站点自动辅种支持下载器集群支持多盘位支持多下载目录支持远程连接等
- 自动转移:可以实现各下载器之间自动转移做种客户端,让下载器各司其职(专职的保种、专职的下载)。
#### 原理
IYUU自动辅种工具英文名IYUUAutoReseed是一款PHP语言编写的Private Tracker辅种脚本通过计划任务或常驻内存按指定频率调用transmission、qBittorrent下载软件的API接口提取正在做种的info_hash提交到辅种服务器API接口辅种过程和PT站没有任何交互根据API接口返回的数据拼接种子连接提交给下载器自动辅种各个站点。
#### 优势
- 全程自动化,无需人工干预;
- 支持多盘位,多做种目录,多下载器,支持远程下载器;
- 辅种精确度高,精度可配置;
- 支持微信通知,消息即时达;
- 自动对合集包,进行拆包辅种(暂未开发)
- 安全:所有隐私信息只在本地存储,绝不发送给第三方。
- 拥有专业的问答社区和交流群
#### 支持的下载器
1. transmission
2. qBittorrent
#### 运行环境
具备PHP运行环境的所有平台例如Linux、Windows、MacOS
官方下载的记得开启curl、json、mbstring这3个扩展。
1. Windows安装php环境https://www.php.net/downloads
#### 源码仓库
- github仓库https://github.com/ledccn/IYUUAutoReseed
- 码云仓库https://gitee.com/ledc/IYUUAutoReseed
#### 使用方法
- 博客https://www.iyuu.cn/
#### 接口开发文档
如果您懂得其他语言的开发可以基于接口做成任何您喜欢的样子比如手机APP二进制包Windows的GUI程序浏览器插件等。欢迎分享您的作品
实时更新的接口文档http://api.iyuu.cn/docs.php
#### 需求提交/错误反馈
- QQ群859882209[2000人.入门群]931954050[1000人.进阶群]
- 问答社区http://wenda.iyuu.cn
- 博客https://www.iyuu.cn/
- issues https://gitee.com/ledc/IYUUAutoReseed/issues

9
git_pull.sh Normal file
View File

@@ -0,0 +1,9 @@
#!/bin/sh
#脚本功能从git拉取最新代码然后执行辅种
pwddir=$(cd $(dirname $0); pwd)
echo $pwddir
cd $(dirname $0)
git fetch --all
git reset --hard origin/master
git pull
php ./iyuu.php

View File

@@ -1,4 +1,24 @@
<?php
/**
IIIIIIIIIIYYYYYYY YYYYYYYUUUUUUUU UUUUUUUUUUUUUUUU UUUUUUUU
I::::::::IY:::::Y Y:::::YU::::::U U::::::UU::::::U U::::::U
I::::::::IY:::::Y Y:::::YU::::::U U::::::UU::::::U U::::::U
II::::::IIY::::::Y Y::::::YUU:::::U U:::::UUUU:::::U U:::::UU
I::::I YYY:::::Y Y:::::YYY U:::::U U:::::U U:::::U U:::::U
I::::I Y:::::Y Y:::::Y U:::::D D:::::U U:::::D D:::::U
I::::I Y:::::Y:::::Y U:::::D D:::::U U:::::D D:::::U
I::::I Y:::::::::Y U:::::D D:::::U U:::::D D:::::U
I::::I Y:::::::Y U:::::D D:::::U U:::::D D:::::U
I::::I Y:::::Y U:::::D D:::::U U:::::D D:::::U
I::::I Y:::::Y U:::::D D:::::U U:::::D D:::::U
I::::I Y:::::Y U::::::U U::::::U U::::::U U::::::U
II::::::II Y:::::Y U:::::::UUU:::::::U U:::::::UUU:::::::U
I::::::::I YYYY:::::YYYY UU:::::::::::::UU UU:::::::::::::UU
I::::::::I Y:::::::::::Y UU:::::::::UU UU:::::::::UU
IIIIIIIIII YYYYYYYYYYYYY UUUUUUUUU UUUUUUUUU
*/
// 定义目录
defined('ROOT_PATH') or define("ROOT_PATH", __DIR__);
define('DS', DIRECTORY_SEPARATOR);
@@ -30,15 +50,18 @@ if (file_exists(ROOT_PATH."/config/config.php")) {
// 配置(全局变量)
$configALL = require_once ROOT_PATH . "/config/config.php";
} else {
// 第一次会生成
@copy(ROOT_PATH . '/config/config.sample.php', ROOT_PATH . '/config/config.php');
// 示例配置
$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;
echo microtime(true).' 请编辑配置文件config.php以免后续版本升级覆盖配置'.PHP_EOL;
$t = 30;
do {
echo microtime(true)."配置文件改名为config.php{$t}秒后继续...".PHP_EOL;
echo microtime(true)."编辑配置文件config.php{$t}秒后退出...".PHP_EOL;
sleep(1);
} while (--$t > 0);
exit;
}
echo microtime(true).' 全局配置载入完成!'.PHP_EOL;
// 读取支持列表
@@ -50,6 +73,7 @@ if (is_file(ROOT_PATH . "/config/sites.json")) {
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") {

View File

@@ -1,8 +1,31 @@
<?php
/**
_____ _____ _____ _____
/\ \ |\ \ /\ \ /\ \
/::\ \ |:\____\ /::\____\ /::\____\
\:::\ \ |::| | /:::/ / /:::/ /
\:::\ \ |::| | /:::/ / /:::/ /
\:::\ \ |::| | /:::/ / /:::/ /
\:::\ \ |::| | /:::/ / /:::/ /
/::::\ \ |::| | /:::/ / /:::/ /
____ /::::::\ \ |::|___|______ /:::/ / _____ /:::/ / _____
/\ \ /:::/\:::\ \ /::::::::\ \ /:::/____/ /\ \ /:::/____/ /\ \
/::\ \/:::/ \:::\____\ /::::::::::\____\|:::| / /::\____\|:::| / /::\____\
\:::\ /:::/ \::/ / /:::/~~~~/~~ |:::|____\ /:::/ /|:::|____\ /:::/ /
\:::\/:::/ / \/____/ /:::/ / \:::\ \ /:::/ / \:::\ \ /:::/ /
\::::::/ / /:::/ / \:::\ \ /:::/ / \:::\ \ /:::/ /
\::::/____/ /:::/ / \:::\ /:::/ / \:::\ /:::/ /
\:::\ \ \::/ / \:::\__/:::/ / \:::\__/:::/ /
\:::\ \ \/____/ \::::::::/ / \::::::::/ /
\:::\ \ \::::::/ / \::::::/ /
\:::\____\ \::::/ / \::::/ /
\::/ / \::/____/ \::/____/
\/____/ ~~ ~~
*/
require_once __DIR__ . '/init.php';
echo '当前脚本路径:'.__FILE__.PHP_EOL;
use IYUU\AutoReseed;
echo microtime(true).' IYUU自动辅种正在初始化...'.PHP_EOL;
AutoReseed::init();
AutoReseed::call();
exit(0);

View File

@@ -10,54 +10,89 @@
第三您使用IYUU工具造成的一切损失与IYUU无关。如不接受此条款请不要使用IYUUAutoReseed并立刻删除已经下载的源码。
![stars](https://img.shields.io/github/stars/ledccn/IYUUAutoReseed)![forks](https://img.shields.io/github/forks/ledccn/IYUUAutoReseed)![release](https://img.shields.io/github/release/ledccn/IYUUAutoReseed.svg)
## 获取脚本,三种方式皆可
1. 通过git命令安装
`git clone https://github.com/ledccn/IYUUAutoReseed.git`
2. 通过composer命令安装
`composer create-project ledccn/iyuuautoreseed:dev-master`
3. 直接下载zip源码包
`https://github.com/ledccn/IYUUAutoReseed/archive/master.zip`
## 功能
IYUU自动辅种工具目前能对国内大部分的PT站点自动辅种支持下载器集群支持多盘位支持多下载目录支持远程连接等
IYUU自动辅种工具功能分为两大块:自动辅种、自动转移
- 自动辅种目前能对国内大部分的PT站点自动辅种支持下载器集群支持多盘位支持多下载目录支持远程连接等
- 自动转移:可以实现各下载器之间自动转移做种客户端,让下载器各司其职(专职的保种、专职的下载)。
## 原理
IYUU自动辅种工具英文名IYUUAutoReseed是一款PHP语言编写的Private Tracker辅种脚本通过计划任务或常驻内存按指定频率调用transmission、qBittorrent下载软件的API接口提取正在做种的info_hash提交到服务器API接口根据API接口返回的数据拼接种子连接提交给下载器自动辅种各个站点。
IYUU自动辅种工具英文名IYUUAutoReseed是一款PHP语言编写的Private Tracker辅种脚本通过计划任务或常驻内存按指定频率调用transmission、qBittorrent下载软件的API接口提取正在做种的info_hash提交到辅种服务器API接口辅种过程和PT站没有任何交互根据API接口返回的数据拼接种子连接提交给下载器自动辅种各个站点。
## 优势
- 全程自动化,无需人工干预;
- 支持多盘位,多做种目录,多下载器,支持远程连接下载器;
- 支持多盘位,多做种目录,多下载器,支持远程下载器;
- 辅种精确度高,精度可配置;
- 支持微信通知,消息即时达;
- 自动对合集包,进行拆包辅种(暂未开发)
- 安全:所有隐私信息只在本地存储,绝不发送给第三方。
- 拥有专业的问答社区和交流群
## 支持的下载器
1. transmission
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、天雪、葡萄、HDRoute、伊甸园hdbd、海胆haidan、HDfans
## 运行环境
具备PHP运行环境的所有平台例如Linux、Windows、MacOS
官方下载的记得开启crul、fileinfo、mbstring这3个扩展。
官方下载的记得开启curl、json、mbstring这3个扩展。
1. Windows安装php环境https://www.php.net/downloads
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
https://gitee.com/ledc/IYUUAutoReseed/tree/master/wiki
- 详见Wikihttps://gitee.com/ledc/IYUUAutoReseed/tree/master/wiki
- 博客:https://www.iyuu.cn/
## 接口开发文档
http://api.iyuu.cn/docs.php?type=expand
如果您懂得其他语言的开发可以基于接口做成任何您喜欢的样子比如手机APP二进制包Windows的GUI程序浏览器插件等。欢迎分享您的作品
实时更新的接口文档http://api.iyuu.cn/docs.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) | |
| [AutoPT](https://github.com/lyssssssss/AutoPT) | 此程序用于自动下载PT免费种子并自动辅种和一体化管理。开发目的为了释放双手专注观影 |
| [flexget_qbittorrent_mod](https://github.com/IvonWei/flexget_qbittorrent_mod) | Flexget qBittorrent插件实现全自动化辅种删除种免费种筛选签到等。|
## 需求提交/错误反馈
- 点击链接加入群聊【IYUU自动辅种交流】[https://jq.qq.com/?_wv=1027&k=5JOfOlM][1]
- QQ群859882209
- QQ群859882209[2000人.入门群]931954050[1000人.进阶群]
- 问答社区http://wenda.iyuu.cn
- 博客https://www.iyuu.cn/
- issues https://gitee.com/ledc/IYUUAutoReseed/issues
## 捐助开发者
@@ -65,7 +100,7 @@ http://api.iyuu.cn/docs.php?type=expand
如果喜欢,请帮忙在[Github](https://github.com/ledccn/IYUUAutoReseed)或[码云](https://gitee.com/ledc/IYUUAutoReseed)给个Star也可以对IYUUAutoReseed进行[捐赠](https://gitee.com/ledc/IYUUAutoReseed#%E6%8D%90%E5%8A%A9%E5%BC%80%E5%8F%91%E8%80%85)哦 ^_^。
**您所有的打赏将用于服务器续期,增加服务的延续性。**
**您所有的打赏将用于服务器维护及续期,增加服务的延续性。**
@@ -113,6 +148,8 @@ 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 |
@@ -120,6 +157,29 @@ http://api.iyuu.cn/docs.php?type=expand
| 陈伟平 | ¥28.88元 | 2020年2月13日12:35 |
| PhalApi Pro商业授权 | ¥-950元 | 2020年2月14日21:56 |
| jonnaszheng | ¥10元 | 2020年2月15日10:25 |
| weekendsd54zdk | ¥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 |
| 寒山先生 | ¥200元 | 2020年2月21日17:32 |
| 李永超 | ¥10元 | 2020年2月22日16:24 |
| Always | ¥5元 | 2020年2月22日21:31 |
| 车站 | ¥30元 | 2020年2月22日21:32 |
| 寒山先生 | ¥200元 | 2020年2月23日22:21 |
| 莫凡 | ¥10元 | 2020年2月24日19:43 |
| 未署名 | ¥200元 | 2020年2月25日14:36 |
| 锦年 | ¥6.66元 | 2020年2月25日19:00 |
| 金力 | ¥10元 | 2020年2月26日22:45 |
| 飞翔鱼 | ¥100元 | 2020年2月24日17:58 |
| 团 | ¥1元 | 2020年2月29日1:12 |
| 沙鸥 | ¥10元 | 2020年2月29日17:03 |
| lsy | ¥229.5元 | 2020年3月1日15:15 |
| 慧宇 | ¥30元 | 2020年3月3日16:39 |
| sz贺贺 | ¥100元 | 2020年3月7日14:40 |
| 一介凡人 | ¥8.88元 | 2020年3月9日22:34 |
| | | |
补充说明:
@@ -128,8 +188,3 @@ http://api.iyuu.cn/docs.php?type=expand
2. 所捐赠的资源不属于任何个人,而应作为项目或者开发团队的所需开销;
3. 如果捐赠了却不希望您的名字出现在这里,可以联系我们进行相应处理;
4. 更新有延时,如未能及时更新,可联系我。
[1]: https://jq.qq.com/?_wv=1027&k=5JOfOlM
[2]: https://www.iyuu.cn/usr/uploads/2019/12/801558607.png

7
vendor/autoload.php vendored Normal file
View File

@@ -0,0 +1,7 @@
<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitd8553673db02b2a444a853f28e16196e::getLoader();

445
vendor/composer/ClassLoader.php vendored Normal file
View File

@@ -0,0 +1,445 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Autoload;
/**
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \Composer\Autoload\ClassLoader();
*
* // register classes with namespaces
* $loader->add('Symfony\Component', __DIR__.'/component');
* $loader->add('Symfony', __DIR__.'/framework');
*
* // activate the autoloader
* $loader->register();
*
* // to enable searching the include path (eg. for PEAR packages)
* $loader->setUseIncludePath(true);
*
* In this example, if you try to use a class in the Symfony\Component
* namespace or one of its children (Symfony\Component\Console for instance),
* the autoloader will first look for the class under the component/
* directory, and it will then fallback to the framework/ directory if not
* found before giving up.
*
* This class is loosely based on the Symfony UniversalClassLoader.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
// PSR-4
private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array();
private $fallbackDirsPsr4 = array();
// PSR-0
private $prefixesPsr0 = array();
private $fallbackDirsPsr0 = array();
private $useIncludePath = false;
private $classMap = array();
private $classMapAuthoritative = false;
private $missingClasses = array();
private $apcuPrefix;
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
}
return array();
}
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array $classMap Class to filename map
*/
public function addClassMap(array $classMap)
{
if ($this->classMap) {
$this->classMap = array_merge($this->classMap, $classMap);
} else {
$this->classMap = $classMap;
}
}
/**
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*/
public function add($prefix, $paths, $prepend = false)
{
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
(array) $paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
(array) $paths
);
}
return;
}
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
(array) $paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
(array) $paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories
*/
public function set($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr0 = (array) $paths;
} else {
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
}
}
/**
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*/
public function setPsr4($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
/**
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*/
public function setUseIncludePath($useIncludePath)
{
$this->useIncludePath = $useIncludePath;
}
/**
* Can be used to check if the autoloader uses the include path to check
* for classes.
*
* @return bool
*/
public function getUseIncludePath()
{
return $this->useIncludePath;
}
/**
* Turns off searching the prefix and fallback directories for classes
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
$this->classMapAuthoritative = $classMapAuthoritative;
}
/**
* Should class lookup fail if not found in the current class map?
*
* @return bool
*/
public function isClassMapAuthoritative()
{
return $this->classMapAuthoritative;
}
/**
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}
/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
}
/**
* Unregisters this instance as an autoloader.
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return bool|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
return true;
}
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
$file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM
if (false === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}
if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
}
return $file;
}
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
}
}
}
// PSR-4 fallback dirs
foreach ($this->fallbackDirsPsr4 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
return $file;
}
}
// PSR-0 lookup
if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
} else {
// PEAR-like class name
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
}
if (isset($this->prefixesPsr0[$first])) {
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
if (0 === strpos($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
}
}
}
// PSR-0 fallback dirs
foreach ($this->fallbackDirsPsr0 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
// PSR-0 include paths.
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
return false;
}
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*/
function includeFile($file)
{
include $file;
}

21
vendor/composer/LICENSE vendored Normal file
View File

@@ -0,0 +1,21 @@
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

9
vendor/composer/autoload_classmap.php vendored Normal file
View File

@@ -0,0 +1,9 @@
<?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);

10
vendor/composer/autoload_files.php vendored Normal file
View File

@@ -0,0 +1,10 @@
<?php
// autoload_files.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'45702aba72a3d88d5dd1a153f5231b73' => $baseDir . '/app/helper.php',
);

10
vendor/composer/autoload_namespaces.php vendored Normal file
View File

@@ -0,0 +1,10 @@
<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'Curl' => array($vendorDir . '/curl/curl/src'),
);

10
vendor/composer/autoload_psr4.php vendored Normal file
View File

@@ -0,0 +1,10 @@
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'IYUU\\' => array($baseDir . '/app'),
);

70
vendor/composer/autoload_real.php vendored Normal file
View File

@@ -0,0 +1,70 @@
<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitd8553673db02b2a444a853f28e16196e
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitd8553673db02b2a444a853f28e16196e', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitd8553673db02b2a444a853f28e16196e', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitd8553673db02b2a444a853f28e16196e::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
}
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitd8553673db02b2a444a853f28e16196e::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequired8553673db02b2a444a853f28e16196e($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequired8553673db02b2a444a853f28e16196e($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
}
}

46
vendor/composer/autoload_static.php vendored Normal file
View File

@@ -0,0 +1,46 @@
<?php
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInitd8553673db02b2a444a853f28e16196e
{
public static $files = array (
'45702aba72a3d88d5dd1a153f5231b73' => __DIR__ . '/../..' . '/app/helper.php',
);
public static $prefixLengthsPsr4 = array (
'I' =>
array (
'IYUU\\' => 5,
),
);
public static $prefixDirsPsr4 = array (
'IYUU\\' =>
array (
0 => __DIR__ . '/../..' . '/app',
),
);
public static $prefixesPsr0 = array (
'C' =>
array (
'Curl' =>
array (
0 => __DIR__ . '/..' . '/curl/curl/src',
),
),
);
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitd8553673db02b2a444a853f28e16196e::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitd8553673db02b2a444a853f28e16196e::$prefixDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInitd8553673db02b2a444a853f28e16196e::$prefixesPsr0;
}, null, ClassLoader::class);
}
}

119
vendor/composer/installed.json vendored Normal file
View File

@@ -0,0 +1,119 @@
[
{
"name": "curl/curl",
"version": "2.2.0",
"version_normalized": "2.2.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-mod/curl.git",
"reference": "d22086dd2eee5ca02e4c29b9a5bdf3645bfdbbff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-mod/curl/zipball/d22086dd2eee5ca02e4c29b9a5bdf3645bfdbbff",
"reference": "d22086dd2eee5ca02e4c29b9a5bdf3645bfdbbff",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-curl": "*",
"php": "^5.6 | ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"squizlabs/php_codesniffer": "~2.1"
},
"time": "2018-12-04T19:47:03+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-0": {
"Curl": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Hassan Amouhzi",
"email": "hassan@anezi.net",
"homepage": "http://hassan.amouhzi.com"
},
{
"name": "php-curl-class",
"homepage": "https://github.com/php-curl-class"
},
{
"name": "user52",
"homepage": "https://github.com/user52"
}
],
"description": "cURL class for PHP",
"homepage": "https://github.com/php-mod/curl",
"keywords": [
"curl",
"dot"
]
},
{
"name": "owner888/phpspider",
"version": "v2.1.6",
"version_normalized": "2.1.6.0",
"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. "
},
"time": "2018-08-15T08:04:29+00:00",
"type": "library",
"installation-source": "dist",
"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"
]
}
]

11
vendor/curl/curl/.gitignore vendored Normal file
View File

@@ -0,0 +1,11 @@
vendor/*
*.orig
.buildpath
.project
.settings/*
.idea/*
composer.lock
*~
tests/phpunit_report/*
/.settings/
/.php_cs.cache

113
vendor/curl/curl/.gitlab-ci.yml vendored Normal file
View File

@@ -0,0 +1,113 @@
stages:
- build
- test
build-test-server:
image: docker:latest
stage: build
services:
- docker:dind
script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker build --pull -t "$CI_REGISTRY_IMAGE:server-test" tests/server
- docker push "$CI_REGISTRY_IMAGE:server-test"
only:
changes:
- tests/server
tests-php5.6:
image: alpine:3.7
stage: test
services:
- name: "$CI_REGISTRY_IMAGE:server-test"
alias: server_test
script:
- apk add --no-cache php5-cli php5-curl php5-gd php5-phar php5-json php5-openssl php5-dom php5-xml php5-zlib
- ln -s /usr/bin/php5 /usr/bin/php
- php --version
- if [ ! -f composer.phar ]; then DOWLOAD_COMPOSER=1 ; fi;
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" ; fi;
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "if (hash_file('sha384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" ; fi;
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php composer-setup.php ; fi;
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "unlink('composer-setup.php');" ; fi;
- php composer.phar install
- vendor/bin/phpcs --warning-severity=0 --standard=PSR2 src
- vendor/bin/phpunit
cache:
key: php5.6
paths:
- composer.phar
- vendor
tests-php7.0:
image: alpine:3.5
stage: test
services:
- name: "$CI_REGISTRY_IMAGE:server-test"
alias: server_test
script:
- apk add --no-cache php7 php7-curl php7-gd php7-phar php7-json php7-openssl php7-dom php7-mbstring
- ln -s /usr/bin/php7 /usr/bin/php
- php --version
- if [ ! -f composer.phar ]; then DOWLOAD_COMPOSER=1 ; fi;
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" ; fi;
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "if (hash_file('sha384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" ; fi;
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php composer-setup.php ; fi;
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "unlink('composer-setup.php');" ; fi;
- php composer.phar install
- vendor/bin/phpcs --warning-severity=0 --standard=PSR2 src
- nohup php -S localhost:8000 -t tests/server/php-curl-test > phpd.log 2>&1 &
- vendor/bin/phpunit
cache:
key: php7.0
paths:
- composer.phar
- vendor
tests-php7.1:
image: alpine:3.7
stage: test
services:
- name: "$CI_REGISTRY_IMAGE:server-test"
alias: server_test
script:
- apk add --no-cache php7-cli php7-curl php7-gd php7-phar php7-json php7-openssl php7-dom php7-simplexml php7-tokenizer php7-mbstring php7-xml
- php --version
- if [ ! -f composer.phar ]; then DOWLOAD_COMPOSER=1 ; fi;
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" ; fi;
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "if (hash_file('sha384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" ; fi;
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php composer-setup.php ; fi;
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "unlink('composer-setup.php');" ; fi;
- php composer.phar install
- vendor/bin/phpcs --warning-severity=0 --standard=PSR2 src
- nohup php -S localhost:8000 -t tests/server/php-curl-test > phpd.log 2>&1 &
- vendor/bin/phpunit
cache:
key: php7.1
paths:
- composer.phar
- vendor
tests-php7.2:
image: alpine:3.8
stage: test
services:
- name: "$CI_REGISTRY_IMAGE:server-test"
alias: server_test
script:
- apk add --no-cache php7-cli php7-curl php7-gd php7-phar php7-json php7-openssl php7-dom php7-simplexml php7-tokenizer php7-mbstring php7-xml
- php --version
- if [ ! -f composer.phar ]; then DOWLOAD_COMPOSER=1 ; fi;
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" ; fi;
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "if (hash_file('sha384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" ; fi;
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php composer-setup.php ; fi;
- if [ -n "$DOWLOAD_COMPOSER" ] ; then php -r "unlink('composer-setup.php');" ; fi;
- php composer.phar install
- vendor/bin/phpcs --warning-severity=0 --standard=PSR2 src
- nohup php -S localhost:8000 -t tests/server/php-curl-test > phpd.log 2>&1 &
- vendor/bin/phpunit
cache:
key: php7.2
paths:
- composer.phar
- vendor

20
vendor/curl/curl/LICENSE vendored Normal file
View File

@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2013 php-mod
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

125
vendor/curl/curl/README.md vendored Normal file
View File

@@ -0,0 +1,125 @@
# PHP Curl Class
This library provides an object-oriented wrapper of the PHP cURL extension.
If you have questions or problems with installation or usage [create an Issue](https://github.com/php-mod/curl/issues).
## Installation
In order to install this library via composer run the following command in the console:
```sh
composer require curl/curl
```
or add the package manually to your composer.json file in the require section:
```json
"curl/curl": "^2.0"
```
## Usage examples
```php
$curl = new Curl\Curl();
$curl->get('http://www.example.com/');
```
```php
$curl = new Curl\Curl();
$curl->get('http://www.example.com/search', array(
'q' => 'keyword',
));
```
```php
$curl = new Curl\Curl();
$curl->post('http://www.example.com/login/', array(
'username' => 'myusername',
'password' => 'mypassword',
));
```
```php
$curl = new Curl\Curl();
$curl->setBasicAuthentication('username', 'password');
$curl->setUserAgent('');
$curl->setReferrer('');
$curl->setHeader('X-Requested-With', 'XMLHttpRequest');
$curl->setCookie('key', 'value');
$curl->get('http://www.example.com/');
if ($curl->error) {
echo $curl->error_code;
}
else {
echo $curl->response;
}
var_dump($curl->request_headers);
var_dump($curl->response_headers);
```
```php
$curl = new Curl\Curl();
$curl->setOpt(CURLOPT_RETURNTRANSFER, TRUE);
$curl->setOpt(CURLOPT_SSL_VERIFYPEER, FALSE);
$curl->get('https://encrypted.example.com/');
```
```php
$curl = new Curl\Curl();
$curl->put('http://api.example.com/user/', array(
'first_name' => 'Zach',
'last_name' => 'Borboa',
));
```
```php
$curl = new Curl\Curl();
$curl->patch('http://api.example.com/profile/', array(
'image' => '@path/to/file.jpg',
));
```
```php
$curl = new Curl\Curl();
$curl->delete('http://api.example.com/user/', array(
'id' => '1234',
));
```
```php
$curl->close();
```
```php
// Example access to curl object.
curl_set_opt($curl->curl, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1');
curl_close($curl->curl);
```
```php
// Example of downloading a file or any other content
$curl = new Curl\Curl();
// open the file where the request response should be written
$file_handle = fopen($target_file, 'w+');
// pass it to the curl resource
$curl->setOpt(CURLOPT_FILE, $file_handle);
// do any type of request
$curl->get('https://github.com');
// disable writing to file
$curl->setOpt(CURLOPT_FILE, null);
// close the file for writing
fclose($file_handle);
```
## Testing
In order to test the library:
1. Create a fork
2. Clone the fork to your machine
3. Install the depencies `composer install`
4. Run the unit tests `./vendor/bin/phpunit tests`

36
vendor/curl/curl/composer.json vendored Normal file
View File

@@ -0,0 +1,36 @@
{
"name": "curl/curl",
"description": "cURL class for PHP",
"keywords": ["dot", "curl"],
"homepage": "https://github.com/php-mod/curl",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "php-curl-class",
"homepage": "https://github.com/php-curl-class"
},
{
"name": "Hassan Amouhzi",
"email": "hassan@anezi.net",
"homepage": "http://hassan.amouhzi.com"
},
{
"name": "user52",
"homepage": "https://github.com/user52"
}
],
"require": {
"php": "^5.6 | ^7.0",
"ext-curl": "*"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"squizlabs/php_codesniffer": "~2.1"
},
"autoload": {
"psr-0": {
"Curl": "src/"
}
}
}

24
vendor/curl/curl/phpunit.xml.dist vendored Normal file
View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="true"
verbose="false"
bootstrap="vendor/autoload.php"
>
<php>
<ini name="display_errors" value="on"/>
</php>
<testsuites>
<testsuite name="PHP MP4Box Tests Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
</phpunit>

719
vendor/curl/curl/src/Curl/Curl.php vendored Normal file
View File

@@ -0,0 +1,719 @@
<?php
namespace Curl;
/**
* An object-oriented wrapper of the PHP cURL extension.
*
* This library requires to have the php cURL extensions installed:
* https://php.net/manual/curl.setup.php
*
* Example of making a get request with parameters:
*
* ```php
* $curl = new Curl\Curl();
* $curl->get('http://www.example.com/search', array(
* 'q' => 'keyword',
* ));
* ```
*
* Example post request with post data:
*
* ```php
* $curl = new Curl\Curl();
* $curl->post('http://www.example.com/login/', array(
* 'username' => 'myusername',
* 'password' => 'mypassword',
* ));
* ```
*
* @see https://php.net/manual/curl.setup.php
*/
class Curl
{
// The HTTP authentication method(s) to use.
/**
* @var string Type AUTH_BASIC
*/
const AUTH_BASIC = CURLAUTH_BASIC;
/**
* @var string Type AUTH_DIGEST
*/
const AUTH_DIGEST = CURLAUTH_DIGEST;
/**
* @var string Type AUTH_GSSNEGOTIATE
*/
const AUTH_GSSNEGOTIATE = CURLAUTH_GSSNEGOTIATE;
/**
* @var string Type AUTH_NTLM
*/
const AUTH_NTLM = CURLAUTH_NTLM;
/**
* @var string Type AUTH_ANY
*/
const AUTH_ANY = CURLAUTH_ANY;
/**
* @var string Type AUTH_ANYSAFE
*/
const AUTH_ANYSAFE = CURLAUTH_ANYSAFE;
/**
* @var string The user agent name which is set when making a request
*/
const USER_AGENT = 'PHP Curl/1.9 (+https://github.com/php-mod/curl)';
private $_cookies = array();
private $_headers = array();
/**
* @var resource Contains the curl resource created by `curl_init()` function
*/
public $curl;
/**
* @var bool Whether an error occured or not
*/
public $error = false;
/**
* @var int Contains the error code of the curren request, 0 means no error happend
*/
public $error_code = 0;
/**
* @var string If the curl request failed, the error message is contained
*/
public $error_message = null;
/**
* @var bool Whether an error occured or not
*/
public $curl_error = false;
/**
* @var int Contains the error code of the curren request, 0 means no error happend.
* @see https://curl.haxx.se/libcurl/c/libcurl-errors.html
*/
public $curl_error_code = 0;
/**
* @var string If the curl request failed, the error message is contained
*/
public $curl_error_message = null;
/**
* @var bool Whether an error occured or not
*/
public $http_error = false;
/**
* @var int Contains the status code of the current processed request.
*/
public $http_status_code = 0;
/**
* @var string If the curl request failed, the error message is contained
*/
public $http_error_message = null;
/**
* @var string|array TBD (ensure type) Contains the request header informations
*/
public $request_headers = null;
/**
* @var string|array TBD (ensure type) Contains the response header informations
*/
public $response_headers = array();
/**
* @var string Contains the response from the curl request
*/
public $response = null;
/**
* @var bool Whether the current section of response headers is after 'HTTP/1.1 100 Continue'
*/
protected $response_header_continue = false;
/**
* Constructor ensures the available curl extension is loaded.
*
* @throws \ErrorException
*/
public function __construct()
{
if (!extension_loaded('curl')) {
throw new \ErrorException('The cURL extensions is not loaded, make sure you have installed the cURL extension: https://php.net/manual/curl.setup.php');
}
$this->init();
}
// private methods
/**
* Initializer for the curl resource.
*
* Is called by the __construct() of the class or when the curl request is reseted.
* @return self
*/
private function init()
{
$this->curl = curl_init();
$this->setUserAgent(self::USER_AGENT);
$this->setOpt(CURLINFO_HEADER_OUT, true);
$this->setOpt(CURLOPT_HEADER, false);
$this->setOpt(CURLOPT_RETURNTRANSFER, true);
$this->setOpt(CURLOPT_HEADERFUNCTION, array($this, 'addResponseHeaderLine'));
return $this;
}
/**
* Handle writing the response headers
*
* @param resource $curl The current curl resource
* @param string $header_line A line from the list of response headers
*
* @return int Returns the length of the $header_line
*/
public function addResponseHeaderLine($curl, $header_line)
{
$trimmed_header = trim($header_line, "\r\n");
if ($trimmed_header === "") {
$this->response_header_continue = false;
} elseif (strtolower($trimmed_header) === 'http/1.1 100 continue') {
$this->response_header_continue = true;
} elseif (!$this->response_header_continue) {
$this->response_headers[] = $trimmed_header;
}
return strlen($header_line);
}
// protected methods
/**
* Execute the curl request based on the respectiv settings.
*
* @return int Returns the error code for the current curl request
*/
protected function exec()
{
$this->response_headers = array();
$this->response = curl_exec($this->curl);
$this->curl_error_code = curl_errno($this->curl);
$this->curl_error_message = curl_error($this->curl);
$this->curl_error = !($this->curl_error_code === 0);
$this->http_status_code = curl_getinfo($this->curl, CURLINFO_HTTP_CODE);
$this->http_error = in_array(floor($this->http_status_code / 100), array(4, 5));
$this->error = $this->curl_error || $this->http_error;
$this->error_code = $this->error ? ($this->curl_error ? $this->curl_error_code : $this->http_status_code) : 0;
$this->request_headers = preg_split('/\r\n/', curl_getinfo($this->curl, CURLINFO_HEADER_OUT), null, PREG_SPLIT_NO_EMPTY);
$this->http_error_message = $this->error ? (isset($this->response_headers['0']) ? $this->response_headers['0'] : '') : '';
$this->error_message = $this->curl_error ? $this->curl_error_message : $this->http_error_message;
return $this->error_code;
}
/**
* @param array|object|string $data
*/
protected function preparePayload($data)
{
$this->setOpt(CURLOPT_POST, true);
if (is_array($data) || is_object($data)) {
$skip = false;
foreach ($data as $key => $value) {
// If a value is an instance of CurlFile skip the http_build_query
// see issue https://github.com/php-mod/curl/issues/46
// suggestion from: https://stackoverflow.com/a/36603038/4611030
if ($value instanceof \CurlFile) {
$skip = true;
}
}
if (!$skip) {
$data = http_build_query($data);
}
}
$this->setOpt(CURLOPT_POSTFIELDS, $data);
}
/**
* Set auth options for the current request.
*
* Available auth types are:
*
* + self::AUTH_BASIC
* + self::AUTH_DIGEST
* + self::AUTH_GSSNEGOTIATE
* + self::AUTH_NTLM
* + self::AUTH_ANY
* + self::AUTH_ANYSAFE
*
* @param int $httpauth The type of authentication
*/
protected function setHttpAuth($httpauth)
{
$this->setOpt(CURLOPT_HTTPAUTH, $httpauth);
}
// public methods
/**
* @deprecated calling exec() directly is discouraged
*/
public function _exec()
{
return $this->exec();
}
// functions
/**
* Make a get request with optional data.
*
* The get request has no body data, the data will be correctly added to the $url with the http_build_query() method.
*
* @param string $url The url to make the get request for
* @param array $data Optional arguments who are part of the url
* @return self
*/
public function get($url, $data = array())
{
if (count($data) > 0) {
$this->setOpt(CURLOPT_URL, $url.'?'.http_build_query($data));
} else {
$this->setOpt(CURLOPT_URL, $url);
}
$this->setOpt(CURLOPT_HTTPGET, true);
$this->exec();
return $this;
}
/**
* Make a post request with optional post data.
*
* @param string $url The url to make the post request
* @param array $data Post data to pass to the url
* @return self
*/
public function post($url, $data = array())
{
$this->setOpt(CURLOPT_URL, $url);
$this->preparePayload($data);
$this->exec();
return $this;
}
/**
* Make a put request with optional data.
*
* The put request data can be either sent via payload or as get paramters of the string.
*
* @param string $url The url to make the put request
* @param array $data Optional data to pass to the $url
* @param bool $payload Whether the data should be transmitted trough payload or as get parameters of the string
* @return self
*/
public function put($url, $data = array(), $payload = false)
{
if (! empty($data)) {
if ($payload === false) {
$url .= '?'.http_build_query($data);
} else {
$this->preparePayload($data);
}
}
$this->setOpt(CURLOPT_URL, $url);
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'PUT');
$this->exec();
return $this;
}
/**
* Make a patch request with optional data.
*
* The patch request data can be either sent via payload or as get paramters of the string.
*
* @param string $url The url to make the patch request
* @param array $data Optional data to pass to the $url
* @param bool $payload Whether the data should be transmitted trough payload or as get parameters of the string
* @return self
*/
public function patch($url, $data = array(), $payload = false)
{
if (! empty($data)) {
if ($payload === false) {
$url .= '?'.http_build_query($data);
} else {
$this->preparePayload($data);
}
}
$this->setOpt(CURLOPT_URL, $url);
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'PATCH');
$this->exec();
return $this;
}
/**
* Make a delete request with optional data.
*
* @param string $url The url to make the delete request
* @param array $data Optional data to pass to the $url
* @param bool $payload Whether the data should be transmitted trough payload or as get parameters of the string
* @return self
*/
public function delete($url, $data = array(), $payload = false)
{
if (! empty($data)) {
if ($payload === false) {
$url .= '?'.http_build_query($data);
} else {
$this->preparePayload($data);
}
}
$this->setOpt(CURLOPT_URL, $url);
$this->setOpt(CURLOPT_CUSTOMREQUEST, 'DELETE');
$this->exec();
return $this;
}
// setters
/**
* Pass basic auth data.
*
* If the the rquested url is secured by an httaccess basic auth mechanism you can use this method to provided the auth data.
*
* ```php
* $curl = new Curl();
* $curl->setBasicAuthentication('john', 'doe');
* $curl->get('http://example.com/secure.php');
* ```
*
* @param string $username The username for the authentification
* @param string $password The password for the given username for the authentification
* @return self
*/
public function setBasicAuthentication($username, $password)
{
$this->setHttpAuth(self::AUTH_BASIC);
$this->setOpt(CURLOPT_USERPWD, $username.':'.$password);
return $this;
}
/**
* Provide optional header informations.
*
* In order to pass optional headers by key value pairing:
*
* ```php
* $curl = new Curl();
* $curl->setHeader('X-Requested-With', 'XMLHttpRequest');
* $curl->get('http://example.com/request.php');
* ```
*
* @param string $key The header key
* @param string $value The value for the given header key
* @return self
*/
public function setHeader($key, $value)
{
$this->_headers[$key] = $key.': '.$value;
$this->setOpt(CURLOPT_HTTPHEADER, array_values($this->_headers));
return $this;
}
/**
* Provide a User Agent.
*
* In order to provide you cusomtized user agent name you can use this method.
*
* ```php
* $curl = new Curl();
* $curl->setUserAgent('My John Doe Agent 1.0');
* $curl->get('http://example.com/request.php');
* ```
*
* @param string $useragent The name of the user agent to set for the current request
* @return self
*/
public function setUserAgent($useragent)
{
$this->setOpt(CURLOPT_USERAGENT, $useragent);
return $this;
}
/**
* @deprecated Call setReferer() instead
*/
public function setReferrer($referrer)
{
$this->setReferer($referrer);
return $this;
}
/**
* Set the HTTP referer header.
*
* The $referer informations can help identify the requested client where the requested was made.
*
* @param string $referer An url to pass and will be set as referer header
* @return self
*/
public function setReferer($referer)
{
$this->setOpt(CURLOPT_REFERER, $referer);
return $this;
}
/**
* Set contents of HTTP Cookie header.
*
* @param string $key The name of the cookie
* @param string $value The value for the provided cookie name
* @return self
*/
public function setCookie($key, $value)
{
$this->_cookies[$key] = $value;
$this->setOpt(CURLOPT_COOKIE, http_build_query($this->_cookies, '', '; '));
return $this;
}
/**
* Set customized curl options.
*
* To see a full list of options: http://php.net/curl_setopt
*
* @see http://php.net/curl_setopt
*
* @param int $option The curl option constante e.g. `CURLOPT_AUTOREFERER`, `CURLOPT_COOKIESESSION`
* @param mixed $value The value to pass for the given $option
*/
public function setOpt($option, $value)
{
return curl_setopt($this->curl, $option, $value);
}
/**
* Get customized curl options.
*
* To see a full list of options: http://php.net/curl_getinfo
*
* @see http://php.net/curl_getinfo
*
* @param int $option The curl option constante e.g. `CURLOPT_AUTOREFERER`, `CURLOPT_COOKIESESSION`
* @param mixed $value The value to check for the given $option
*/
public function getOpt($option)
{
return curl_getinfo($this->curl, $option);
}
/**
* Return the endpoint set for curl
*
* @see http://php.net/curl_getinfo
*
* @return string of endpoint
*/
public function getEndpoint()
{
return $this->getOpt(CURLINFO_EFFECTIVE_URL);
}
/**
* Enable verbositiy.
*
* @todo As to keep naming convention it should be renamed to `setVerbose()`
*
* @param string $on
* @return self
*/
public function verbose($on = true)
{
$this->setOpt(CURLOPT_VERBOSE, $on);
return $this;
}
/**
* Reset all curl options.
*
* In order to make multiple requests with the same curl object all settings requires to be reset.
* @return self
*/
public function reset()
{
$this->close();
$this->_cookies = array();
$this->_headers = array();
$this->error = false;
$this->error_code = 0;
$this->error_message = null;
$this->curl_error = false;
$this->curl_error_code = 0;
$this->curl_error_message = null;
$this->http_error = false;
$this->http_status_code = 0;
$this->http_error_message = null;
$this->request_headers = null;
$this->response_headers = array();
$this->response = null;
$this->init();
return $this;
}
/**
* Closing the current open curl resource.
* @return self
*/
public function close()
{
if (is_resource($this->curl)) {
curl_close($this->curl);
}
return $this;
}
/**
* Close the connection when the Curl object will be destroyed.
*/
public function __destruct()
{
$this->close();
}
/**
* Was an 'info' header returned.
* @return bool
*/
public function isInfo()
{
return $this->http_status_code >= 100 && $this->http_status_code < 200;
}
/**
* Was an 'OK' response returned.
* @return bool
*/
public function isSuccess()
{
return $this->http_status_code >= 200 && $this->http_status_code < 300;
}
/**
* Was a 'redirect' returned.
* @return bool
*/
public function isRedirect()
{
return $this->http_status_code >= 300 && $this->http_status_code < 400;
}
/**
* Was an 'error' returned (client error or server error).
* @return bool
*/
public function isError()
{
return $this->http_status_code >= 400 && $this->http_status_code < 600;
}
/**
* Was a 'client error' returned.
* @return bool
*/
public function isClientError()
{
return $this->http_status_code >= 400 && $this->http_status_code < 500;
}
/**
* Was a 'server error' returned.
* @return bool
*/
public function isServerError()
{
return $this->http_status_code >= 500 && $this->http_status_code < 600;
}
/**
* Get a specific response header key or all values from the response headers array.
*
* Usage example:
*
* ```php
* $curl = (new Curl())->get('http://example.com');
*
* echo $curl->getResponseHeaders('Content-Type');
* ```
*
* Or in order to dump all keys with the given values use:
*
* ```php
* $curl = (new Curl())->get('http://example.com');
*
* var_dump($curl->getResponseHeaders());
* ```
*
* @param string $headerKey Optional key to get from the array.
* @return bool|string
* @since 1.9
*/
public function getResponseHeaders($headerKey = null)
{
$headers = array();
$headerKey = strtolower($headerKey);
foreach ($this->response_headers as $header) {
$parts = explode(":", $header, 2);
$key = isset($parts[0]) ? $parts[0] : null;
$value = isset($parts[1]) ? $parts[1] : null;
$headers[trim(strtolower($key))] = trim($value);
}
if ($headerKey) {
return isset($headers[$headerKey]) ? $headers[$headerKey] : false;
}
return $headers;
}
public function getResponse()
{
return $this->response;
}
public function getErrorCode()
{
return $this->curl_error_code;
}
public function getErrorMessage()
{
return $this->curl_error_message;
}
public function getHttpStatus()
{
return $this->http_status_code;
}
}

277
vendor/curl/curl/tests/CurlTest.php vendored Normal file
View File

@@ -0,0 +1,277 @@
<?php
namespace Curl;
class CurlTest extends \PHPUnit_Framework_TestCase
{
const TEST_URL = 'http://server_test';
/**
*
* @var Curl
*/
protected $curl;
function setUp() {
$this->curl = new Curl();
$this->curl->setOpt(CURLOPT_SSL_VERIFYPEER, FALSE);
$this->curl->setOpt(CURLOPT_SSL_VERIFYHOST, FALSE);
}
function server($request_method, $data='') {
$request_method = strtolower($request_method);
$this->curl->$request_method(self::TEST_URL . '/server.php', $data);
return $this->curl->response;
}
public function testExtensionLoaded() {
$this->assertTrue(extension_loaded('curl'));
}
public function testUserAgent() {
$this->curl->setUserAgent(Curl::USER_AGENT);
$this->assertEquals(Curl::USER_AGENT, $this->server('GET', array(
'test' => 'server',
'key' => 'HTTP_USER_AGENT',
)));
}
public function testGet() {
$this->assertTrue($this->server('GET', array(
'test' => 'server',
'key' => 'REQUEST_METHOD',
)) === 'GET');
}
public function testPostRequestMethod() {
$this->assertTrue($this->server('POST', array(
'test' => 'server',
'key' => 'REQUEST_METHOD',
)) === 'POST');
}
public function testPostData() {
$this->assertTrue($this->server('POST', array(
'test' => 'post',
'key' => 'test',
)) === 'post');
}
public function testPostMultidimensionalData() {
$data = array(
'key' => 'file',
'file' => array(
'wibble',
'wubble',
'wobble',
),
);
$this->curl->post(self::TEST_URL . '/post_multidimensional.php', $data);
$this->assertEquals(
'key=file&file%5B0%5D=wibble&file%5B1%5D=wubble&file%5B2%5D=wobble',
$this->curl->response);
}
public function testPostFilePathUpload()
{
$file_path = $this->get_png();
$data = array(
'key' => 'image',
'image' => '@' . $file_path,
);
$this->curl->setOpt(CURLOPT_RETURNTRANSFER, true);
$this->curl->post(self::TEST_URL . '/post_file_path_upload.php', $data);
$this->assertEquals(
array(
'request_method' => 'POST',
'key' => 'image',
'mime_content_type' => 'ERROR', // Temp change the image response, but assuming this is not fixing the issue indeed.
//'mime_content_type' => 'image/png'
),
json_decode($this->curl->response, true));
unlink($file_path);
}
public function testPutRequestMethod() {
$this->assertTrue($this->server('PUT', array(
'test' => 'server',
'key' => 'REQUEST_METHOD',
)) === 'PUT');
}
public function testPutData() {
$this->assertTrue($this->server('PUT', array(
'test' => 'put',
'key' => 'test',
)) === 'put');
}
public function testPutFileHandle() {
$png = $this->create_png();
$tmp_file = $this->create_tmp_file($png);
$this->curl->setOpt(CURLOPT_PUT, TRUE);
$this->curl->setOpt(CURLOPT_INFILE, $tmp_file);
$this->curl->setOpt(CURLOPT_INFILESIZE, strlen($png));
$this->curl->put(self::TEST_URL . '/server.php', array(
'test' => 'put_file_handle',
));
fclose($tmp_file);
$this->assertTrue($this->curl->response === 'image/png');
}
public function testDelete() {
$this->assertTrue($this->server('DELETE', array(
'test' => 'server',
'key' => 'REQUEST_METHOD',
)) === 'DELETE');
$this->assertTrue($this->server('DELETE', array(
'test' => 'delete',
'key' => 'test',
)) === 'delete');
}
public function testBasicHttpAuth() {
$data = array();
$this->curl->get(self::TEST_URL . '/http_basic_auth.php', $data);
$this->assertEquals('canceled', $this->curl->response);
$username = 'myusername';
$password = 'mypassword';
$this->curl->setBasicAuthentication($username, $password);
$this->curl->get(self::TEST_URL . '/http_basic_auth.php', $data);
$this->assertEquals(
'{"username":"myusername","password":"mypassword"}',
$this->curl->response);
}
public function testReferrer() {
$this->curl->setReferer('myreferrer');
$this->assertTrue($this->server('GET', array(
'test' => 'server',
'key' => 'HTTP_REFERER',
)) === 'myreferrer');
}
public function testDeprecatedReferrer() {
$this->curl->setReferrer('myreferrer');
$this->assertTrue($this->server('GET', array(
'test' => 'server',
'key' => 'HTTP_REFERER',
)) === 'myreferrer');
}
public function testCookies() {
$this->curl->setCookie('mycookie', 'yum');
$this->assertTrue($this->server('GET', array(
'test' => 'cookie',
'key' => 'mycookie',
)) === 'yum');
}
public function testError() {
$this->curl->setOpt(CURLOPT_CONNECTTIMEOUT_MS, 2000);
$this->curl->get('http://1.2.3.4/');
$this->assertTrue($this->curl->error === TRUE);
$this->assertTrue($this->curl->curl_error === TRUE);
$this->assertTrue($this->curl->curl_error_code === CURLE_OPERATION_TIMEOUTED);
}
public function testHeaders() {
$this->curl->setHeader('Content-Type', 'application/json');
$this->curl->setHeader('X-Requested-With', 'XMLHttpRequest');
$this->curl->setHeader('Accept', 'application/json');
$this->assertTrue($this->server('GET', array(
'test' => 'server',
'key' => 'CONTENT_TYPE',
)) === 'application/json');
$this->assertTrue($this->server('GET', array(
'test' => 'server',
'key' => 'HTTP_X_REQUESTED_WITH',
)) === 'XMLHttpRequest');
$this->assertTrue($this->server('GET', array(
'test' => 'server',
'key' => 'HTTP_ACCEPT',
)) === 'application/json');
}
public function testHeadersWithContinue() {
$headers = file(dirname(__FILE__) . '/data/response_headers_with_continue.txt');
$this->curl->response_headers = array();
foreach($headers as $header_line) {
$this->curl->addResponseHeaderLine(null, $header_line);
}
$expected_headers = array_values(array_filter(array_map(function($l) { return trim($l, "\r\n"); }, array_slice($headers, 1))));
$this->assertEquals($expected_headers, $this->curl->response_headers);
}
public function testReset()
{
$curl = $this->getMockBuilder(get_class($this->curl))->getMock();
$curl->expects($this->once())->method('reset')->with();
// lets make small request
$curl->setOpt(CURLOPT_CONNECTTIMEOUT_MS, 2000);
$curl->get('http://1.2.3.4/');
$curl->reset();
$this->assertFalse($curl->error);
$this->assertSame(0, $curl->error_code);
$this->assertNull($curl->error_message);
$this->assertFalse($curl->curl_error);
$this->assertSame(0, $curl->curl_error_code);
$this->assertNull($curl->curl_error_message);
$this->assertFalse($curl->http_error);
$this->assertSame(0, $curl->http_status_code);
$this->assertNull($curl->http_error_message);
$this->assertNull($curl->request_headers);
$this->assertEmpty($curl->response_headers);
$this->assertNull($curl->response);
}
function create_png() {
// PNG image data, 1 x 1, 1-bit colormap, non-interlaced
ob_start();
imagepng(imagecreatefromstring(base64_decode('R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7')));
$raw_image = ob_get_contents();
ob_end_clean();
return $raw_image;
}
function create_tmp_file($data) {
$tmp_file = tmpfile();
fwrite($tmp_file, $data);
rewind($tmp_file);
return $tmp_file;
}
function get_png() {
$tmp_filename = tempnam('/tmp', 'php-curl-class.');
file_put_contents($tmp_filename, $this->create_png());
return $tmp_filename;
}
}

View File

@@ -0,0 +1,13 @@
HTTP/1.1 100 Continue
HTTP/1.1 200 OK
Server: nginx/1.1.19
Date: Fri, 11 Aug 2017 13:22:00 GMT
Content-Type: image/jpeg
Content-Length: 62574
Connection: close
Cache-Control: max-age=7257600
Expires: Fri, 03 Nov 2017 13:22:00 GMT
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Frame-Option: DENY

BIN
vendor/curl/curl/tests/data/test.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,9 @@
FROM alpine:3.7
RUN apk add --no-cache php5-cli php5-curl php5-gd php5-phar php5-json php5-openssl php5-dom
COPY php-curl-test php-curl-test
EXPOSE 80
CMD ["php5", "-S", "0.0.0.0:80", "-t", "php-curl-test"]

View File

@@ -0,0 +1,37 @@
<?php
// The commands
$commands = array(
'cd ../../.. && git pull',
);
// Run the commands for output
$output = '';
foreach($commands AS $command){
// Run it
$tmp = shell_exec($command);
// Output
$output .= "<span style=\"color: #6BE234;\">\$</span> <span style=\"color: #729FCF;\">{$command}\n</span>";
$output .= htmlentities(trim($tmp)) . "\n";
}
// Make it pretty for manual user access (and why not?)
?>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>GIT DEPLOYMENT SCRIPT</title>
</head>
<body style="background-color: #000000; color: #FFFFFF; font-weight: bold; padding: 0 10px;">
<pre>
. ____ . ____________________________
|/ \| | |
[| <span style="color: #FF0000;">&hearts; &hearts;</span> |] | Git Deployment Script v0.1 |
|___==___| / &copy; oodavid 2012 |
|____________________________|
<?php echo $output; ?>
</pre>
</body>
</html>

View File

@@ -0,0 +1,14 @@
<?php
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
echo 'canceled';
exit;
}
header('Content-Type: application/json');
echo json_encode(array(
'username' => $_SERVER['PHP_AUTH_USER'],
'password' => $_SERVER['PHP_AUTH_PW'],
));

View File

@@ -0,0 +1,21 @@
<?php
$request_method = isset($_SERVER['REQUEST_METHOD']) ?
$_SERVER['REQUEST_METHOD'] : '';
$data_values = $request_method === 'POST' ? $_POST : $_GET;
$key = isset($data_values['key']) ? $data_values['key'] : '';
$response = array();
$response['request_method'] = $request_method;
$response['key'] = $key;
if(isset($_FILES[$key])) {
$response['mime_content_type'] = mime_content_type($_FILES[$key]['tmp_name']);
} else {
$response['mime_content_type'] = 'ERROR';
}
echo json_encode($response);

View File

@@ -0,0 +1,4 @@
<?php
$http_raw_post_data = file_get_contents('php://input');
echo $http_raw_post_data;

View File

@@ -0,0 +1,31 @@
<?php
$request_method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : '';
$data_values = $request_method === 'POST' ? $_POST : $_GET;
$test = isset($data_values['test']) ? $data_values['test'] : '';
$key = isset($data_values['key']) ? $data_values['key'] : '';
if ($test === 'put_file_handle') {
$tmp_filename = tempnam('/tmp', 'php-curl-class.');
file_put_contents($tmp_filename, file_get_contents('php://input'));
echo mime_content_type($tmp_filename);
unlink($tmp_filename);
exit;
}
header('Content-Type: text/plain');
$data_mapping = array(
'cookie' => '_COOKIE',
'delete' => '_GET',
'post' => '_POST',
'put' => '_GET',
'server' => '_SERVER',
);
if(isset($data_mapping[$test])) {
$data = ${$data_mapping[$test]};
$value = isset($data[$key]) ? $data[$key] : '';
echo $value;
} else {
echo "Error.";
}

View File

@@ -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

View File

@@ -1,51 +0,0 @@
## 下载最新源码的两种方法
### 第一种:下载完整的发行版
**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

104
wiki/公告栏.md Normal file
View File

@@ -0,0 +1,104 @@
# 公告栏
### 2020年7月31日09:25:55
1. IYUUAutoReseed正式建立了docke镜像自动编译2个版本ARM64【iyuucn/iyuuautoreseed:arm64v8】、AMD64【iyuucn/iyuuautoreseed:latest】使用方法[点击查看](https://gitee.com/ledc/IYUUAutoReseed/tree/master/docker)
2. 优化默认流控参数单次最多20个间隔20秒。天空辅种请配置cookie必须更新至最新版本并配置浏览器UA获取UA请访问[http://demo.iyuu.cn](http://demo.iyuu.cn/)
3. v1.10.2版本以后的docker每5小时会自动拉取最新代码从此您只需要看公告更新配置就行啦。
### 2020年7月13日08:00:00
【更新提醒】v1.9.1
优化App.Api.Sites接口请求时携带版本号版本为空或低于v1.9.1会返回旧数据);
新增:异步间隔流控算法,适用所有站点;各站独立、执行时间最优;
【升级方法】
1.异步间隔流控使用方法参考v1.9.1版本的config.sample.php[第242-245行]把他复制到你想应用流控的站点配置项内解释count表示每次辅种的最大数量sleep表示当前站点每次下载种子最小间隔多少秒。
2.url_replace和url_join是为了最大化兼容未来各种类型站点提前准备的可以自定义URL
解释url_replace是替换下载链接时使用让下载链接支持替换任意参数。举例'url_replace'=>array('{passkey}'=>'123456789'), 下载链接https://pt.baidu.com/download.php?id={}&passkey={passkey}替换后变为https://pt.baidu.com/download.php?id={}&passkey=123456789
解释url_join是拼接下载链接是使用让下载链接支持任意自定义参数。举例
'url_join' => array('ipv6=1','https=1'), 下载链接https://pt.baidu.com/download.php?id={}&passkey=123456789拼接后变为https://pt.baidu.com/download.php?id={}&passkey=123456789&ipv6=1&https=1
### 2020年7月12日19:34:03
【新增功能】v1.9.0
转移过滤器、选择器;可以只转移指定路径的种子,也可以排除指定路径的种子,按需转移。
【升级方法】
1.主脚本可以通过git pull或覆盖更新
2.然后对照最新config.sample.php把59行60行手动加入到你的config.php对应位置。
【重要提醒】域名部署SSL证书接口域名支持双协议访问http/https如下
https://api.iyuu.cn
http://api.iyuu.cn
### 2020年4月10日17:43:50
针对多合作站点绑定的优化!
1.没有更新到v1.7.5以上版本的群友,尽快更新!
2.正在使用v1.7.5以上版本的群友请删除config目录下的siteLoginCache_*.json文件重新运行辅种即可同时绑定多个合作站点。
### 2020年4月4日00:57:36
v1.7.5版本发布新增合作站点moecat合作站点有Ourbits、 HD Dolby、HDHome、PTHome、moecat。【更新提醒】手动升级可以直接覆盖git安装的可通过git pull命令升级脚本升级后然后对比config.sample.php手动在config.php增加用户id配置项辅种时会自动进行验证。
如果有问题,可以群内@我或私聊或到问答社区http://wenda.iyuu.cn/提问,必回。
### 2020年4月1日00:56:31
IYUUAutoReseed自动辅种备忘录gitee代码仓库https://gitee.com/ledc/IYUUAutoReseed
github代码仓库https://github.com/ledccn/IYUUAutoReseed
爱语飞飞:[https://iyuu.cn](https://iyuu.cn/)
大卫博客:[https://www.iyuu.cn](https://www.iyuu.cn/)
问答社区:[http://wenda.iyuu.cn](http://wenda.iyuu.cn/)
接口文档http://api.iyuu.cn/docs.php
### 2020年3月14日22:03:02
时光如梭转眼至v1.6.3感谢一路走来陪伴的朋友们为了共同的爱好我们相聚在这里本版本上线了合作站点认证系统合作站点有Ourbits、 HD Dolby、HDHome。
【更新提醒】手动更新的可以直接覆盖升级git安装脚本的会自动升级脚本然后对比config.sample.php手动添加用户id配置项启动辅种时会自动进行验证。
如果有问题,可以群内@我或到问答社区http://wenda.iyuu.cn/提问,必回。
### 2020年3月13日14:52:32
【重要提醒】IYUUAutoReseed自动辅种工具合作站点有OurBits、HD Dolby、HDHome可以对使用辅种工具的用户进行认证与绑定。
请大家及时根据新的示例配置config.sample.php增加用户id配置项及时认证。
### 2020年3月9日22:52:11
【喜报】辅种服务器顺利迁移阿里云。辅种接口域名api.iyuu.cn
问答社区wenda.iyuu.cn
### 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的头上。

View File

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

View File

@@ -79,11 +79,17 @@
控制面板\时钟和区域\区域\管理\更改系统区域设置\勾选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]
1、QQ群859882209[2000人.入门群]931954050[1000人.进阶群]
2、QQ群859882209
2、问答社区http://wenda.iyuu.cn
3、issues https://gitee.com/ledc/IYUUAutoReseed/issues
3、博客https://www.iyuu.cn
4、issues https://gitee.com/ledc/IYUUAutoReseed/issues

View File

@@ -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日 | 2020年5月6日 |
| 脚本docker容器化测试版 | 已完成 | 2020年2月21日 | 2020年2月21日 |
| 浏览器插件 | 暂未开始 | | |
| 合集自动拆包辅种 | 暂未开始 | | |

View File

@@ -1,47 +0,0 @@
## 404数据最后清理时间
|标志 | 最后清理时间 | 状态 |
| :-: | :-: | ---- |
| 1ptba | 2020年1月19日12:00:00 | 已完成 |
|52pt | 2020年1月19日12:00:00 | 已完成 |
|beitai-备胎 | 2020年1月19日12:00:00 | 已完成 |
|brobits | 2020年1月19日12:00:00 | 已完成 |
|btschool-学校 | 2020年1月19日12:00:00 | 已完成 |
|chdbits-彩虹岛 | 2020年1月19日12:00:00 | 已完成 |
|discfan-港知堂 | 2020年1月19日12:00:00 | 已完成 |
|dmhy-幼儿园 | 2020年1月19日12:00:00 | 已完成 |
|eastgame | 2020年1月19日12:00:00 | 已完成 |
|hd4fans-兽 | | 已完成 |
|hdarea-HDA | | |
|hdbd-伊甸园 | | |
|hdbug(hddisk) | 2020年1月19日12:00:00 | 已完成 |
|hdchina-瓷器 | 2020年1月19日12:00:00 | 已完成 |
|hdcity-城市 | 2020年1月19日12:00:00 | 已完成 |
|hddolby-杜比 | 2020年1月19日12:00:00 | 已完成 |
|hdhome-家园 | 2020年1月19日12:00:00 | 已完成 |
|hdsky-天空 | 2020年1月19日12:00:00 | 已完成 |
|hdstreet | 2020年1月19日12:00:00 | 已完成 |
|hdtime-时间 | 2020年1月19日12:00:00 | 已完成 |
|hdzone-HDZ | 2020年1月19日12:00:00 | 已完成 |
|joyhd | 2020年1月19日12:00:00 | 已完成 |
| keepfrds-朋友 | 2020年1月19日12:00:00 | 已完成 |
|leaguehd | 2020年1月19日12:00:00 | 已完成 |
| m-team-馒头 | 2020年1月19日12:00:00 | 已完成 |
|moecat-萌猫 | 2020年1月19日12:00:00 | 已完成 |
|nanyangpt-南洋 | 2020年1月19日12:00:00 | 已完成 |
|nicept-老师 | | |
|opencd-皇后 | | 已完成 |
|oshen | 2020年1月19日12:00:00 | 已完成 |
|ourbits-我堡 | 2020年1月19日12:00:00 | 已完成 |
|pterclub-猫站 | 2020年1月19日12:00:00 | 已完成 |
|pthome-铂金家 | 2020年1月19日12:00:00 | 已完成 |
|ptmsg | 2020年1月19日12:00:00 | 已完成 |
|ptsbao-烧包 | 2020年1月19日12:00:00 | 已完成 |
|soulvoice-聆音 | 2020年1月19日12:00:00 | 已完成 |
|ssd-春天 | 2020年1月19日12:00:00 | 已完成 |
|tjupt-北洋 | 2020年1月19日12:00:00 | 已完成 |
|torrentccf-TCCF | 2020年1月19日12:00:00 | 已完成 |
| ttg-听听歌 | 2020年1月19日12:00:00 | 已完成 |
| upxin | 2020年1月19日12:00:00 | 已完成 |
| yingk-映客 | 2020年1月19日12:00:00 | 已完成 |
| ziyuan-资源 | | |

View File

@@ -1,3 +1,59 @@
### 更多日志请查看:
### https://gitee.com/ledc/IYUUAutoReseed/commits/master
------
### 2020年7月3日
1. 优化windows的辅种批处理采用环境变量调用
2. 新增站点HDRoute、hdbd、haidan、HDfans
3. 优化curl的连接参数
4. 新增小钢炮专用的docker脚本
5. 新增合作站点MoeCat
6. 微信报表增加版本号提示
7. qBittorrent下载器增加root_folder配置项是否创建子文件夹
### 2020年3月22日
1. 转移种子,设置自动开始开关
2. 添加git自动更新.cmd
3. 优化做种客户端转移配置的提示
4. 人性化加入vendor目录
5. 修复因不支持站点缓存引起的错误提示
6. 新增合作站点hddolby、hdhome、pthome
7. 修复瓷器辅种乱码不美观的问题
8. 简化docker编译文件
9. 优化合作站点登录缓存,检索请求
10. 优化输出提示未填写passkey的站点只提示一次后续自动跳过
11. 增加通用备份脚本
### 2020年2月26日
1. 新增葡萄pt
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站点辅种

View File

@@ -1,102 +1,162 @@
以下教程以windows为基础进行讲解通用威联通、群晖、铁威马等Linux系统。
博客链接https://www.iyuu.cn/archives/324/
# 重要提示:请先完整阅读完再动手操作!
## 第一步 下载压缩包
从[码云仓库][1]下载最新源码解压缩到D盘的根目录下。
**特殊说明新手第一次使用建议去群内下载zip压缩包。**
## 第二步 复制一份配置文件
打开`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.申请爱语飞飞token2.编辑全局客户端; 3.编辑各站的密钥即passkey4.配置合作站点的passkey用户id`
其他配置,如果不懂也没有关系;先保持默认,等脚本运行起来,再修改也不迟。另外,修改时一定要细心,仔细看教程。
打开`D:\IYUUAutoReseed\config\config.php`文件,如下图:
![编辑配置1.png][2]
**下面开始详细步骤!!!!**
### 填写全局客户端
上图红框内的是`transmission`的示例配置,绿框是`qBittorrent`的示例配置;
IYUU自动辅种工具目前支持这两种下载器支持多盘位辅种时全自动对应资源的下载目录。
1编辑`transmission`下载器
`http://127.0.0.1:9091/transmission/rpc`是下载器的连接参数,你要修改的部分是`127.0.0.1:9091`改成你的IP与端口本机使用无需修改局域网内的机器请填写局域网IP与端口远程使用请填写DDNS的远程连接域名与端口。
username是用户名、password是密码。
如果你没有用到`transmission`下载器,请把红框的内容都删除。
2编辑`qBittorrent`下载器
方法与上一步相同只需填写ip、端口、用户名、密码即可。如果您是windows下的qBittorrent请参考下图打开`WEB用户界面`
![qb设置WEB用户界面.png][3]
因为我两个下载器都在用,编辑好后,如图:
![编辑配置2.png][4]
### 填写各站秘钥passkey
IYUU自动辅种需要您配置各站的passkey没有配置passkey的站点会自动跳过
从各站点的控制面板,找到您的`秘钥`复制粘贴过来即可。
配置好后如图:
![编辑配置3.png][5]
----------
## 第四步重点讲解Ourbits站点的配置
IYUU自动辅种工具、Ourbits双方达成合作可以对使用接口的用户实现认证。
### 申请爱语飞飞微信通知token新用户访问http://iyuu.cn 申请!
1.点击`开始使用`,出现二维码,用`微信扫码`
![微信通知1.png][6]
![微信通知2.png][7]
![微信通知3.png][8]
![微信通知1.png][2]
![微信通知2.png][3]
![微信通知3.png][4]
2.复制您的token令牌到`/config/config.php`文件内的`iyuu.cn`对应的配置字段,保存。如图:
![微信通知4.png][9]
![微信通知4.png][5]
### 设置Ourbits
----------
### 填写全局客户端
打开`D:\IYUUAutoReseed\config\config.php`文件,如下图:
![编辑配置1.png][6]
上图红框内的是`transmission`的示例配置,绿框是`qBittorrent`的示例配置;
IYUU自动辅种工具目前支持这两种下载器支持多盘位辅种时全自动对应资源的下载目录。
#### 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][7]
因为我两个下载器都在用,编辑好后,如图:
![编辑配置2.png][8]
----------
### 填写各站秘钥passkey
IYUU自动辅种需要您配置各站的passkey目前支持40多个站点的自动辅种没有配置passkey的站点会自动跳过。注2019年12月28日补充辅种hdcity、hdchina需要配置cookie。
从各站点的控制面板或对应地方,找到您的`密钥`复制粘贴过来即可。
配置好后如图:
![编辑配置3.png][9]
----------
## 第四步,合作站点的配置
此处配置也可以参考这里https://www.iyuu.cn/archives/337/
IYUU自动辅种工具与站点达成合作可以对使用接口的用户实现认证。以Ourbits为例进行讲解
![编辑配置4.png][10]
`passkey`,在你的控制面板 - 密钥
`is_vip`,根据你的实际情况填写,因站点有下载种子的流控,如果你不在限制之列,可以`设置为1`
`id`,为用户中心打开后,浏览器地址栏**http://xxxxx.xxx/userdetails.php?id=`46880`**等号=后面的几个数字,如图:
![编辑配置6.png][11]
到此,配置文件编辑完毕,请记得保存。
如果提示保存格式请保存为UTF8无BOM格式。
如果有多个合作站账号,请全部配置,如图:
![合作站点ID.png][12]
------
到此配置文件编辑完毕请记得保存如果提示保存格式请保存为UTF8无BOM格式。
## 群晖、铁威马、威联通等Linux环境
----------
## 群晖、铁威马、威联通等Linux的php环境
**群晖、铁威马、威联通自带php运行环境非常简单。**
经过上面步骤其实已经完成了配置只需要把脚本复制到设备内用php命令运行脚本即可。
下面是各系统运行php的命令
群晖php`php`
威联通php `/mnt/ext/opt/apache/bin/php`
铁威马php`php`
群晖php命令`php`
威联通php命令`/mnt/ext/opt/apache/bin/php`
----------
铁威马php命令`php`
**威联通补充几个命令,找到辅种脚本:**
```sh
#查看php版本
/mnt/ext/opt/apache/bin/php -v
#切换admin
sudo -i
#搜索iyuu.php或IYUUAutoReseed
find / -name iyuu.php
#根据上一行命令搜索结果,组成辅种命令:
/mnt/ext/opt/apache/bin/php 找到的路径/iyuu.php
```
----------
## Windows安装PHP运行环境
也可以去官方下载【https://www.php.net/downloads】,官方下载的记得开启`curl、fileinfo、mbstring`这3个扩展。
另外我打包了一份,下载地址:
微云链接https://share.weiyun.com/5I13dek 密码utcjsx
也可以去官方下载【https://www.php.net/downloads】
**特别提醒:官方下载的记得开启`curl、json、mbstring`这3个扩展。**
**特别提醒:官方下载的记得开启`curl、json、mbstring`这3个扩展。**
**特别提醒:官方下载的记得开启`curl、json、mbstring`这3个扩展。**
![php开启扩展.png][13]
**另外我打包了一份【扩展已开启】,下载地址:**
!!!
<a href="http://www.dawei.hk:81/php-7.4.2-nts-Win32-vc15-x86.zip" target="_blank"><h3><code>http://www.dawei.hk:81/php-7.4.2-nts-Win32-vc15-x86.zip</code></h3></a>
<a href="http://www.dawei.hk:81/php-7.4.2-nts-Win32-vc15-x64.zip" target="_blank"><h3><code>http://www.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]
重点根据你下载的版本不同、路径不同请把你解压的php环境的路径添加进系统的环境变量内。比如我下载的是`php-7.4.2-nts-Win32-vc15-x86.zip`解压到了D盘根目录下可以这样添加
![请输入图片描述][15]
然后,点击红框内`执行辅种`即可,也可以运行命令:`php iyuu.php`
> 提示新手第一次请去群内下载打包好的Windows版本双击运行即可。
如果你前期严格按照配置一步步操作,这里会正常显示跑动的辅种列表。正常如图:
![编辑配置8.png][13]
![编辑配置8.png][16]
[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/2019/12/2331433923.png
[3]: https://www.iyuu.cn/usr/uploads/2019/12/3324442680.png
[4]: https://www.iyuu.cn/usr/uploads/2019/12/3181272964.png
[5]: https://www.iyuu.cn/usr/uploads/2019/12/3669828008.png
[6]: https://www.iyuu.cn/usr/uploads/2019/12/2720183833.png
[7]: https://www.iyuu.cn/usr/uploads/2019/12/405587689.png
[8]: https://www.iyuu.cn/usr/uploads/2019/12/441257656.png
[9]: https://www.iyuu.cn/usr/uploads/2019/12/890327305.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/2020/04/712430028.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/2020/03/686511859.png
[16]: https://www.iyuu.cn/usr/uploads/2019/12/2523845772.png

View File

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

View File

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