From 6158a487cfc9bed16e596f550c3861abf05053d6 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 2 Jun 2026 16:11:46 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BC=98=E5=8C=96]=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=E6=94=AF=E6=8C=81=E7=9A=84=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E9=A1=B5=E9=9D=A2=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openflare_agent/internal/nginx/pow_assets.go | 35 +++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/openflare_agent/internal/nginx/pow_assets.go b/openflare_agent/internal/nginx/pow_assets.go index 2ff116ff..c318b2b4 100644 --- a/openflare_agent/internal/nginx/pow_assets.go +++ b/openflare_agent/internal/nginx/pow_assets.go @@ -236,8 +236,27 @@ local challenge_info = cjson.encode({ pow_challenges:set(challenge_id, challenge_info, challenge_ttl) local static_prefix = "/.within.website/x/cmd/anubis/static/" -local title = "Making sure you're not a bot!" +local accept_lang = ngx.var.http_accept_language or "" local lang = "en" +if string.find(accept_lang, "zh") then + lang = "zh-CN" +end + +local t_title = "Making sure you're not a bot!" +local t_status = "Loading..." +local t_protected = "This site is protected by a Proof-of-Work challenge. Your browser will solve a small puzzle before the upstream response is shown." +local t_why = "Why am I seeing this?" +local t_why_desc = "OpenFlare is asking your browser to complete a lightweight computation to distinguish normal browser traffic from automated abuse. This should finish automatically." +local t_noscript = "JavaScript is required to pass this verification. Please enable JavaScript and reload." + +if lang == "zh-CN" then + t_title = "正在确认你是不是机器人!" + t_status = "加载中..." + t_protected = "本网站受工作量证明(Proof-of-Work)挑战保护。在显示源站响应之前,您的浏览器将解决一个微型谜题。" + t_why = "为什么我会看到这个?" + t_why_desc = "OpenFlare 正在要求您的浏览器完成一项轻量级计算,以区分正常的浏览器流量和自动化的恶意请求。这应该会自动完成。" + t_noscript = "很遗憾,您必须启用 JavaScript 才能通过这项验证。请开启 JavaScript 并刷新页面。" +end ngx.header.content_type = "text/html; charset=utf-8" ngx.say([[ @@ -246,7 +265,7 @@ ngx.say([[ -]] .. title .. [[ +]] .. t_title .. [[