From 1f2ceb1cfa36935c444fcf4a252572efe35e067a Mon Sep 17 00:00:00 2001 From: NobyDa <53217160+NobyDa@users.noreply.github.com> Date: Sun, 5 May 2024 15:05:20 +0800 Subject: [PATCH 1/2] Update google CAPTCHA --- Surge/JS/Google_CAPTCHA.js | 2 +- Surge/Module/GoogleCAPTCHA.sgmodule | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 Surge/Module/GoogleCAPTCHA.sgmodule diff --git a/Surge/JS/Google_CAPTCHA.js b/Surge/JS/Google_CAPTCHA.js index 36d03725b6..84e8554fe2 100644 --- a/Surge/JS/Google_CAPTCHA.js +++ b/Surge/JS/Google_CAPTCHA.js @@ -6,7 +6,7 @@ Google搜索内容时并发使用多个策略(组),以避免可能出现的人 Surge脚本配置: [Script] -Google CAPTCHA = type=http-response,pattern=^https:\/\/www\.google\.com(\.[a-z]+|)\/search\?(client=[a-z-]+&|)q=,requires-body=1,debug=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Google_CAPTCHA.js,max-size=0,timeout=10,ability=http-client-policy,argument=^(🇸🇬|🇭🇰)\s.*\d+$ +Google CAPTCHA = type=http-response,pattern=^https:\/\/www\.google\.com(?:\.[a-z]+|)\/(?:search\?(?:|.+?&)q=|$),requires-body=1,debug=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Google_CAPTCHA.js,max-size=0,timeout=10,ability=http-client-policy,argument=^(🇸🇬|🇭🇰)\s.*\d+$ [MITM] hostname = www.google.com* diff --git a/Surge/Module/GoogleCAPTCHA.sgmodule b/Surge/Module/GoogleCAPTCHA.sgmodule new file mode 100644 index 0000000000..de44339b46 --- /dev/null +++ b/Surge/Module/GoogleCAPTCHA.sgmodule @@ -0,0 +1,11 @@ +#!name=Google人机验证 +#!desc=Google搜索内容时并发使用多个策略/策略组,以避免可能出现的人机验证。注意:需要在模块参数填写策略/策略组名的正则表达式。 +#!arguments=策略正则,脚本引擎:auto +#!arguments-desc=策略正则:策略/策略组名的正则表达式,例如 ^(🇸🇬|🇭🇰)\s.*\d+$ 如需同时使用所有策略/策略组可使用 .+ 表示。\n\n脚本引擎:jsc/webview/auto,默认auto。 +#!category=🐻 NobyDa + +[Script] +Google CAPTCHA = type=http-response,pattern=^https:\/\/www\.google\.com(?:\.[a-z]+|)\/(?:search\?(?:|.+?&)q=|$),requires-body=1,debug=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Google_CAPTCHA.js,max-size=0,timeout=10,ability=http-client-policy,engine={{{脚本引擎}}},argument={{{策略正则}}} + +[MITM] +hostname = www.google.com* \ No newline at end of file From b929f675231f6499f454ca231de4ecc77822f33d Mon Sep 17 00:00:00 2001 From: NobyDa <53217160+NobyDa@users.noreply.github.com> Date: Sun, 5 May 2024 17:25:20 +0800 Subject: [PATCH 2/2] Fix module issues. --- Surge/Module/GoogleCAPTCHA.sgmodule | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Surge/Module/GoogleCAPTCHA.sgmodule b/Surge/Module/GoogleCAPTCHA.sgmodule index de44339b46..88baccec9d 100644 --- a/Surge/Module/GoogleCAPTCHA.sgmodule +++ b/Surge/Module/GoogleCAPTCHA.sgmodule @@ -1,11 +1,11 @@ #!name=Google人机验证 #!desc=Google搜索内容时并发使用多个策略/策略组,以避免可能出现的人机验证。注意:需要在模块参数填写策略/策略组名的正则表达式。 #!arguments=策略正则,脚本引擎:auto -#!arguments-desc=策略正则:策略/策略组名的正则表达式,例如 ^(🇸🇬|🇭🇰)\s.*\d+$ 如需同时使用所有策略/策略组可使用 .+ 表示。\n\n脚本引擎:jsc/webview/auto,默认auto。 +#!arguments-desc=策略正则:策略/策略组名的正则表达式,例如:\n^(🇸🇬|🇭🇰)\s.*\d+$ 如需同时使用所有策略/策略组可使用 .+ 表示。\n\n脚本引擎:jsc/webview/auto,默认auto。 #!category=🐻 NobyDa [Script] Google CAPTCHA = type=http-response,pattern=^https:\/\/www\.google\.com(?:\.[a-z]+|)\/(?:search\?(?:|.+?&)q=|$),requires-body=1,debug=0,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Google_CAPTCHA.js,max-size=0,timeout=10,ability=http-client-policy,engine={{{脚本引擎}}},argument={{{策略正则}}} [MITM] -hostname = www.google.com* \ No newline at end of file +hostname = %APPEND% www.google.com* \ No newline at end of file