Dockerfile内切换为从gitee下载源代码

This commit is contained in:
david 2021-02-03 23:16:33 +08:00
parent 9dab3923b4
commit c3c1c0131a
7 changed files with 48 additions and 7 deletions

View File

@ -80,7 +80,7 @@ class Crontab
!is_dir($dir) and mkdir($dir, 0777, true); !is_dir($dir) and mkdir($dir, 0777, true);
}); });
// 初始化计划任务文件 // 初始化计划任务文件[不同平台的配置导入会造成command错误需要重新解析命令]
$cron = Conf::get(domainConfig::filename['crontab'], Constant::config_format, []); $cron = Conf::get(domainConfig::filename['crontab'], Constant::config_format, []);
array_walk($cron, function ($v, $k){ array_walk($cron, function ($v, $k){
self::createHock($v); self::createHock($v);

View File

@ -81,7 +81,8 @@ RUN set -ex \
php7-zip \ php7-zip \
php7-zlib \ php7-zlib \
php7-xml \ php7-xml \
&& git clone https://github.com/ledccn/IYUUPlus.git /IYUU \ # && git clone https://github.com/ledccn/IYUUPlus.git /IYUU \
&& git clone https://gitee.com/ledc/iyuuplus.git /IYUU \
&& cd /IYUU && php -r "file_exists('.env') || copy('.env.example', '.env');" \ && cd /IYUU && php -r "file_exists('.env') || copy('.env.example', '.env');" \
&& apk del --purge *-dev \ && apk del --purge *-dev \
# install latest composer # install latest composer

View File

@ -2,7 +2,8 @@
set -e set -e
envFile="/IYUU/.env" envFile="/IYUU/.env"
if [ ! -f "$envFile" ]; then if [ ! -f "$envFile" ]; then
git clone https://github.com/ledccn/IYUUPlus.git /IYUU #git clone https://github.com/ledccn/IYUUPlus.git /IYUU
git clone https://gitee.com/ledc/iyuuplus.git /IYUU
cd /IYUU && php -r "file_exists('.env') || copy('.env.example', '.env');" cd /IYUU && php -r "file_exists('.env') || copy('.env.example', '.env');"
fi fi
cd /IYUU && git fetch --all && git reset --hard origin/master cd /IYUU && git fetch --all && git reset --hard origin/master

View File

@ -38,11 +38,11 @@
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-icon layui-icon-username" for="token"></label> <label class="layui-icon layui-icon-username" for="token"></label>
<input type="text" name="token" lay-verify="required" placeholder="请填写爱语飞飞Token" autocomplete="off" class="layui-input" id="token"> <input type="text" name="token" lay-verify="required|token" placeholder="请填写爱语飞飞Token" lay-reqtext="爱语飞飞Token不能为空" autocomplete="off" class="layui-input" id="token">
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-icon layui-icon-password"></label> <label class="layui-icon layui-icon-password"></label>
<input type="password" name="password" lay-verify="required" placeholder="密码" autocomplete="off" class="layui-input" value=""> <input type="password" name="password" lay-verify="required|pass" placeholder="密码" lay-reqtext="密码不能为空(首次填写可以设置密码)。" autocomplete="off" class="layui-input" value="">
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<input type="checkbox" name="rememberMe" value="true" lay-skin="primary" title="记住Token" id="rememberMe"> <input type="checkbox" name="rememberMe" value="true" lay-skin="primary" title="记住Token" id="rememberMe">
@ -157,6 +157,29 @@
}); });
}); });
/**
* 表单验证
*/
form.verify({
token: function(value, item){ //value表单的值、item表单的DOM对象
if(!new RegExp("^[a-zA-Z0-9_\u4e00-\u9fa5\\s·]+$").test(value)){
return '爱语飞飞Token不能有特殊字符';
}
if(/(^\_)|(\__)|(\_+$)/.test(value)){
return '爱语飞飞Token首尾不能出现下划线\'_\'';
}
if(/^\d+\d+\d$/.test(value)){
return '爱语飞飞Token不能全为数字';
}
}
//我们既支持上述函数式的方式,也支持下述数组的形式
//数组的两个值分别代表:[正则匹配、匹配不符时的提示文字]
,pass: [
/^[\S]{6,30}$/
,'密码必须6到30位且不能出现空格'
]
});
// 登录事件 // 登录事件
form.on('submit('+ API.submitFilter +')', function (d) { form.on('submit('+ API.submitFilter +')', function (d) {
console.log(d.field); console.log(d.field);
@ -193,6 +216,7 @@
/** /**
* 用户验证弹窗 * 用户验证弹窗
* @param {object} recommend 推荐站点
*/ */
user_verify_action = function(recommend) { user_verify_action = function(recommend) {
getById('verify').classList.remove('layui-hide'); getById('verify').classList.remove('layui-hide');
@ -216,6 +240,8 @@
/** /**
* 弹窗内显示站点选择框 * 弹窗内显示站点选择框
* @param {object} recommend 推荐站点
* @param {int} total 推荐站点总数
*/ */
sites_show = function(recommend = null, total = 0) { sites_show = function(recommend = null, total = 0) {
let getTpl = sites_sel_tpl.innerHTML let getTpl = sites_sel_tpl.innerHTML
@ -229,6 +255,7 @@
/** /**
* 弹窗内站点选择框动作 * 弹窗内站点选择框动作
* @param {string} site 站点名字
*/ */
sites_sel_action = function(site = '') { sites_sel_action = function(site = '') {
let rule = JSON.parse(JSON.stringify(API.site_field_rule)) let rule = JSON.parse(JSON.stringify(API.site_field_rule))

View File

@ -229,11 +229,12 @@
}; };
} }
,cols: [[ ,cols: [[
{field: 'name', title: '站点名称', width:150, align: "center", sort: true, fixed: 'left'} {type:'numbers', fixed: 'left'}
,{field: 'name', title: '站点名称', width:130, align: "center", sort: true}
,{field: 'uuid', title: 'UUID', width:80, align: "center", hide: true} ,{field: 'uuid', title: 'UUID', width:80, align: "center", hide: true}
,{field: 'cookie', title: 'Cookie', minWidth:380, align: "center", sort: true} ,{field: 'cookie', title: 'Cookie', minWidth:380, align: "center", sort: true}
,{field: 'passkey', title: 'Passkey', width:300, align: "center", sort: true} ,{field: 'passkey', title: 'Passkey', width:300, align: "center", sort: true}
,{field: 'id', title: '用户id', width: 110, align: "center", sort: true} ,{field: 'id', title: '用户id', width: 90, align: "center", sort: true}
,{field: 'limitRule', title: '流控规则', width: 110, align: "center", sort: true ,{field: 'limitRule', title: '流控规则', width: 110, align: "center", sort: true
,templet: function(d){ ,templet: function(d){
if (d.limitRule) { if (d.limitRule) {

View File

@ -232,6 +232,7 @@
<tr> <tr>
<td>下载地址</td> <td>下载地址</td>
<td> <td>
Docker<a href="https://hub.docker.com/r/iyuucn/iyuuplus" target="_blank">IYUUPlus</a><br>
gitee<a href="https://gitee.com/ledc/iyuuplus" target="_blank">IYUUPlus</a> | <a href="https://gitee.com/ledc/IYUUAutoReseed" target="_blank">IYUUAutoReseed</a><br> gitee<a href="https://gitee.com/ledc/iyuuplus" target="_blank">IYUUPlus</a> | <a href="https://gitee.com/ledc/IYUUAutoReseed" target="_blank">IYUUAutoReseed</a><br>
github<a href="https://github.com/ledccn/IYUUPlus" target="_blank">IYUUPlus</a> | <a href="https://github.com/ledccn/IYUUAutoReseed" target="_blank">IYUUAutoReseed</a> github<a href="https://github.com/ledccn/IYUUPlus" target="_blank">IYUUPlus</a> | <a href="https://github.com/ledccn/IYUUAutoReseed" target="_blank">IYUUAutoReseed</a>
</td> </td>

10
todo.md Normal file
View File

@ -0,0 +1,10 @@
## TODO清单
- [ ] 辅种结束,写结束日志
- [ ] 一键清理辅种缓存
- [ ] 一键清理转移缓存
- [ ] [站点设置]已添加的,屏蔽选择
- [ ] 前端实时显示任务运行状态Ajax
- [ ] 一键更新到最新版
- [ ] 跨平台的配置导入导出(任务热刷新)
- [ ] 分批次请求辅种解决客户端做种多辅种失败的问题有的客户端内做种6000个