squid_ui/templates/index.html
2025-06-24 11:06:02 +08:00

60 lines
2.1 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="header-actions">
<a href="{{ url_for('clients') }}" class="btn-primary">用户管理</a>
<a href="{{ url_for('settings') }}" class="btn-primary">系统设置</a>
<a href="{{ url_for('logout') }}" class="btn-danger">退出登录</a>
</div>
<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">{{ settings['proxy_address'] }}:{{ settings['proxy_port'] }}</p>
</div>
</div>
<div class="proxy-usage">
<h2>代理使用示例</h2>
<div class="usage-example">
<h3>Linux/Mac终端使用代理</h3>
<code>
export http_proxy="http://{{ settings['proxy_address'] }}:{{ settings['proxy_port'] }}"<br>
export https_proxy="http://{{ settings['proxy_address'] }}:{{ settings['proxy_port'] }}"
</code>
</div>
<div class="usage-example">
<h3>Windows CMD使用代理</h3>
<code>
set http_proxy=http://{{ settings['proxy_address'] }}:{{ settings['proxy_port'] }}<br>
set https_proxy=http://{{ settings['proxy_address'] }}:{{ settings['proxy_port'] }}
</code>
</div>
<div class="usage-example">
<h3>浏览器配置代理</h3>
<p>地址: {{ settings['proxy_address'] }}</p>
<p>端口: {{ settings['proxy_port'] }}</p>
</div>
</div>
<footer>
Squid代理管理系统 &copy; 2023
</footer>
</div>
</body>
</html>