chore: 初始提交 Fonu 1.0.2

- 公网反代:Nginx 状态卡片(版本 / 运行状态 / 配置校验 / 端口监听)
- 部署设置第一、二梯队(HTTPS 开关、安全头、限流、连接数、仅中国大陆 IP)
- 隧道检测兼容 frps v0.68 / v0.71(V2 与旧版端点)
- 恢复被清空的 internal/frp/store.go、internal/api/ddns_handler.go、web/src/views/DdnsView.vue
This commit is contained in:
2026-09-23 09:40:59 +08:00
commit 278f8267b7
333 changed files with 53562 additions and 0 deletions
+92
View File
@@ -0,0 +1,92 @@
import { createRouter, createWebHistory } from 'vue-router'
import { api } from '../api/client'
import AppLayout from '../layouts/AppLayout.vue'
import LoginView from '../views/LoginView.vue'
import ProxyView from '../views/ProxyView.vue'
import DashboardView from '../views/DashboardView.vue'
import DdnsView from '../views/DdnsView.vue'
import CertificatesView from '../views/CertificatesView.vue'
import LogsView from '../views/LogsView.vue'
import SettingsView from '../views/SettingsView.vue'
import FrpView from '../views/FrpView.vue'
import AgentView from '../views/AgentView.vue'
import ProxyRemoteView from '../views/ProxyRemoteView.vue'
const router = createRouter({
history: createWebHistory(),
routes: [
{ path: '/setup', redirect: '/login' },
{ path: '/login', name: 'login', component: LoginView, meta: { public: true } },
{
path: '/',
component: AppLayout,
meta: { requiresAuth: true },
children: [
{ path: '', redirect: '/dashboard' },
{
path: 'dashboard',
name: 'dashboard',
component: DashboardView,
meta: { title: '仪表盘', description: '查看 Fonu 运行状态与关键指标' },
},
{
path: 'ddns',
name: 'ddns',
component: DdnsView,
meta: { title: 'DDNS', description: '自动同步公网 IP 到 DNS 解析' },
},
{
path: 'certificates',
name: 'certificates',
component: CertificatesView,
meta: { title: '证书管理', description: '通过 ACME 自动申请和续签证书' },
},
{
path: 'proxies',
name: 'proxies',
component: ProxyView,
meta: { title: '反向代理', description: '管理通过域名访问的 NAS 服务' },
},
{
path: 'frp',
name: 'frp',
component: FrpView,
meta: { title: '内网穿透', description: '通过 FRP 将公网流量转发到 Fonu Nginx' },
},
{
path: 'frp-agent',
name: 'frp-agent',
component: AgentView,
meta: { title: '公网 Agent', description: '管理部署在公网 VPS 上的 fonu-agent 与 frps' },
},
{
path: 'public-proxy',
name: 'public-proxy',
component: ProxyRemoteView,
meta: { title: '公网反代', description: '管理 VPS 上 Nginx 反代的部署/移除与安全选项' },
},
{
path: 'logs',
name: 'logs',
component: LogsView,
meta: { title: '日志中心', description: '查看系统、访问与 Nginx 错误日志' },
},
{
path: 'settings',
name: 'settings',
component: SettingsView,
meta: { title: '系统设置', description: '配置系统参数与运行策略' },
},
],
},
],
})
router.beforeEach(async (to) => {
const status = await api.authStatus()
if (to.meta.requiresAuth && !status.authenticated) return { name: 'login' }
if (to.name === 'login' && status.authenticated) return { name: 'dashboard' }
return true
})
export default router