Signup Gate
注册表单上加一个 script 标签,服务器上做一次校验。机器人、一次性邮箱、无效域名以及经 Tor 或 VPN 的注册都会被识别;gmial.com 这类拼写错误会得到修正建议。
创建账户
Safari 18 · iPhone邮箱
密码
账户已创建
检查内容
网络和浏览器信息随 token 而来;邮箱随您服务器的 verify 调用而来。
Tor、VPN、住宅代理和机房地址,按类别标注。
替机器人填写表单的无头浏览器和脚本。
语法错误、不收邮件的域名、一次性邮箱、拼写错误和职能邮箱。
工作方式
与任何表单使用的表单 Gate 相同,只是在校验中加上邮箱地址。
gate.js 标签在注册页面加一个 script 标签,填入您的站点密钥。
<script
src="https://ipscanner.io/gate.js"
data-sitekey="site_4fQ8nZ2kLm7xR1vT9cBw"
async></script>gate.js 会添加隐藏字段 ipscanner-token。不用 Cookie,也不用浏览器存储。
<form method="post" action="/signup">
<input name="email" type="email">
<input name="password" type="password">
<!-- added by gate.js -->
<input type="hidden"
name="ipscanner-token"
value="c2l0ZV80ZlE4fDE3…">
</form>您的服务器把 token 和邮箱发送到 /v1/gate/verify,得到一个结果。
{
"success": true,
"class": "human",
"action": "flag",
"mode": "enforce",
"email": {
"status": "risky",
"reason": "typo",
"suggestion": "jane@gmail.com",
"domain": "gmial.com",
"action": "flag"
}
}一次性邮箱和无效地址默认拦截;拼写错误会被标记,方便您提示修正。
校验代码
随 token 一起发送 email。在 enforce 模式下 action 为 block 时拒绝注册;有 email.suggestion 时把它展示给用户。
// token = the form's "ipscanner-token" field, ip = the visitor's address
// email = the address the form submitted
const res = await fetch('https://ipscanner.io/v1/gate/verify', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ secret: process.env.IPSCANNER_GATE_SECRET, token, remote_ip: ip, email })
});
const v = await res.json();
if (!v.success || (v.action === 'block' && v.mode === 'enforce')) {
// reject the signup; v.email.suggestion holds "did you mean" when there is one
}先观察,再拦截
Monitor 模式下不会拒绝任何请求。Sites 面板显示每次注册的类别、邮箱结果以及本应发生的处理。
常见问题
创建开启注册邮箱检查的 Gate,粘贴一个 script 标签,加上校验代码。Free 以 Monitor 模式运行;Starter 可拦截,¥128/月起。