squid_ui/templates/index.html
2025-06-24 12:21:20 +08:00

53 lines
1.9 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Squid代理用户管理系统</title>
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
<div class="container">
<h1>Squid代理用户管理系统</h1>
<div class="dashboard">
<div class="dashboard-card">
<h3>用户数量</h3>
<p class="stat">{{ user_count }}</p>
</div>
<div class="dashboard-card">
<h3>代理地址</h3>
<p class="stat">{{ proxy_address }}:{{ proxy_port }}</p>
</div>
</div>
<div class="proxy-info">
<h2>代理使用说明</h2>
<p>1. 在浏览器或系统设置中配置代理服务器</p>
<p>2. 地址: <code>{{ proxy_address }}</code> 端口: <code>{{ proxy_port }}</code></p>
<p>3. 使用格式: <code>http://用户名:密码@{{ proxy_address }}:{{ proxy_port }}</code></p>
<p>4. 或者在PAC文件中配置: <code>PROXY {{ proxy_address }}:{{ proxy_port }}</code></p>
</div>
<div class="navigation">
<a href="{{ url_for('clients') }}" class="btn-primary">用户管理</a>
<a href="{{ url_for('settings') }}" class="btn-primary">系统设置</a>
<button id="logoutBtn" class="btn-danger">退出系统</button>
</div>
<footer>
由 Flask 重构 - 基于原项目 <a href="https://github.com/ckazi" target="_blank">ckazi</a>
</footer>
</div>
<script>
document.getElementById('logoutBtn').addEventListener('click', function() {
if(confirm('确定要退出系统吗?')) {
fetch('/logout').then(() => {
window.location.href = '/';
});
}
});
</script>
</body>
</html>