/home2/mshostin/vamino.online/1/index.html
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>اتصال VPN - دکمه اتصال گرد</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
color: white;
overflow: hidden;
}
.container {
text-align: center;
padding: 20px;
background: rgba(0, 0, 0, 0.3);
border-radius: 20px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
max-width: 90%;
width: 400px;
}
h1 {
margin-bottom: 20px;
font-size: 24px;
text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
.status {
margin-bottom: 30px;
font-size: 18px;
font-weight: 500;
height: 24px;
}
.connection-button {
width: 120px;
height: 120px;
border-radius: 50%;
background: linear-gradient(145deg, #ff416c, #ff4b2b);
display: flex;
justify-content: center;
align-items: center;
margin: 0 auto;
cursor: pointer;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.connection-button:hover {
transform: scale(1.05);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}
.connection-button:active {
transform: scale(0.95);
}
.button-text {
font-size: 16px;
font-weight: bold;
color: white;
z-index: 2;
}
.spinner {
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
border: 3px solid transparent;
border-top: 3px solid white;
animation: spin 1s linear infinite;
opacity: 0;
}
.connected .spinner {
opacity: 1;
}
.pulse {
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
background: rgba(255, 255, 255, 0.2);
animation: pulse 2s infinite;
opacity: 0;
}
.connected .pulse {
opacity: 1;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
@keyframes pulse {
0% { transform: scale(1); opacity: 0.7; }
70% { transform: scale(1.5); opacity: 0; }
100% { transform: scale(1.5); opacity: 0; }
}
.server-info {
margin-top: 30px;
background: rgba(255, 255, 255, 0.1);
padding: 15px;
border-radius: 10px;
font-size: 14px;
display: none;
}
.connected .server-info {
display: block;
animation: fadeIn 0.5s ease;
}
.server-info div {
margin: 5px 0;
}
.server-ip {
font-family: monospace;
background: rgba(0, 0, 0, 0.2);
padding: 5px 10px;
border-radius: 5px;
display: inline-block;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.instructions {
margin-top: 20px;
font-size: 14px;
color: rgba(255, 255, 255, 0.8);
line-height: 1.5;
}
.footer {
margin-top: 30px;
font-size: 12px;
color: rgba(255, 255, 255, 0.6);
}
</style>
</head>
<body>
<div class="container">
<h1>اتصال VPN</h1>
<div class="status" id="status">آماده برای اتصال</div>
<div class="connection-button" id="connectButton">
<div class="button-text" id="buttonText">اتصال</div>
<div class="spinner"></div>
<div class="pulse"></div>
</div>
<div class="server-info">
<div>اتصال برقرار شد</div>
<div>سرور: <span class="server-ip">192.168.1.105</span></div>
<div>زمان اتصال: <span id="connectionTime">0</span> ثانیه</div>
</div>
<div class="instructions">
برای اتصال/قطع اتصال روی دکمه گرد کلیک کنید
</div>
</div>
<script>
const connectButton = document.getElementById('connectButton');
const buttonText = document.getElementById('buttonText');
const status = document.getElementById('status');
const connectionTime = document.getElementById('connectionTime');
let isConnected = false;
let connectionStartTime = 0;
let timerInterval = null;
connectButton.addEventListener('click', function() {
if (isConnected) {
disconnect();
} else {
connect();
}
});
function connect() {
isConnected = true;
connectButton.classList.add('connected');
buttonText.textContent = 'قطع اتصال';
status.textContent = 'در حال اتصال...';
// شبیهسازی تأخیر اتصال
setTimeout(() => {
status.textContent = 'اتصال برقرار شد';
// شروع تایمر
connectionStartTime = Date.now();
timerInterval = setInterval(updateConnectionTime, 1000);
}, 2000);
}
function disconnect() {
isConnected = false;
connectButton.classList.remove('connected');
buttonText.textContent = 'اتصال';
status.textContent = 'آماده برای اتصال';
// پاک کردن تایمر
clearInterval(timerInterval);
connectionTime.textContent = '0';
}
function updateConnectionTime() {
const seconds = Math.floor((Date.now() - connectionStartTime) / 1000);
connectionTime.textContent = seconds;
}
</script>
</body>
</html>