From 14179ced1e5674c186a71c64a76b0e7762933279 Mon Sep 17 00:00:00 2001 From: Lkeme <19500576+lkeme@users.noreply.github.com> Date: Thu, 2 Nov 2023 12:10:06 +0800 Subject: [PATCH] [update] Version 2.4.0.231102 --- README.md | 2 +- docs/CHANGELOG.md | 26 ++++++++++++++-- plugin/ActivityLottery/ActivityLottery.php | 6 ++-- plugin/CheckUpdate/CheckUpdate.php | 8 +++-- profile/example/config/user.ini | 5 ++++ resources/version.json | 12 ++++---- src/Util/GhProxy/GhProxy.php | 35 ++++++++++++++++++++++ 7 files changed, 79 insertions(+), 15 deletions(-) create mode 100644 src/Util/GhProxy/GhProxy.php diff --git a/README.md b/README.md index f936413..53077be 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@

- + diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 0c3df1c..68f80c1 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -8,6 +8,28 @@ [comment]: <> () +## v2.4.0.231102 alpha (2023-11-02) + +### Added + +- 自定义Github文件加速镜像 +- 大会员权益每日观看视频10点额外经验 +- 网络错误推送 + +### Changed + +- 禁用二维码登录模式 +- + +### Fixed + +- 修复docker载入验证码服务出现错误 +- + +### Remarks + +- 请注意配置文件有所变动,注意更新。 + ## v2.3.0.230821 alpha (2023-08-21) ### Added @@ -32,12 +54,12 @@ ### Added - 批量取关插件 -- +- ### Changed - 更新会员大积分任务 -- +- ### Fixed diff --git a/plugin/ActivityLottery/ActivityLottery.php b/plugin/ActivityLottery/ActivityLottery.php index 5ab0ffe..a5b74dd 100644 --- a/plugin/ActivityLottery/ActivityLottery.php +++ b/plugin/ActivityLottery/ActivityLottery.php @@ -22,6 +22,7 @@ use Bhp\Plugin\BasePlugin; use Bhp\Plugin\Plugin; use Bhp\Request\Request; use Bhp\TimeLock\TimeLock; +use Bhp\Util\GhProxy\GhProxy; use function Amp\delay; class ActivityLottery extends BasePlugin @@ -298,9 +299,8 @@ class ActivityLottery extends BasePlugin $this->config['wait_get_infos'] = []; $this->config['wait_do_infos'] = []; // - // $url = 'aHR0cHM6Ly9yYXcua2dpdGh1Yi5jb20vbGtlbWUvQmlsaUhlbHBlci1wZXJzb25hbC9tYXN0ZXIvcmVzb3VyY2VzL2FjdGl2aXR5X2luZm9zLmpzb24='; - $url = 'aHR0cHM6Ly9naHByb3h5LmNvbS9odHRwczovL3Jhdy5naXRodWJ1c2VyY29udGVudC5jb20vbGtlbWUvQmlsaUhlbHBlci1wZXJzb25hbC9tYXN0ZXIvcmVzb3VyY2VzL2FjdGl2aXR5X2luZm9zLmpzb24='; - $url = base64_decode($url); + $url = 'aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL2xrZW1lL0JpbGlIZWxwZXItcGVyc29uYWwvbWFzdGVyL3Jlc291cmNlcy9hY3Rpdml0eV9pbmZvcy5qc29u'; + $url = GhProxy::mirror(base64_decode($url)); $response = Request::getJson(true, 'other', $url); // $this->_fetchRemoteInfos($response['data']); diff --git a/plugin/CheckUpdate/CheckUpdate.php b/plugin/CheckUpdate/CheckUpdate.php index 4e3dcf1..4909dc2 100644 --- a/plugin/CheckUpdate/CheckUpdate.php +++ b/plugin/CheckUpdate/CheckUpdate.php @@ -22,6 +22,7 @@ use Bhp\Plugin\BasePluginRW; use Bhp\Plugin\Plugin; use Bhp\Request\Request; use Bhp\TimeLock\TimeLock; +use Bhp\Util\GhProxy\GhProxy; use Bhp\Util\Resource\Resource; class CheckUpdate extends BasePluginRW @@ -119,11 +120,12 @@ class CheckUpdate extends BasePluginRW { $branch = getConf('app.branch'); $url = $this->resource->get($branch . '_raw_url'); + $url = GhProxy::mirror($url); $payload = []; // 防止错误拉取 - if (is_null($url)) { - return json_decode('{"code":404}', false); - } +// if (is_null($url)) { +// return json_decode('{"code":404}', false); +// } // return Request::getJson(false, 'other', $url, $payload); } diff --git a/profile/example/config/user.ini b/profile/example/config/user.ini index e3b0c44..0958cae 100644 --- a/profile/example/config/user.ini +++ b/profile/example/config/user.ini @@ -215,6 +215,11 @@ verify = true enable = false proxy = "http://127.0.0.1:8888" +; 是否使用自定义Github File Mirror/默认使用官方源 +[network_github] +enable = true +mirror = "https://gh.notifyplus.cf/" + ####################### # 程序设置 # ####################### diff --git a/resources/version.json b/resources/version.json index 8a073cc..f8c5a29 100644 --- a/resources/version.json +++ b/resources/version.json @@ -3,15 +3,15 @@ "project": "BiliHelper-personal", "branch": "master", "source": "https://github.com/lkeme/BiliHelper-personal", - "raw_url": "https://gh.notifyplus.cf/https://github.com/lkeme/BiliHelper-personal/blob/master/resources/version.json", - "master_raw_url": "https://gh.notifyplus.cf/https://github.com/lkeme/BiliHelper-personal/blob/master/resources/version.json", - "dev_raw_url": "https://gh.notifyplus.cf/https://github.com/lkeme/BiliHelper-personal/blob/dev/resources/version.json", + "raw_url": "https://github.com/lkeme/BiliHelper-personal/blob/master/resources/version.json", + "master_raw_url": "https://github.com/lkeme/BiliHelper-personal/blob/master/resources/version.json", + "dev_raw_url": "https://github.com/lkeme/BiliHelper-personal/blob/dev/resources/version.json", "master_purge_url": "https://cdn.staticaly.com/gh/lkeme/BiliHelper-personal/master/resources/version.json", "dev_purge_url": "https://cdn.staticaly.com/gh/lkeme/BiliHelper-personal/dev/resources/version.json", - "version": "2.3.0.230821", + "version": "2.4.0.231102", "des": "程序有更新,请及时线上查看更新哦~", - "time": "2023年08月21日", + "time": "2023-11-02", "ini_version": "0.0.1", "ini_des": "配置有更新,请及时线上查看更新哦~", - "ini_time": "2023年08月21日" + "ini_time": "2023-11-02" } diff --git a/src/Util/GhProxy/GhProxy.php b/src/Util/GhProxy/GhProxy.php new file mode 100644 index 0000000..0238a2f --- /dev/null +++ b/src/Util/GhProxy/GhProxy.php @@ -0,0 +1,35 @@ +