Skip to content

Commit ee11630

Browse files
author
luolongfei
committed
Merge branch 'dev'
2 parents 2a9a733 + 4306361 commit ee11630

File tree

6 files changed

+84
-1601
lines changed

6 files changed

+84
-1601
lines changed

.env.example

+10-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#####################################################################
1313

1414
# .env 文件版本
15-
ENV_FILE_VERSION='v3.0'
15+
ENV_FILE_VERSION='v3.1'
1616

1717
###################### 账户配置 Account config #########################
1818
# Freenom 账户 Freenom Account
@@ -184,4 +184,12 @@ FF_SECRET_KEY='https://github.com/luolongfei/freenom'
184184
# aws waf solver 接口地址
185185
# aws waf solver url
186186
AWS_WAF_SOLVER_URL='aws-waf-solver:2019/aws_waf_token'
187-
###################### end AWS WAF SOLVER #########################
187+
188+
# 使用开源的 AWS WAF Solver API 0:不使用 1:使用
189+
# Use open-source AWS WAF Solver API 0: Do not use, 1: Use
190+
USE_OPEN_SOURCE_WAF_SOLVER_API=1
191+
192+
# 开源的 AWS WAF Solver URL
193+
# Open-source AWS WAF Solver URL
194+
OPEN_SOURCE_WAF_SOLVER_URL='https://aws-waf-solver.llf.app/token'
195+
###################### end AWS WAF SOLVER #########################

app/Console/FreeNom.php

+7-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
class FreeNom extends Base
2222
{
23-
const VERSION = 'v0.6.0';
23+
const VERSION = 'v0.6.1';
2424

2525
const TIMEOUT = 33;
2626

@@ -93,7 +93,7 @@ private function __construct()
9393
'headers' => [
9494
'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
9595
'Accept-Encoding' => 'gzip, deflate, br',
96-
'User-Agent' => sprintf('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36', get_random_user_agent()),
96+
'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36',
9797
],
9898
'timeout' => self::TIMEOUT,
9999
CURLOPT_FOLLOWLOCATION => true,
@@ -435,6 +435,8 @@ public function handle()
435435
$accounts = $this->getAccounts();
436436
$totalAccounts = count($accounts);
437437

438+
$awsWafToken = getAwsWafToken();
439+
438440
system_log(sprintf(lang('100049'), $totalAccounts));
439441

440442
foreach ($accounts as $index => $account) {
@@ -446,9 +448,9 @@ public function handle()
446448
system_log(sprintf(lang('100050'), get_local_num($num), $this->username, $num, $totalAccounts));
447449

448450
$this->jar = new CookieJar(); // 所有请求共用一个 CookieJar 实例
449-
450-
$awsWafToken = getAwsWafToken();
451-
$this->jar->setCookie(buildAwsWafCookie($awsWafToken));
451+
if ($awsWafToken !== '') {
452+
$this->jar->setCookie(buildAwsWafCookie($awsWafToken));
453+
}
452454

453455
$this->login($this->username, $this->password);
454456

0 commit comments

Comments
 (0)