429 lines
11 KiB
Plaintext
429 lines
11 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>验证DDNSTO</title>
|
|
</head>
|
|
<style>
|
|
html {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
header {
|
|
width: 100%;
|
|
height: 35px;
|
|
background: #121432;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
header img {
|
|
width: 76px;
|
|
}
|
|
|
|
.body {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
text-align: center;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
|
|
|
|
.container {
|
|
flex: 0 0 100%;
|
|
max-width: 100%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
text-align: center;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.top {
|
|
flex: 0 0 100%;
|
|
max-width: 100%;
|
|
margin-top: 24px;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
text-align: center;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.verify_tit {
|
|
font-size: 24px;
|
|
font-family: PingFangSC-Medium, PingFang SC;
|
|
font-weight: 500;
|
|
color: rgba(0, 0, 0, 0.83);
|
|
line-height: 22px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.verify_domain {
|
|
font-size: 18px;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: rgba(0, 0, 0, 0.83);
|
|
line-height: 17px;
|
|
margin-top: 24px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.verify_id {
|
|
font-size: 18px;
|
|
font-family: PingFangSC-Medium, PingFang SC;
|
|
font-weight: 500;
|
|
color: rgba(0, 0, 0, 0.83);
|
|
line-height: 36px;
|
|
margin-bottom: 16px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.id {
|
|
flex: 0 0 100%;
|
|
}
|
|
|
|
.id_tit {
|
|
font-size: 18px;
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
font-weight: 400;
|
|
color: rgba(0, 0, 0, 0.83);
|
|
line-height: 16px;
|
|
}
|
|
|
|
.id_info {
|
|
font-size: 18px;
|
|
font-family: PingFangSC-Medium, PingFang SC;
|
|
font-weight: 500;
|
|
color: rgba(0, 0, 0, 0.83);
|
|
line-height: 34px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.content {
|
|
flex: 0 0 100%;
|
|
font-size: 24px;
|
|
font-family: PingFangSC-Medium, PingFang SC;
|
|
font-weight: 500;
|
|
color: rgba(0, 0, 0, 0.83);
|
|
line-height: 34px;
|
|
margin-top: 24px;
|
|
margin-bottom: 100px;
|
|
}
|
|
|
|
.buttons {
|
|
width: 220px;
|
|
height: 46px;
|
|
background: #0060FF;
|
|
border-radius: 6px;
|
|
font-family: PingFangSC-Medium, PingFang SC;
|
|
font-weight: 500;
|
|
color: #FFFFFF;
|
|
line-height: 47px;
|
|
font-size: 16px;
|
|
border: none;
|
|
max-width: 100%;
|
|
display: block;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.bottom {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
align-content: center;
|
|
flex-wrap: wrap;
|
|
padding: 0 10px;
|
|
}
|
|
|
|
.bottom .bottom_img {
|
|
flex: 0 0 100%;
|
|
margin-top: 16px;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.bottom .bottom_img img {
|
|
max-width: 100%;
|
|
}
|
|
|
|
.error-msg {
|
|
width: 100%;
|
|
margin: 10px 0;
|
|
color: #f00;
|
|
}
|
|
</style>
|
|
<style>
|
|
@media screen and (max-width: 828px) {
|
|
.top {
|
|
margin-top: 16px;
|
|
|
|
}
|
|
|
|
.verify_tit {
|
|
font-size: 16px;
|
|
line-height: 22px;
|
|
}
|
|
|
|
.verify_domain {
|
|
font-size: 12px;
|
|
line-height: 17px;
|
|
margin-top: 16px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.verify_id {
|
|
font-size: 12px;
|
|
line-height: 17px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.id_tit {
|
|
font-size: 12px;
|
|
line-height: 16px;
|
|
}
|
|
|
|
.id_info {
|
|
font-size: 12px;
|
|
line-height: 16px;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.content {
|
|
flex: 0 0 100%;
|
|
font-size: 16px;
|
|
line-height: 22px;
|
|
margin: 47px 0;
|
|
}
|
|
|
|
.buttons {
|
|
width: 260px;
|
|
height: 47px;
|
|
border-radius: 47px;
|
|
line-height: 47px;
|
|
font-size: 16px;
|
|
border: none;
|
|
max-width: 100%;
|
|
display: block;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.bottom .bottom_img img {
|
|
max-width: 100%;
|
|
}
|
|
|
|
}
|
|
</style>
|
|
|
|
<body>
|
|
<header>
|
|
</header>
|
|
<div class="body">
|
|
<div class="container">
|
|
<div class="top">
|
|
<div class="verify">
|
|
<div class="verify_tit">请先通过身份验证</div>
|
|
<div class="verify_domain">您正在访问的域名是</div>
|
|
<div class="verify_id"></div>
|
|
</div>
|
|
<div class="id">
|
|
<div class="id_tit">当前网络IP</div>
|
|
<div class="id_info">183.165.112.111</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<span class="clock">5</span>秒后将自动跳转至验证页面,<br />
|
|
如果未正常跳转请点击前往验证
|
|
</div>
|
|
<div class="error-msg">
|
|
</div>
|
|
<a class="buttons" href="https://www.kooldns.cn/app/#/check?url=https%3a%2f%2fyeyinck.kooldns.cn%2fyeyin%2f0821%2fraw%2fbranch%2fmain%2fXYQTVBox%2flib%2fC174oIJGsgrK.jar" value="https://yeyinck.kooldns.cn/yeyin/0821/raw/branch/main/XYQTVBox/lib/C174oIJGsgrK.jar">前往验证</a>
|
|
</div>
|
|
|
|
|
|
<div class="bottom">
|
|
<a href="https://www.ddnsto.com/advertisement/redirect?location=needauth2" class="bottom_img"
|
|
target="_blank">
|
|
<img src="https://www.ddnsto.com/image/easepi_ad.png" width="382px">
|
|
</a>
|
|
<a href="https://www.ddnsto.com/advertisement/redirect?location=needauth1" class="bottom_img"
|
|
target="_blank">
|
|
<img src="https://www.ddnsto.com/image/linkease_app_auth.png" width="382px">
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
<script>
|
|
var count = 0;
|
|
function noop() { }
|
|
var _Ajax = {
|
|
get: function (url, fn) {
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
xhr.open('GET', url, true);
|
|
xhr.onreadystatechange = function () {
|
|
|
|
if (xhr.readyState == 4 && xhr.status == 200 || xhr.status == 304) {
|
|
|
|
fn.success(this, xhr.responseText);
|
|
}
|
|
};
|
|
xhr.send();
|
|
},
|
|
|
|
post: function (url, data, fn) {
|
|
var xhr = new XMLHttpRequest();
|
|
xhr.open("POST", url, true);
|
|
|
|
xhr.setRequestHeader("Content-Type", "application/json");
|
|
xhr.onreadystatechange = function () {
|
|
if (xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 304)) {
|
|
fn.success(this, xhr.responseText);
|
|
}
|
|
};
|
|
xhr.send(data);
|
|
},
|
|
jsonp(url, opts, fn) {
|
|
if ('function' == typeof opts) {
|
|
fn = opts;
|
|
opts = {};
|
|
}
|
|
if (!opts) opts = {};
|
|
|
|
var prefix = opts.prefix || '__jp';
|
|
|
|
|
|
|
|
var id = opts.name || (prefix + (count++));
|
|
|
|
var param = opts.param || 'callback';
|
|
var timeout = null != opts.timeout ? opts.timeout : 60000;
|
|
var enc = encodeURIComponent;
|
|
var target = document.getElementsByTagName('script')[0] || document.head;
|
|
var script;
|
|
var timer;
|
|
|
|
|
|
if (timeout) {
|
|
timer = setTimeout(function () {
|
|
cleanup();
|
|
if (fn) fn(new Error('Timeout'));
|
|
}, timeout);
|
|
}
|
|
|
|
function cleanup() {
|
|
if (script.parentNode) script.parentNode.removeChild(script);
|
|
window[id] = noop;
|
|
if (timer) clearTimeout(timer);
|
|
}
|
|
|
|
function cancel() {
|
|
if (window[id]) {
|
|
cleanup();
|
|
}
|
|
}
|
|
|
|
window[id] = function (data) {
|
|
cleanup();
|
|
if (fn) fn(null, data);
|
|
};
|
|
|
|
|
|
url += (~url.indexOf('?') ? '&' : '?') + param + '=' + enc(id);
|
|
url = url.replace('?&', '?');
|
|
|
|
|
|
|
|
script = document.createElement('script');
|
|
script.src = url;
|
|
target.parentNode.insertBefore(script, target);
|
|
|
|
return cancel;
|
|
}
|
|
}
|
|
</script>
|
|
<script>
|
|
function showError(msg) {
|
|
document.querySelector(".error-msg").innerText = msg
|
|
}
|
|
function getMainIP() {
|
|
var host = location.host
|
|
var hosts = host.split(".")
|
|
if (hosts.length == 3) {
|
|
host = hosts.splice(1).join(".")
|
|
}
|
|
|
|
host = host.replace(/:\d+$/, '')
|
|
|
|
var url = "https://www." + host + "/api/main-ip/"
|
|
_Ajax.jsonp(url, {}, function (err, data) {
|
|
if (err) {
|
|
showError(err)
|
|
return
|
|
}
|
|
if (data) {
|
|
if (data.main_ip) {
|
|
checkIP(data.main_ip)
|
|
return
|
|
}
|
|
}
|
|
document.querySelector(".error-msg").innerText = "验证错误"
|
|
});
|
|
}
|
|
function checkIP(main_ip) {
|
|
var url = "/__checkCustomHostIP"
|
|
_Ajax.post(url, JSON.stringify({
|
|
wwwHostIP: main_ip
|
|
}), {
|
|
success(res, data) {
|
|
var result = JSON.parse(data)
|
|
if (result) {
|
|
if (result.Status == 0) {
|
|
location.reload()
|
|
return
|
|
}
|
|
}
|
|
}
|
|
})
|
|
}
|
|
|
|
document.querySelector("div.verify_id").textContent = window.location.origin
|
|
|
|
var t = 5;
|
|
var time = document.getElementsByClassName("clock")[0];
|
|
var interval = setInterval(function () {
|
|
t--;
|
|
time.innerHTML = t;
|
|
if (t <= 0) {
|
|
openURL()
|
|
clearInterval(interval);
|
|
return
|
|
}
|
|
}, 1000);
|
|
|
|
function openURL() {
|
|
window.location.href = document.querySelector("a.buttons").getAttribute('href');
|
|
}
|
|
getMainIP()
|
|
|
|
</script>
|
|
|
|
</html>
|