diff --git a/.github/Issue_Template_CN.md b/.github/ISSUE_TEMPLATE/Issue_Template_CN.md
similarity index 100%
rename from .github/Issue_Template_CN.md
rename to .github/ISSUE_TEMPLATE/Issue_Template_CN.md
diff --git a/.github/Issue_Template_EN.md b/.github/ISSUE_TEMPLATE/Issue_Template_EN.md
similarity index 100%
rename from .github/Issue_Template_EN.md
rename to .github/ISSUE_TEMPLATE/Issue_Template_EN.md
diff --git a/.github/workflows/build_image_bhp.yml b/.github/workflows/build_image_bhp.yml
new file mode 100644
index 0000000..f031723
--- /dev/null
+++ b/.github/workflows/build_image_bhp.yml
@@ -0,0 +1,21 @@
+name: "BiliHelper-personal Docker Image Buildx Stable Github"
+on:
+ workflow_dispatch:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ name: Build BiliHelper-personal Docker Image Build Stable Github
+ steps:
+ - name: Checkout master
+ uses: actions/checkout@master
+ - name: Build and publish image
+ uses: ilteoood/docker_buildx@master
+ with:
+ publish: true
+ imageName: lkeme/bilihelper-personal
+ dockerFile: docker/Dockerfile_unicom
+ platform: linux/amd64,linux/arm64,linux/arm/v8,linux/arm/v7
+ tag: latest
+ dockerUser: ${{ secrets.DOCKER_USERNAME }}
+ dockerPassword: ${{ secrets.DOCKER_PASSWORD }}
\ No newline at end of file
diff --git a/DOC.md b/DOC.md
index ff44ecd..24ba4f3 100644
--- a/DOC.md
+++ b/DOC.md
@@ -158,22 +158,22 @@ $ php index.php
- 通过环境变量进行传入
```shell script
- docker run -itd --rm -e USER_NAME=你的B站登录账号 -e USER_PASSWORD=你的B站密码 zsnmwy/bilihelper-personal
+$ docker run -itd --rm -e USER_NAME=你的B站登录账号 -e USER_PASSWORD=你的B站密码 lkeme/bilihelper-personal
```
-- 通过配置文件进行传入
+- 通过配置文件进行传入(能保留登录状态,自定义配置)
1. 下载[配置文件](https://raw.githubusercontent.com/lkeme/BiliHelper-personal/master/conf/user.ini.example)
2. 修改
3. 通过下面的命令进行挂载并运行
```shell script
-docker run -itd --rm -v /path/to/your/confFileName.ini:/app/conf/user.ini zsnmwy/bilihelper-personal
+$ docker run -itd --rm -v /path/to/your/confFileName.ini:/app/conf/user.ini lkeme/bilihelper-personal
```
-```
-相关参数
+- 相关参数
+```ps
-it 前台运行
-itd 后台运行
-v 本地文件:容器内部文件 ==> 挂载本地文件到容器中。本地文件路径随便变,容器内部文件路径不能变。
diff --git a/README.md b/README.md
index d3e876e..9731828 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,7 @@



+[](https://hub.docker.com/r/lkeme/bilihelper-personal)
@@ -23,6 +24,8 @@
## 公告通知
+代码开源,本地化99.9%,项目不收集或使用任何敏感信息,兴趣所致,一切只为学习。
+
```notice
---- 免费的东西总是得不到人的珍惜。
---- 只有花大价钱去买到的东西,才会令人信任。
@@ -52,7 +55,7 @@
| GiftHeart | true | 21.05.18 | 日常心跳每日礼包礼物 |
| SmallHeart | true | 21.05.18 | 直播挂机,每日24个小心心 |
| MaterialObject | true | 21.05.18 | 直播金色宝箱实物抽奖 |
-| AloneTcpClient | true | 21.05.18 | 作者的独立直播监控 |
+| AloneTcpClient | true | 21.05.18 | 作者的独立直播监控(可支持本项目哦) |
| ZoneTcpClient | true | 21.05.18 | 官方的分区直播监控 |
| StormRaffle | true | 21.05.18 | 直播节奏风暴抽奖、亿元 |
| GiftRaffle | true | 21.05.18 | 直播礼物抽奖 |
@@ -105,6 +108,14 @@ Group: [55308141](https://jq.qq.com/?_wv=1027&k=5AIDaJg) | **请不要来问如
* [BiliHelper](https://github.com/lkeme/BiliHelper)
* [Github](https://github.com/)
+## 致谢
+
+感谢 `JetBrains` 提供优秀的IDE。
+
+
+
+
+
## License 许可证
BiliHelper is under the MIT license.
diff --git a/data/activity_infos.json b/data/activity_infos.json
index 9b768d8..832be33 100644
--- a/data/activity_infos.json
+++ b/data/activity_infos.json
@@ -76,5 +76,17 @@
"draw_times": 1,
"expire_at": "2021-06-15 23:59:59"
}
+ ,
+ {
+ "url": "https://www.bilibili.com/blackboard/topic/activity-natsume.html",
+ "title": "夏目友人帐新作动画有奖预约页",
+ "description": "活动期间每天分享页面,新增一次机会。",
+ "sid": "a213c0b5-b6d4-11eb-8597-246e966235d8",
+ "login": "true",
+ "follow": "false",
+ "share": "true",
+ "draw_times": 1,
+ "expire_at": "2021-06-15 23:59:59"
+ }
]
}
\ No newline at end of file
diff --git a/Dockerfile b/docker/Dockerfile
similarity index 69%
rename from Dockerfile
rename to docker/Dockerfile
index 52987b6..c8ed2d3 100644
--- a/Dockerfile
+++ b/docker/Dockerfile
@@ -1,9 +1,12 @@
FROM php:alpine
-MAINTAINER zsnmwy
+#MAINTAINER zsnmwy
+LABEL AUTHOR = "Lkeme "
ENV USER_NAME='' \
USER_PASSWORD='' \
+ REPO_URL='https://github.com/' \
+# CN=false \
CONIFG_PATH='/app/conf/user.ini' \
Green="\\033[32m" \
Red="\\033[31m" \
@@ -22,8 +25,14 @@ WORKDIR /app
#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
RUN docker-php-ext-install sockets
+#RUN if [ "${CN}" = true ]; then export REPO_URL="https://github.com.cnpmjs.org"; fi
+
+#RUN set -ex \
+# && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
+# && echo "Asia/Shanghai" > /etc/timezone \
+
RUN apk add --no-cache git && \
- git clone https://github.com/lkeme/BiliHelper-personal.git --depth=1 /app && \
+ git clone ${REPO_URL}/lkeme/BiliHelper-personal.git --depth=1 /app && \
php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');" && \
php composer-setup.php && \
php composer.phar install && \
@@ -35,4 +44,4 @@ ENTRYPOINT echo -e "\n ======== \n ${Info} ${GreenBG} 正使用 git pull 同步
echo -e "\n ======== \n ${Info} ${GreenBG} 安装/更新 项目运行依赖 ${Font} \n ======== \n" && \
php composer.phar install && \
echo -e "\n \n \n \n" && \
- if [[ -f ${CONIFG_PATH} ]]; then echo -e "\n ======== \n ${GreenBG} 正在使用外部配置文件 ${Font} \n ======== \n" && php index.php ; else echo -e "${OK} ${GreenBG} 正在使用传入的环境变量进行用户配置。\n 如果需要配置更多选择项,请通过挂载配置文件来传入。具体参考项目中的README。\n https://github.com/lkeme/BiliHelper-personal.git ${Font} \n ======== \n " && cp /app/conf/user.ini.example /app/conf/user.ini && sed -i ''"$(cat /app/conf/user.ini -n | grep "APP_USER=" | awk '{print $1}')"'c '"$(echo "APP_USER=${USER_NAME}")"'' ${CONIFG_PATH} && sed -i ''"$(cat /app/conf/user.ini -n | grep "APP_PASS=" | awk '{print $1}')"'c '"$(echo "APP_PASS=${USER_PASSWORD}")"'' ${CONIFG_PATH} && php index.php; fi
+ if [[ -f ${CONIFG_PATH} ]]; then echo -e "\n ======== \n ${GreenBG} 正在使用外部配置文件 ${Font} \n ======== \n" && php index.php ; else echo -e "${OK} ${GreenBG} 正在使用传入的环境变量进行用户配置。\n 如果需要配置更多选择项,请通过挂载配置文件来传入。具体参考项目中的README。\n https://github.com/lkeme/BiliHelper-personal.git ${Font} \n ======== \n " && cp /app/conf/user.ini.example /app/conf/user.ini && sed -i ''"$(cat /app/conf/user.ini -n | grep "username = \"\"" | awk '{print $1}')"'c '"$(echo "username = \"${USER_NAME}\"")"'' ${CONIFG_PATH} && sed -i ''"$(cat /app/conf/user.ini -n | grep "password = \"\"" | awk '{print $1}')"'c '"$(echo "password = \"${USER_PASSWORD}\"")"'' ${CONIFG_PATH} && php index.php; fi
diff --git a/src/core/Curl.php b/src/core/Curl.php
index 538ac7f..6833b83 100644
--- a/src/core/Curl.php
+++ b/src/core/Curl.php
@@ -243,7 +243,7 @@ class Curl
'Connection' => 'keep-alive',
// 'Content-Type' => 'application/x-www-form-urlencoded',
// 'User-Agent' => 'Mozilla/5.0 BiliDroid/5.51.1 (bbcallen@gmail.com)',
- 'User-Agent' => 'Mozilla/5.0 BiliDroid/6.24.0 (bbcallen@gmail.com) os/android model/MuMu mobi_app/android build/6240300 channel/bili innerVer/6240300 osVer/6.0.1 network/2',
+ 'User-Agent' => 'Mozilla/5.0 BiliDroid/6.25.0 (bbcallen@gmail.com) os/android model/MuMu mobi_app/android build/6250300 channel/bili innerVer/6250300 osVer/6.0.1 network/2',
// 'Referer' => 'https://live.bilibili.com/',
];
$pc_headers = [
diff --git a/src/plugin/Judge.php b/src/plugin/Judge.php
index efa20e0..babafda 100644
--- a/src/plugin/Judge.php
+++ b/src/plugin/Judge.php
@@ -36,8 +36,8 @@ class Judge
return;
}
// self::judgementIndex();
- // 如果没有设置时间 就设置个默认时间
- if (self::getLock() < time()) {
+ // 如果没有设置时间 就设置个默认时间 可能在一秒钟内处理完 所以 <=
+ if (self::getLock() <= time()) {
self::setLock(mt_rand(15, 30) * 60);
}
}
diff --git a/src/plugin/Sign.php b/src/plugin/Sign.php
index 0be51b5..2f4c4a3 100644
--- a/src/plugin/Sign.php
+++ b/src/plugin/Sign.php
@@ -55,7 +55,7 @@ class Sign
'access_key' => getConf('access_token', 'login.auth'),
'actionKey' => 'appkey',
'appkey' => $appkey,
- 'build' => 6240300,
+ 'build' => 6250300,
'channel' => 'bili',
'device' => 'phone',
'mobi_app' => 'android',
@@ -84,7 +84,7 @@ class Sign
'access_key' => getConf('access_token', 'login.auth'),
'actionKey' => 'appkey',
'appkey' => $appkey,
- 'build' => 6240300,
+ 'build' => 6250300,
'device' => 'phone',
'mobi_app' => 'android',
'platform' => 'android',
diff --git a/src/plugin/ZoneTcpClient.php b/src/plugin/ZoneTcpClient.php
index af22fa2..c9b167b 100644
--- a/src/plugin/ZoneTcpClient.php
+++ b/src/plugin/ZoneTcpClient.php
@@ -471,10 +471,10 @@ class ZoneTcpClient
/**
* @use 读数据
* @param $length
- * @param $is_header
- * @return array|bool|false
+ * @param bool $is_header
+ * @return array|bool
*/
- private static function reader($length, $is_header = false)
+ private static function reader($length, bool $is_header = false)
{
$data = false;
try {