谷歌人机验证(reCaptcha)无法加载解决方法

谷歌人机验证(reCaptcha)无法加载解决方法

方法一:使用Watt Toolkit加速【国外验证平台】,为确保加速有效,请更新至官方最新版

方法二:使用 Header Editor浏览器插件导入规则

Header Editor插件可在edge浏览器扩展中心中直接下载,其他浏览器自行在网上搜索插件包

将以下规则复制到txt文件,后缀修改为.json

	"request": [
		{
			"enable": true,
			"name": "Google APIs",
			"ruleType": "redirect",
			"matchType": "regexp",
			"pattern": "^http(s?)://ajax\\.googleapis\\.com/(.*)",
			"exclude": "",
			"isFunction": false,
			"action": "redirect",
			"to": "https://gapis.geekzu.org/ajax/$2",
			"group": "Google Redirect"
		},
		{
			"enable": true,
			"name": "reCaptcha",
			"ruleType": "redirect",
			"matchType": "regexp",
			"pattern": "^http(s?)://(?:www\\.|recaptcha\\.|)google\\.com/recaptcha/(.*)",
			"exclude": "",
			"isFunction": false,
			"action": "redirect",
			"to": "https://recaptcha.net/recaptcha/$2",
			"group": "Google Redirect"
		}
	],
	"sendHeader": [],
	"receiveHeader": [
		{
			"enable": true,
			"name": "Content Security Policy Header Modification",
			"ruleType": "modifyReceiveHeader",
			"matchType": "all",
			"pattern": "",
			"exclude": "",
			"isFunction": true,
			"code": "let rt = detail.type;\nif (rt === 'script' || rt === 'stylesheet' || rt === 'main_frame' || rt === 'sub_frame') {\n  for (let i in val) {\n    if (val[i].name.toLowerCase() === 'content-security-policy') {\n      let s = val[i].value;\n      s = s.replace(/googleapis\\.com/g, '$& https://gapis.geekzu.org');\n      s = s.replace(/recaptcha\\.google\\.com/g, '$& https://recaptcha.net');\n      s = s.replace(/google\\.com/g, '$& https://recaptcha.net');\n      s = s.replace(/gstatic\\.com/g, '$& https://*.gstatic.cn');\n      val[i].value = s;\n    }\n  }\n}",
			"group": "Google Redirect"
		}
	]
}

在插件的管理界面导入上述规则,点击保存

导入成功后可以在规则列表中查看并启用规则

之后刷新页面,应该就可以看到验证窗口了

posted @ 2024-06-18 15:04  leewh1993  阅读(2828)  评论(0)    收藏  举报