From b570c5d0aef0b6ebf41075f02a2acc425287b506 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 4 Jan 2026 02:14:47 +0000 Subject: [PATCH 1/6] feat: Integrate cf_mock.html design into auth.js - Replace original captcha template with cf_mock.html layout - Insert captcha card between time and status panel - Implement realtime JST clock - Add dynamic Hostname, Ray ID, and IP reveal using EO headers - Ensure compact layout with Tailwind CSS - Preserve captcha functionality (fetch, verify, render) --- gateway/edge-functions/auth.js | 463 +++++++++++++++++++++------------ 1 file changed, 291 insertions(+), 172 deletions(-) diff --git a/gateway/edge-functions/auth.js b/gateway/edge-functions/auth.js index 326f40f..6d0ce64 100644 --- a/gateway/edge-functions/auth.js +++ b/gateway/edge-functions/auth.js @@ -14,217 +14,336 @@ const CONFIG = { export async function onRequest({ request }) { const url = new URL(request.url); const hostname = url.searchParams.get('hostname') || url.hostname; - const html = getCaptchaPage(hostname); + const clientIP = request.headers.get("EO-Client-IP") || "1.1.1.1"; + const zoneID = request.headers.get("EO-Zone-ID") || "UNKNOWN"; + + const html = getCaptchaPage(hostname, clientIP, zoneID); return new Response(html, { headers: { "Content-Type": "text/html; charset=utf-8" } }); } -function getCaptchaPage(hostname) { +function getCaptchaPage(hostname, clientIP, zoneID) { return ` - + + + + - - - ${CONFIG.title} - - - - - - +200: LOOP Captcha required + + + + + + + + + + + - -
-
-
${CONFIG.icon}
-

${CONFIG.title}

-

- Please complete the security check to access
- ${hostname} -

-
+ +
+
+
+

+ LOOP Captcha required + Error code 200 +

+
+ Visit www.s3xyseia.xyz for guest guidelines. +
+
Loading time...
+
-
- -
-
-
-
- - - + +
+
+
${CONFIG.icon}
+

${CONFIG.title}

+

+ Please complete the security check to access
+ ${hostname} +

+
+ +
+ +
+
+
+
+ + + +
+ I'm not a robot +
+
+ + + + reCAPTCHA
- I'm not a robot
-
- - - - reCAPTCHA + +
+
Loading...
+
-
-
-
Loading...
- -
+
+ Answer: + +
-
- Answer: - +
+ Hint:... +
+ +
-
- Hint:... -
- - +
+
+

Protected by EdgeOne Functions

+
+
- +
+
+
+
+
+ + +
+ You +

Browser

+ Mamba out +
+
+
+ + +
+ Tencent Edgeone +

LOOP Cloud

+ Request Intercpted +
+
+
+ + +
+ ${hostname} +

Host

+ Working +
+
+
-
-

Protected by EdgeOne Functions

+ +
+
+
+

What happened?

+ Robots/Low-sanity commonalty should stay out. +
+
+

What can I do?

+ Do the captcha to prove you are human (and welcome or not). +
+
+ +
+
+ + } + `; } From 8f907f43859677cb0e46eb04357eb4d9cc4694b3 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 4 Jan 2026 02:21:42 +0000 Subject: [PATCH 2/6] feat: Revamp captcha UI with horizontal layout and JST clock - Replaced vertical captcha card with a compact 2-column horizontal design. - Fixed Status Panel layout to be strictly horizontal (flex-row) on desktop. - Implemented realtime JST clock updates. - Integrated dynamic IP Reveal and Ray ID using EdgeOne headers. - Merged `cf_mock.html` styles with Tailwind for responsiveness. --- gateway/edge-functions/auth.js | 227 +++++++++++++++++---------------- 1 file changed, 116 insertions(+), 111 deletions(-) diff --git a/gateway/edge-functions/auth.js b/gateway/edge-functions/auth.js index 6d0ce64..2b04049 100644 --- a/gateway/edge-functions/auth.js +++ b/gateway/edge-functions/auth.js @@ -43,145 +43,160 @@ function getCaptchaPage(hostname, clientIP, zoneID) { - +
-
-

+
+

LOOP Captcha required Error code 200

- Visit www.s3xyseia.xyz for guest guidelines. + Visit www.s3xyseia.xyz for guest guidelines.
-
Loading time...
+
Loading time...
- -
-
-
${CONFIG.icon}
-

${CONFIG.title}

-

- Please complete the security check to access
- ${hostname} -

-
+ +
+
+ +
+
+ Challenge + +
+
Loading puzzle...
+
-
- -
-
+ +
+ +
-
+
- I'm not a robot + I'm not a robot
- - - - reCAPTCHA + + reCAPTCHA
-
-
Loading...
- -
- -
- Answer: - -
- -
- Hint:... + +
+
+ + +
+
+ +
Hint: ...
+
-
- -
-
-

Protected by EdgeOne Functions

+
+

Protected by EdgeOne Functions • ${hostname}

-
-
-
-
-
+
+
+
+ +
+
- +
- You -

Browser

- Mamba out +
+ You +

Browser

+ Mamba out +
-
-
- - -
- Tencent Edgeone -

LOOP Cloud

- Request Intercpted + +
+
+ + +
+
+ Tencent Edgeone +

LOOP Cloud

+ Request Intercpted +
-
-
- - -
- ${hostname} -

Host

- Working + +
+
+ + +
+
+ ${hostname} +

Host

+ Working +
-
-
-
-

What happened?

- Robots/Low-sanity commonalty should stay out. +
+
+
+

What happened?

+

Robots/Low-sanity commonalty should stay out.

-
-

What can I do?

- Do the captcha to prove you are human (and welcome or not). +
+

What can I do?

+

Do the captcha to prove you are human (and welcome or not).

-
- -
-
+ +
+
-
+

LOOP Captcha required Error code 200 @@ -65,16 +65,16 @@ function getCaptchaPage(hostname, clientIP, zoneID) {
Visit www.s3xyseia.xyz for guest guidelines.
-
Loading time...
+
Loading time...

- -
+ +
-
+
Challenge
-
+
@@ -123,11 +123,11 @@ function getCaptchaPage(hostname, clientIP, zoneID) {
-
+
-
+
@@ -143,9 +143,11 @@ function getCaptchaPage(hostname, clientIP, zoneID) {

Browser

Mamba out
+ +
-
+
@@ -163,7 +165,7 @@ function getCaptchaPage(hostname, clientIP, zoneID) {
-
+
@@ -186,21 +188,21 @@ function getCaptchaPage(hostname, clientIP, zoneID) {
-
+
-

What happened?

+

What happened?

Robots/Low-sanity commonalty should stay out.

-

What can I do?

+

What can I do?

Do the captcha to prove you are human (and welcome or not).

- -
+ +

Ray ID: ${zoneID}