mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 08:11:11 +08:00
为项目增加了一个后台页面, 用于显示IP代理的使用情况统计. 主要包括: - 新增 `backend` 目录, 包含 `index.html` 和 `script.js` 文件, 用于展示统计数据. - 在 `main.go` 中增加了 `setBackendRoute` 函数, 用于提供后台页面的路由. - 将后台页面路由设置为 `/admin`. 注意: 当前代码存在编译错误, 因为无法确定 `ipfilter.NewIPFilter` 的正确返回类型. 错误信息为 `undefined: ipfilter.IPFilter`. 提交此代码是为了让用户能够检查问题.
28 lines
851 B
HTML
28 lines
851 B
HTML
<!DOCTYPE html>
|
|
<html lang="zh">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>后台统计</title>
|
|
<link rel="stylesheet" href="/bootstrap.min.css">
|
|
</head>
|
|
<body>
|
|
<div class="container mt-5">
|
|
<h1>IP 代理使用情况统计</h1>
|
|
<table class="table table-striped table-bordered mt-4">
|
|
<thead>
|
|
<tr>
|
|
<th>IP 地址</th>
|
|
<th>调用次数</th>
|
|
<th>总流量 (bytes)</th>
|
|
<th>最后调用时间</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="stats-table-body">
|
|
<!-- 数据将由 script.js 动态填充 -->
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<script src="script.js"></script>
|
|
</body>
|
|
</html>
|