This repository has been archived by the owner on Feb 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #198 from huankong233/dev
Dev
- Loading branch information
Showing
104 changed files
with
237 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ MAIL_FROM_NAME=Example | |
MAIL_TO_ADDRESS=[email protected] | ||
MAIL_TO_NAME=Example | ||
|
||
_94LIST_VERSION=1.3.41 | ||
_94LIST_VERSION=1.3.45 | ||
_94LIST_SLEEP=3 | ||
_94LIST_MAX_ONCE=20 | ||
_94LIST_PASSWORD="" | ||
|
@@ -47,3 +47,23 @@ _94LIST_SHOW_LOGIN_BUTTON=true | |
_94LIST_TOKEN_BIND_IP=false | ||
HKLIST_PROXY_SERVER= | ||
HKLIST_PROXY_PASSWORD= | ||
|
||
# 企业版CK | ||
HKLIST_DOWNLOAD_TICKET_COOKIE="" | ||
# 企业版CID | ||
# 进入企业版网页 地址栏里有 | ||
HKLIST_DOWNLOAD_TICKET_CID="" | ||
# 企业版 BDSTOKEN | ||
# 获取链接: https://pan.baidu.com/api/gettemplatevariable?fields=[%22bdstoken%22] | ||
HKLIST_DOWNLOAD_TICKET_BDSTOKEN="" | ||
# 存盘路径 | ||
# 注意: 以/打头,结尾不需要/,注意这个文件夹需要手动先创建好,下面的分享链接需要是设定的这个文件夹 | ||
HKLIST_DOWNLOAD_TICKET_PATH="/helloworld" | ||
|
||
# 记得填充下载卷(自行购买) | ||
# 企业版分享链接下载链接 | ||
# https://pan.baidu.com/s/123456 | ||
# 下面填 123456 | ||
HKLIST_DOWNLOAD_TICKET_SURL="" | ||
# 企业版分享链接下载密码 | ||
HKLIST_DOWNLOAD_TICKET_PWD="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
|
||
namespace App\Http\Middleware; | ||
|
||
use App\Http\Controllers\ResponseController; | ||
use App\Http\Controllers\UtilsController; | ||
use App\Models\Ip; | ||
use Closure; | ||
use Illuminate\Http\Request; | ||
use Illuminate\Support\Facades\Cache; | ||
use Symfony\Component\HttpFoundation\Response; | ||
|
||
class ParamCheck | ||
{ | ||
/** | ||
* Handle an incoming request. | ||
* | ||
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next | ||
*/ | ||
public function handle(Request $request, Closure $next): Response | ||
{ | ||
// 查询指纹是否存在 | ||
if (!$request["print"] || !$request["rand"]) return ResponseController::paramsError(); | ||
|
||
$print = Cache::get($request["print"]); | ||
$rand = $request["rand"]; | ||
$temp = $request->method() === "GET" ? $request->query() : $request->post(); | ||
unset($temp["rand"]); | ||
|
||
// 校验哈希 | ||
if ($rand !== sha1(json_encode($temp, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE))) return ResponseController::paramsError(); | ||
|
||
if (!$print) { | ||
Cache::put($request["print"], [UtilsController::getIp()]); | ||
return $next($request); | ||
} | ||
|
||
if (!in_array(UtilsController::getIp(), $print)) { | ||
if (count($print) > 3) { | ||
return ResponseController::inBlackList(); | ||
} else { | ||
$print[] = UtilsController::getIp(); | ||
Cache::put($request["print"], $print); | ||
} | ||
} | ||
|
||
return $next($request); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.