Skip to content
This repository has been archived by the owner on Dec 25, 2024. It is now read-only.

[*] 修复屏蔽海外ip #144

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ MAIL_FROM_NAME=Example
MAIL_TO_ADDRESS=hello@example.com
MAIL_TO_NAME=Example

_94LIST_VERSION=1.2.2
_94LIST_VERSION=1.2.3
_94LIST_SLEEP=3
_94LIST_MAX_ONCE=20
_94LIST_PASSWORD=""
Expand All @@ -33,3 +33,4 @@ _94LIST_MAX_SINGLE_FILESIZE=0
_94LIST_TOKEN_MODE=true
_94LIST_BUTTON_LINK="blank"
_94LIST_LIMIT_CN=true
_94LIST_LIMIT_PROV=true
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## 2024

### 07-03 v1.2.3

- [*] 修复屏蔽海外ip
- [+] 省份模式开关

### 07-02 v1.2.2

- [*] 优化代码功能
Expand Down
4 changes: 3 additions & 1 deletion app/Http/Controllers/v1/ParseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ public function getConfig(Request $request)

public function getProvinceFromIP($ip)
{
if (!config("94list.limit_prov")) return null;

$prov = self::_getProvinceFromIP($ip);
if ($prov === null) return null;
if ($prov === null || $prov === false) return $prov;

// 省份标准名称映射表
$provinces = [
Expand Down
4 changes: 3 additions & 1 deletion app/Http/Controllers/v1/config/MainConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public function updateConfig(Request $request)
"min_single_file" => "numeric",
"token_mode" => "bool",
"button_link" => "string",
"limit_cn" => "bool"
"limit_cn" => "bool",
"limit_prov" => "bool"
]);

if ($validator->fails()) return ResponseController::paramsError();
Expand All @@ -70,6 +71,7 @@ public function updateConfig(Request $request)
if (isset($request["token_mode"])) $update["_94LIST_TOKEN_MODE"] = $request["token_mode"];
if (isset($request["button_link"])) $update["_94LIST_BUTTON_LINK"] = $request["button_link"] === "" ? "" : '"' . $request["button_link"] . '"';
if (isset($request["limit_cn"])) $update["_94LIST_LIMIT_CN"] = $request["limit_cn"];
if (isset($request["limit_prov"])) $update["_94LIST_LIMIT_PROV"] = $request["limit_prov"];

if (count($update) === 0) ResponseController::paramsError();

Expand Down
3 changes: 2 additions & 1 deletion config/94list.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"fake_wx_user_agent" => "Mozilla/5.0 (Linux; Android 7.1.1; MI 6 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/6.2 TBS/043807 Mobile Safari/537.36 MicroMessenger/6.6.1.1220(0x26060135) NetType/4G Language/zh_CN MicroMessenger/6.6.1.1220(0x26060135) NetType/4G Language/zh_CN miniProgram",
"fake_cookie" => "BAIDUID=A4FDFAE43DDBF7E6956B02F6EF715373:FG=1; BAIDUID_BFESS=A4FDFAE43DDBF7E6956B02F6EF715373:FG=1; newlogin=1",

"version" => "1.2.2",
"version" => "1.2.3",
"sleep" => (int)env("_94LIST_SLEEP", 3),
"max_once" => (int)env("_94LIST_MAX_ONCE", 20),
"password" => env("_94LIST_PASSWORD", ""),
Expand All @@ -26,4 +26,5 @@
"token_mode" => (bool)env("_94LIST_TOKEN_MODE", true),
"button_link" => env("_94LIST_BUTTON_LINK", ""),
"limit_cn" => (bool)env("_94LIST_LIMIT_CN", true),
"limit_prov" => (bool)env("_94LIST_LIMIT_PROV", true),
];
Binary file removed public/assets/js/AccountManagement-DtIySTQq.js.gz
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added public/assets/js/AccountManagement-UvlgLPt0.js.gz
Binary file not shown.
Loading