[update] Version 2.4.0.231102

This commit is contained in:
Lkeme 2023-11-02 12:10:06 +08:00
parent ef6c0cc47d
commit 14179ced1e
7 changed files with 79 additions and 15 deletions

View File

@ -29,7 +29,7 @@
<p align=center> <p align=center>
<img src="https://img.shields.io/badge/Version-2.3.0.230821-orange.svg?longCache=true&style=for-the-badge" alt=""> <img src="https://img.shields.io/badge/Version-2.4.0.231102-orange.svg?longCache=true&style=for-the-badge" alt="">
<img src="https://img.shields.io/badge/PHP-8.1+-green.svg?longCache=true&style=for-the-badge" alt=""> <img src="https://img.shields.io/badge/PHP-8.1+-green.svg?longCache=true&style=for-the-badge" alt="">
<img src="https://img.shields.io/badge/Composer-latest-blueviolet.svg?longCache=true&style=for-the-badge" alt=""> <img src="https://img.shields.io/badge/Composer-latest-blueviolet.svg?longCache=true&style=for-the-badge" alt="">
<img src="https://img.shields.io/badge/License-mit-blue.svg?longCache=true&style=for-the-badge" alt=""> <img src="https://img.shields.io/badge/License-mit-blue.svg?longCache=true&style=for-the-badge" alt="">

View File

@ -8,6 +8,28 @@
[comment]: <> (</details>) [comment]: <> (</details>)
## v2.4.0.231102 alpha (2023-11-02)
### Added
- 自定义Github文件加速镜像
- 大会员权益每日观看视频10点额外经验
- 网络错误推送
### Changed
- 禁用二维码登录模式
-
### Fixed
- 修复docker载入验证码服务出现错误
-
### Remarks
- 请注意配置文件有所变动,注意更新。
## v2.3.0.230821 alpha (2023-08-21) ## v2.3.0.230821 alpha (2023-08-21)
### Added ### Added
@ -32,12 +54,12 @@
### Added ### Added
- 批量取关插件 - 批量取关插件
- -
### Changed ### Changed
- 更新会员大积分任务 - 更新会员大积分任务
- -
### Fixed ### Fixed

View File

@ -22,6 +22,7 @@ use Bhp\Plugin\BasePlugin;
use Bhp\Plugin\Plugin; use Bhp\Plugin\Plugin;
use Bhp\Request\Request; use Bhp\Request\Request;
use Bhp\TimeLock\TimeLock; use Bhp\TimeLock\TimeLock;
use Bhp\Util\GhProxy\GhProxy;
use function Amp\delay; use function Amp\delay;
class ActivityLottery extends BasePlugin class ActivityLottery extends BasePlugin
@ -298,9 +299,8 @@ class ActivityLottery extends BasePlugin
$this->config['wait_get_infos'] = []; $this->config['wait_get_infos'] = [];
$this->config['wait_do_infos'] = []; $this->config['wait_do_infos'] = [];
// //
// $url = 'aHR0cHM6Ly9yYXcua2dpdGh1Yi5jb20vbGtlbWUvQmlsaUhlbHBlci1wZXJzb25hbC9tYXN0ZXIvcmVzb3VyY2VzL2FjdGl2aXR5X2luZm9zLmpzb24='; $url = 'aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL2xrZW1lL0JpbGlIZWxwZXItcGVyc29uYWwvbWFzdGVyL3Jlc291cmNlcy9hY3Rpdml0eV9pbmZvcy5qc29u';
$url = 'aHR0cHM6Ly9naHByb3h5LmNvbS9odHRwczovL3Jhdy5naXRodWJ1c2VyY29udGVudC5jb20vbGtlbWUvQmlsaUhlbHBlci1wZXJzb25hbC9tYXN0ZXIvcmVzb3VyY2VzL2FjdGl2aXR5X2luZm9zLmpzb24='; $url = GhProxy::mirror(base64_decode($url));
$url = base64_decode($url);
$response = Request::getJson(true, 'other', $url); $response = Request::getJson(true, 'other', $url);
// //
$this->_fetchRemoteInfos($response['data']); $this->_fetchRemoteInfos($response['data']);

View File

@ -22,6 +22,7 @@ use Bhp\Plugin\BasePluginRW;
use Bhp\Plugin\Plugin; use Bhp\Plugin\Plugin;
use Bhp\Request\Request; use Bhp\Request\Request;
use Bhp\TimeLock\TimeLock; use Bhp\TimeLock\TimeLock;
use Bhp\Util\GhProxy\GhProxy;
use Bhp\Util\Resource\Resource; use Bhp\Util\Resource\Resource;
class CheckUpdate extends BasePluginRW class CheckUpdate extends BasePluginRW
@ -119,11 +120,12 @@ class CheckUpdate extends BasePluginRW
{ {
$branch = getConf('app.branch'); $branch = getConf('app.branch');
$url = $this->resource->get($branch . '_raw_url'); $url = $this->resource->get($branch . '_raw_url');
$url = GhProxy::mirror($url);
$payload = []; $payload = [];
// 防止错误拉取 // 防止错误拉取
if (is_null($url)) { // if (is_null($url)) {
return json_decode('{"code":404}', false); // return json_decode('{"code":404}', false);
} // }
// //
return Request::getJson(false, 'other', $url, $payload); return Request::getJson(false, 'other', $url, $payload);
} }

View File

@ -215,6 +215,11 @@ verify = true
enable = false enable = false
proxy = "http://127.0.0.1:8888" proxy = "http://127.0.0.1:8888"
; 是否使用自定义Github File Mirror/默认使用官方源
[network_github]
enable = true
mirror = "https://gh.notifyplus.cf/"
####################### #######################
# 程序设置 # # 程序设置 #
####################### #######################

View File

@ -3,15 +3,15 @@
"project": "BiliHelper-personal", "project": "BiliHelper-personal",
"branch": "master", "branch": "master",
"source": "https://github.com/lkeme/BiliHelper-personal", "source": "https://github.com/lkeme/BiliHelper-personal",
"raw_url": "https://gh.notifyplus.cf/https://github.com/lkeme/BiliHelper-personal/blob/master/resources/version.json", "raw_url": "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", "master_raw_url": "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", "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", "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", "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": "程序有更新,请及时线上查看更新哦~", "des": "程序有更新,请及时线上查看更新哦~",
"time": "2023年08月21日", "time": "2023-11-02",
"ini_version": "0.0.1", "ini_version": "0.0.1",
"ini_des": "配置有更新,请及时线上查看更新哦~", "ini_des": "配置有更新,请及时线上查看更新哦~",
"ini_time": "2023年08月21日" "ini_time": "2023-11-02"
} }

View File

@ -0,0 +1,35 @@
<?php declare(strict_types=1);
/**
* Website: https://mudew.com/
* Author: Lkeme
* License: The MIT License
* Email: Useri@live.cn
* Updated: 2023 ~ 2024
*
* _____ _ _ _ _ _ _____ _ _____ _____ _____
* | _ \ | | | | | | | | | | | ____| | | | _ \ | ____| | _ \ & l、
* | |_| | | | | | | | | |_| | | |__ | | | |_| | | |__ | |_| | (゚、
* | _ { | | | | | | | _ | | __| | | | ___/ | __| | _ /   \、゙ ~ *
* | |_| | | | | |___ | | | | | | | |___ | |___ | | | |___ | | \ \  じしf_, )
* |_____/ |_| |_____| |_| |_| |_| |_____| |_____| |_| |_____| |_| \_\
*/
namespace Bhp\Util\GhProxy;
class GhProxy
{
/**
* @param string $url
* @return string
*/
public static function mirror(string $url): string
{
if (!getEnable('network_github') || $url == '') return $url;
//
if (($mirror = getConf('network_github.mirror')) != '') {
return $mirror . $url;
}
//
return $url;
}
}