Compare commits

...

5 Commits

  1. 2
      haproxy/haproxy.cfg
  2. 7
      haproxy/template/maintenance.html
  3. 23
      src/locales/pt-BR.json
  4. 9
      src/lua/scripts/bot-check.lua
  5. 2
      src/lua/scripts/templates.lua

@ -68,7 +68,7 @@ frontend http-in
# acl for lua check whitelisted IPs/subnets and some excluded paths
acl is_excluded src,map_ip(/etc/haproxy/map/whitelist.map) -m found
acl is_excluded path /favicon.ico #add more
acl is_excluded path /favicon.ico /.basedflare/pow-icon #add more
# acl ORs for when ddos_mode_enabled
acl ddos_mode_enabled_override str("true"),map(/etc/haproxy/map/ddos_global.map) -m found

@ -10,13 +10,16 @@ a,a:visited{color:var(--text-color)}
body,html{height:100%%}
body{display:flex;flex-direction:column;background-color:var(--bg-color);color:var(--text-color);font-family:Helvetica,Arial,sans-serif;max-width:60em;margin:0 auto;padding: 0 20px}
code{background-color:#dfdfdf30;border-radius:4px;padding:0 3px;color:#ff6590}
.pt{padding-top:30vh;display:flex;align-items:center;word-break:break-all;justify-content: center;}
.pt{padding-top:30vh;display:flex;align-items:center;word-break:break-all;justify-content: center;flex-direction: column;}
img,h3{margin:0 0 5px 0;font-weight:normal}
footer{font-size:x-small;margin-top:auto;padding:10px;text-align:center;border-top:1px solid #80808040;padding:10px}
</style>
</head>
<body>
<h3 class="pt">Under maintenance. Please try again soon!</h3>
<h3 class="pt">
<img src="/.basedflare/pow-icon" width="64" height="64" alt=" ">
Under maintenance. Please try again soon!
</h3>
<footer>
<p>Node: <code>%[env(RAY_ID)]</code></p>
<p>Performance & security by <a href="https://basedflare.com" rel="noreferrer noopener" target="_blank">BasedFlare</a></p>

@ -0,0 +1,23 @@
{
"Maintenance Mode": "Modo Manutenção",
"Under maintenance. Please try again soon!": "Em manutenção. Tenta outra vez em breve!",
"Hold on...": "Aguarda...",
"Browser does not support Web Workers.": "Navegador não suporta Web Workers.",
"Browser does not support WebAssembly.": "Navegador não suporta WebAssembly.",
"Server rejected your submission.": "Servidor rejeitou o teu pedido.",
"Server encountered an error.": "Servidor encontrou um erro.",
"Failed to send request to server.": "Envio de pedido ao servidor falhou.",
"Working, ≈%ss remaining": "A trabalhar, ≈%ss para terminar",
"Waiting for captcha.": "À espera do captcha.",
"Submitting...": "A enviar...",
"Performance & security by BasedFlare": "Performance & segurança por <a href=\"https://basedflare.com\" rel=\"noreferrer noopener\" target=\"_blank\">BasedFlare</a>",
"Verifying your connection to %s": "A verificar a tua ligação a %s",
"This process is automatic, please wait a moment...": "Este processo é automático, por favor espera um momento...",
"Please solve the captcha to continue.": "Por favor resolve a captcha para continuar.",
"JavaScript is required on this page.": "Javascript é necessário nesta página.",
"No JavaScript?": "Sem Javascript?",
"Run this in a linux terminal (requires <code>argon2</code> package installed):": "Corre isto num terminal linux (requer package <code>argon2</code> instalada):",
"Run this in a linux terminal (requires <code>perl</code>):": "Corre isto num terminal linux (requer <code>perl</code>):",
"Paste the script output into the box and submit:": "Cola o output do script na caixa e envia:",
"submit": "enviar"
}

@ -175,15 +175,18 @@ function _M.view(applet)
ll["This process is automatic, please wait a moment..."]
)
local noscript_extra
local noscript_prompt
if pow_type == "argon2" then
noscript_extra = templates.noscript_extra_argon2
noscript_prompt = ll["Run this in a linux terminal (requires <code>argon2</code> package installed):"]
else
noscript_extra = templates.noscript_extra_sha256
noscript_prompt = ll["Run this in a linux terminal (requires <code>perl</code>):"]
end
noscript_extra_body = string.format(
noscript_extra,
ll["No JavaScript?"],
ll["Run this in a linux terminal (requires <code>perl</code>):"],
noscript_prompt,
user_key,
challenge_hash,
expiry,
@ -279,7 +282,7 @@ function _M.view(applet)
"set-cookie",
string.format(
--"_basedflare_pow=%s; Expires=Thu, 31-Dec-37 23:55:55 GMT; Path=/; Domain=.%s; SameSite=Strict; HttpOnly;%s",
"_basedflare_pow=%s; Expires=Thu, 31-Dec-37 23:55:55 GMT; Path=/; Domain=.%s; SameSite=Strict; %s",
"_basedflare_pow=%s; Expires=Thu, 31-Dec-37 23:55:55 GMT; Path=/; Domain=%s; SameSite=Strict; %s",
combined_cookie,
applet.headers['host'][0],
secure_cookie_flag
@ -342,7 +345,7 @@ function _M.view(applet)
applet:add_header(
"set-cookie",
string.format(
"_basedflare_captcha=%s; Expires=Thu, 31-Dec-37 23:55:55 GMT; Path=/; Domain=.%s; SameSite=Strict; HttpOnly;%s",
"_basedflare_captcha=%s; Expires=Thu, 31-Dec-37 23:55:55 GMT; Path=/; Domain=%s; SameSite=Strict; HttpOnly;%s",
combined_cookie,
applet.headers['host'][0],
secure_cookie_flag

@ -97,7 +97,7 @@ _M.noscript_extra_sha256 = [[
-- title with favicon and hostname
_M.site_name_section = [[
<h3 class="pt">
<img src="/favicon.ico" width="64" height="64" alt=" ">
<img src="/.basedflare/pow-icon" width="64" height="64" alt=" ">
%s
</h3>
]]

Loading…
Cancel
Save