feat: 升级 Openresty 版本到 1.21.4.3-3-3 (#1639)

This commit is contained in:
zhengkunwang
2024-06-25 10:08:35 +08:00
committed by GitHub
parent 920511525b
commit 8c7b636950
54 changed files with 27 additions and 10 deletions
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>5s</title>
<style>
#loadingContainer { position: absolute; top: 50%%; left: 50%%; transform: translate(-50%%, -50%%); display: flex; align-items: center; justify-content: center; flex-direction: column; background: #e8e8e8; width: 300px; height: 100px; border: 2px solid #e8e8e8; }
#loadingText { font-size: 18px; margin-top: 10px; }
#loadingSuccess { display: none; font-size: 24px; color: #7ac23c; margin-top: 10px; }
.loadingSpinner { border: 4px solid rgba(0, 0, 0, 0.1); border-top: 4px solid #7ac23c; border-radius: 50%%; width: 20px; height: 20px; animation: spin 1s linear infinite; margin-top: 10px; }
@keyframes spin { 0%% { transform: rotate(0deg); } 100%% { transform: rotate(360deg); } }
</style>
</head>
<body>
<div id="loadingContainer">
<div id="loadingText">正在验证...</div>
<div id="loadingSuccess">验证成功</div>
<div class="loadingSpinner"></div>
</div>
<script type="text/javascript" src="/5s_check_%s-%s-%s-.js"></script>
</body>
</html>
@@ -0,0 +1,24 @@
window.onload = function () {
setTimeout(function () {
showSuccess();
verifySucc();
}, 5000);
function showSuccess() {
document.getElementById("loadingText").style.display = "none";
document.getElementById("loadingSuccess").style.display = "block";
document.querySelector(".loadingSpinner").style.display = "none";
}
function verifySucc() {
let xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
window.location.reload();
}
};
const requestUrl = "%s-%s-%s-%s-%s-";
xhr.open("GET", requestUrl, true);
xhr.send();
}
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<title>网站防火墙</title>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: '微软雅黑', sans-serif; background-color: #282c34; color: #fff; text-align: center; padding: 50px; }
.main { max-width: 600px; margin: 10% auto; background-color: #3a3a3a; border-radius: 8px; padding: 20px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); }
.title { background: #ff4d4d; color: #fff; font-size: 24px; height: 60px; line-height: 60px; border-radius: 8px 8px 0 0; }
.content { background-color: #444; border: 1px solid #666; border-radius: 0 0 8px 8px; padding: 20px; margin-top: -1px; }
.t1 { color: #ff9999; font-weight: bold; margin: 0 0 20px; }
.footer { margin-top: 10px; font-size: 12px; color: #999; }
</style>
</head>
<body>
<div class="main">
<div class="title">网站防火墙</div>
<div class="content">
<p class="t1">您的请求不合法,已被拒绝</p>
</div>
<div class="footer">此网站防护来自 1Panel</div>
</div>
</body>
</html>
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>滑动认证</title>
<style>
#dragContainer {position:absolute;top:50%%;left:50%%;transform:translate(-50%%, -50%%);display:inline-block;background:#e8e8e8;width:300px;height:33px;border:2px solid #e8e8e8;}
#dragBg {position:absolute;background-color:#7ac23c;height:100%%;}
#dragText {position:absolute;width:100%%;height:100%%;text-align:center;line-height:33px;user-select:none;-webkit-user-select:none;}
#dragHandler {position:absolute;width:40px;height:100%%;cursor:pointer;box-sizing:border-box;overflow:hidden;}
#dragHandler.dragHandlerBg {background-color:#c0c0c0;}
#dragHandler.dragHandlerBg::before {content:'»';font-size:24px;position:absolute;top:50%%;left:50%%;transform:translate(-50%%, -50%%);color:#7ac23c;}
.dragHandlerOkBg {position:absolute;border-radius:50%%;background-color:#7ac23c;display:flex;justify-content:center;align-items:center;}
.dragHandlerOkBg::before {content:'\2713';font-size:16px;color:white;}
</style>
</head>
<body>
<div>
<div id="dragContainer">
<div id="dragBg"></div>
<div id="dragText"></div>
<div id="dragHandler" class="dragHandlerBg"></div>
</div>
</div>
<script type="text/javascript" src="/slide_check_%s-%s-%s-.js"></script>
</body>
</html>
@@ -0,0 +1,82 @@
window.onload = function () {
(function () {
const dragContainer = document.getElementById("dragContainer");
const dragBg = document.getElementById("dragBg");
const dragText = document.getElementById("dragText");
const dragHandler = document.getElementById("dragHandler");
const maxHandleOffset = dragContainer.clientWidth - dragHandler.clientWidth;
let isVertifySucc = false;
initDrag();
function initDrag() {
dragText.textContent = "拖动滑块验证";
dragHandler.addEventListener("mousedown", onDragStart);
dragHandler.addEventListener("touchstart", onDragStart);
}
function onDragStart(a) {
a.preventDefault();
if (a.type === "mousedown" || (a.type === "touchstart" && a.touches.length === 1)) {
document.addEventListener("mousemove", onDragMove);
document.addEventListener("touchmove", onDragMove);
document.addEventListener("mouseup", onDragEnd);
document.addEventListener("touchend", onDragEnd);
}
}
function onDragMove(a) {
let clientX;
if (a.type === "mousemove") {
clientX = a.clientX;
} else if (a.type === "touchmove" && a.touches.length === 1) {
clientX = a.touches[0].clientX;
}
let containerOffsetX = clientX - dragContainer.getBoundingClientRect().left;
let left = containerOffsetX - dragHandler.clientWidth / 2;
if (left < 0) {
left = 0;
} else if (left > maxHandleOffset) {
left = maxHandleOffset;
}
dragHandler.style.left = left + "px";
dragBg.style.width = dragHandler.style.left;
}
function onDragEnd() {
document.removeEventListener("mousemove", onDragMove);
document.removeEventListener("touchmove", onDragMove);
document.removeEventListener("mouseup", onDragEnd);
document.removeEventListener("touchend", onDragEnd);
if (!isVertifySucc) {
let left = dragHandler.offsetLeft;
if (left >= maxHandleOffset) {
verifySucc();
} else {
dragHandler.style.left = "0px";
dragBg.style.width = "0px";
}
}
}
function verifySucc() {
isVertifySucc = true;
dragText.textContent = "验证通过";
dragText.style.color = "white";
dragHandler.setAttribute("class", "dragHandlerOkBg");
dragHandler.removeEventListener("mousedown", onDragStart);
dragHandler.removeEventListener("touchstart", onDragStart);
let xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
window.location.reload();
}
};
const requestUrl = "%s-%s-%s-%s-%s-";
xhr.open("GET", requestUrl, true);
xhr.send();
}
})();
};
File diff suppressed because one or more lines are too long