26 Commits
Author SHA1 Message Date
刘嘉伟 3cc8d9406d 🔖 v0.1.4 2026-03-25 11:04:38 +08:00
刘嘉伟 edc2a0416d 🔊 UA 2026-03-25 11:02:52 +08:00
刘嘉伟 69afa49d1c 🐛 Fix data type error. 2026-03-25 09:43:38 +08:00
刘嘉伟 bb18a9e3d1 ⬆️ Upgrade dependencies. 2026-03-24 17:59:05 +08:00
刘嘉伟 841fef390b ⬆️ Upgrade dependencies. 2026-03-24 15:52:28 +08:00
刘嘉伟 96f3db329e 💚 Fix CI. 2026-03-24 15:28:10 +08:00
刘嘉伟 dcc2854b7d ✨ Frps probe. 2026-03-24 15:25:09 +08:00
刘嘉伟 fd9d8b3ee7 🐛 Fix list issues. 2026-03-23 17:14:54 +08:00
刘嘉伟 d29e37101c ⚡️ Performance optimization. 2026-03-23 15:52:27 +08:00
刘嘉伟 c119ae3d2f ✨ New log page. 2026-03-20 18:00:51 +08:00
刘嘉伟 99f3247bbc ♻️ Delay monitoring code refactoring. 2026-03-20 17:48:41 +08:00
刘嘉伟 1ddaf89492 ♻️ Delay monitoring code refactoring. 2026-03-20 17:39:49 +08:00
刘嘉伟 71c1f7633d ♻️ Delay monitoring Code refactoring. 2026-03-20 17:39:29 +08:00
刘嘉伟 893e5bc670 💄 Fix font color in dark mode. 2026-03-20 17:26:01 +08:00
刘嘉伟 560e8e71e3 🚩 Optimize custom domain UI. 2026-03-20 16:47:57 +08:00
刘嘉伟 9f8aa570af ✨ Added display of updated version content. 2026-03-17 17:36:47 +08:00
刘嘉伟 6dc2c9d7b5 💄 Update Logo. 2026-03-17 17:28:43 +08:00
刘嘉伟 c684788e72 Merge remote-tracking branch 'github/main'
# Conflicts:
#	wrangler.jsonc
2026-03-17 11:45:16 +08:00
刘嘉伟 d8b8a20552 💚 Update Document Url. 2026-03-17 11:44:21 +08:00
刘嘉伟 a0f47c72aa 💚 Fix cloudflare page not fount page. 2026-03-17 11:22:22 +08:00
刘嘉伟 5f8ec287be 👷 Add cloudflare 2026-03-17 11:05:56 +08:00
刘嘉伟 c4315676ef 📝 Fix Doc Build. 2026-03-17 10:10:14 +08:00
刘嘉伟 9037c7fe05 📝 Doc 2026-03-17 09:58:24 +08:00
刘嘉伟 50e82a58a1 📝 doc 2026-03-17 09:57:47 +08:00
刘嘉伟 ac6f2e88ce 📝 Update milestones 2026-03-17 09:36:26 +08:00
刘嘉伟 2d78f1f533 📝 start history 2026-03-17 09:35:47 +08:00
82 changed files with 5694 additions and 534 deletions

No files matched your search

+5 -3
View File
@@ -28,9 +28,9 @@
<br />
Manage all your clients, proxies, and connections from one place. No terminal. No config editing.
<br /><br />
<a href="https://frpchub.jwinks.com/en/guide/getting-started.html"><strong>🚀 Quick Start</strong></a>
<a href="https://podux.io/en/guide/getting-started.html"><strong>🚀 Quick Start</strong></a>
&nbsp;&nbsp;·&nbsp;&nbsp;
<a href="https://frpchub.jwinks.com/"><strong>📖 Documentation</strong></a>
<a href="https://podux.io/"><strong>📖 Documentation</strong></a>
&nbsp;&nbsp;·&nbsp;&nbsp;
<a href="https://github.com/luckjiawei/podux/issues">🐛 Report Bug</a>
&nbsp;&nbsp;·&nbsp;&nbsp;
@@ -60,10 +60,12 @@
- 2026-03-03: Released v0.1.0
- 2026-03-12: Released v0.1.1
- 2026-03-12: Released v0.1.2
- 2026-03-16: Released v0.1.3
- 2026-03-25: Released v0.1.4
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=luckjiawei/podux&type=Date)](https://www.star-history.com/#luckjiawei/frpc-desktop&Date)
[![Star History Chart](https://api.star-history.com/svg?repos=luckjiawei/podux&type=Date)](https://www.star-history.com/#luckjiawei/podux&Date)
<!-- MARKDOWN LINKS & IMAGES -->
+5 -3
View File
@@ -28,9 +28,9 @@
<br />
在一个地方集中管理您所有的客户端、代理和连接。告别终端。无需再手动编辑配置文件。
<br /><br />
<a href="https://frpchub.jwinks.com/guide/getting-started.html"><strong>🚀 快速开始</strong></a>
<a href="https://podux.io/guide/getting-started.html"><strong>🚀 快速开始</strong></a>
&nbsp;&nbsp;·&nbsp;&nbsp;
<a href="https://frpchub.jwinks.com/"><strong>📖 官方文档</strong></a>
<a href="https://podux.io/"><strong>📖 官方文档</strong></a>
&nbsp;&nbsp;·&nbsp;&nbsp;
<a href="https://github.com/luckjiawei/podux/issues">🐛 提交 Bug</a>
&nbsp;&nbsp;·&nbsp;&nbsp;
@@ -60,10 +60,12 @@
- 2026-03-03: 发布 v0.1.0
- 2026-03-12: 发布 v0.1.1
- 2026-03-14: 发布 v0.1.2
- 2026-03-16: 发布 v0.1.3
- 2026-03-25: 发布 v0.1.4
## Star 历史
[![Star History Chart](https://api.star-history.com/svg?repos=luckjiawei/podux&type=Date)](https://www.star-history.com/#luckjiawei/frpc-desktop&Date)
[![Star History Chart](https://api.star-history.com/svg?repos=luckjiawei/podux&type=Date)](https://www.star-history.com/#luckjiawei/podux&Date)
<!-- MARKDOWN LINKS & IMAGES -->
+25
View File
@@ -0,0 +1,25 @@
# Dependencies
node_modules/
# Build output
dist/
.vitepress/dist/
.vitepress/cache/
# Local env files
.env
.env.local
.env.*.local
# Editor directories and files
.vscode/
.idea/
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# OS files
.DS_Store
Thumbs.db
+130
View File
@@ -0,0 +1,130 @@
import { defineConfig } from 'vitepress'
// https://vitepress.dev/reference/site-config
export default defineConfig({
// base: '/podux-doc/',
title: "Podux",
description: "现代化的 Frpc 管理平台 - 基于 PocketBase 和 React 构建的强大内网穿透管理系统",
head: [
['link', { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }],
['script', { defer: '', src: 'https://umami.jwinks.com/script.js', 'data-website-id': '8af0f36e-650c-45b5-a17e-e104b918f63f' }]
],
metaChunk: true,
locales: {
root: {
label: '简体中文',
lang: 'zh-CN',
themeConfig: {
nav: [
{ text: '首页', link: '/' },
{ text: '指南', link: '/guide/what-is-podux' },
],
sidebar: [
{
text: '指南',
items: [
{ text: '什么是 Podux?', link: '/guide/what-is-podux' },
{ text: '界面预览', link: '/guide/screenshots' },
{ text: '快速开始', link: '/guide/getting-started' },
]
},
{
text: '安装部署',
items: [
{
text: '安装',
items: [
{ text: '二进制', link: '/deploy/install/binary' },
{ text: 'Docker', link: '/deploy/install/docker' },
]
},
{
text: '升级',
items: [
{ text: '二进制', link: '/deploy/upgrade/binary' },
{ text: 'Docker', link: '/deploy/upgrade/docker' },
]
}
]
},
{
text: '故障排除',
items: [
{ text: '常见问题', link: '/troubleshoot/faq' },
]
}
],
footer: {
message: '基于 MIT 协议开源',
copyright: 'Copyright © 2026-present Podux'
},
}
},
en: {
label: 'English',
lang: 'en-US',
description: "Modern Frpc Management Platform",
themeConfig: {
nav: [
{ text: 'Home', link: '/en/' },
{ text: 'Guide', link: '/en/guide/what-is-podux' }
],
sidebar: [
{
text: 'Guide',
items: [
{ text: 'What is Podux?', link: '/en/guide/what-is-podux' },
{ text: 'Screenshots', link: '/en/guide/screenshots' },
{ text: 'Getting Started', link: '/en/guide/getting-started' }
]
},
{
text: 'Deployment',
items: [
{
text: 'Install',
items: [
{ text: 'Binary', link: '/en/deploy/install/binary' },
{ text: 'Docker', link: '/en/deploy/install/docker' }
]
},
{
text: 'Upgrade',
items: [
{ text: 'Binary', link: '/en/deploy/upgrade/binary' },
{ text: 'Docker', link: '/en/deploy/upgrade/docker' }
]
}
]
},
{
text: 'Troubleshooting',
items: [
{ text: 'FAQ', link: '/en/troubleshoot/faq' }
]
}
],
footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2026-present Podux'
},
}
}
},
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
logo: { src: '/logo.svg', width: 24, height: 24 },
socialLinks: [
{ icon: 'github', link: 'https://github.com/luckjiawei/podux' }
],
search: {
provider: 'local'
}
}
})
@@ -0,0 +1,66 @@
<template>
<div class="aside-ad">
<a href="https://www.rainyun.com/s=ljw_?podux" target="_blank" rel="noopener noreferrer">
<div class="aside-ad-inner">
<div class="aside-ad-badge">赞助商</div>
<div class="aside-ad-content">
<div class="aside-ad-title">☁️ 雨云</div>
<div class="aside-ad-desc">价格实惠的国内云服务器,轻松部署 frps 服务</div>
<div class="aside-ad-cta">立即查看 →</div>
</div>
</div>
</a>
</div>
</template>
<style scoped>
.aside-ad {
margin-top: 24px;
}
.aside-ad a {
text-decoration: none;
}
.aside-ad-inner {
position: relative;
border: 1px solid var(--vp-c-brand-1);
border-radius: 8px;
padding: 12px 14px;
background: var(--vp-c-bg-soft);
transition: background 0.2s, border-color 0.2s;
}
.aside-ad-inner:hover {
background: var(--vp-c-brand-soft);
border-color: var(--vp-c-brand-2);
}
.aside-ad-badge {
font-size: 10px;
color: var(--vp-c-text-3);
margin-bottom: 6px;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.aside-ad-title {
font-size: 14px;
font-weight: 600;
color: var(--vp-c-text-1);
margin-bottom: 4px;
}
.aside-ad-desc {
font-size: 12px;
color: var(--vp-c-text-2);
line-height: 1.5;
margin-bottom: 8px;
}
.aside-ad-cta {
font-size: 12px;
font-weight: 500;
color: var(--vp-c-brand-1);
}
</style>
@@ -0,0 +1,88 @@
<script setup lang="ts">
import { ref, computed, onMounted, onUnmounted } from 'vue'
interface Image {
src: string
caption: string
}
const images: Image[] = [
{ src: '/22.png', caption: '服务器管理 — 实时延迟与地理位置' },
{ src: '/33.png', caption: '代理管理 — 可视化配置所有隧道' },
{ src: '/44.png', caption: '代理详情 — 实时连接日志' },
{ src: '/55.png', caption: '一键导入 — 支持 TOML 配置文件' },
{ src: '/66.png', caption: '添加代理 — 表单填写界面' },
]
const activeIndex = ref<number | null>(null)
const active = computed(() => activeIndex.value !== null ? images[activeIndex.value] : null)
function open(i: number) {
activeIndex.value = i
document.body.style.overflow = 'hidden'
}
function close() {
activeIndex.value = null
document.body.style.overflow = ''
}
function prev() {
if (activeIndex.value !== null && activeIndex.value > 0) activeIndex.value--
}
function next() {
if (activeIndex.value !== null && activeIndex.value < images.length - 1) activeIndex.value++
}
function onKey(e: KeyboardEvent) {
if (activeIndex.value === null) return
if (e.key === 'Escape') close()
if (e.key === 'ArrowLeft') prev()
if (e.key === 'ArrowRight') next()
}
onMounted(() => document.addEventListener('keydown', onKey))
onUnmounted(() => {
document.removeEventListener('keydown', onKey)
document.body.style.overflow = ''
})
</script>
<template>
<div class="sg-gallery">
<div
v-for="(img, i) in images"
:key="img.src"
class="sg-item"
@click="open(i)"
>
<img :src="img.src" :alt="img.caption" loading="lazy" />
<div class="sg-caption">{{ img.caption }}</div>
</div>
</div>
<Teleport to="body">
<Transition name="sg-fade">
<div v-if="active" class="sg-lightbox" @click="close">
<button class="sg-close" aria-label="关闭" @click.stop="close">✕</button>
<div class="sg-lightbox-inner" @click.stop>
<img :src="active.src" :alt="active.caption" />
<p class="sg-lightbox-caption">{{ active.caption }}</p>
</div>
<button
v-if="activeIndex! > 0"
class="sg-nav sg-nav-prev"
aria-label="上一张"
@click.stop="prev"
>‹</button>
<button
v-if="activeIndex! < images.length - 1"
class="sg-nav sg-nav-next"
aria-label="下一张"
@click.stop="next"
>›</button>
</div>
</Transition>
</Teleport>
</template>
+259
View File
@@ -0,0 +1,259 @@
/**
* Customize default theme styling by overriding CSS variables:
* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
*/
/**
* Colors
*
* Each colors have exact same color scale system with 3 levels of solid
* colors with different brightness, and 1 soft color.
*
* - `XXX-1`: The most solid color used mainly for colored text. It must
* satisfy the contrast ratio against when used on top of `XXX-soft`.
*
* - `XXX-2`: The color used mainly for hover state of the button.
*
* - `XXX-3`: The color for solid background, such as bg color of the button.
* It must satisfy the contrast ratio with pure white (#ffffff) text on
* top of it.
*
* - `XXX-soft`: The color used for subtle background such as custom container
* or badges. It must satisfy the contrast ratio when putting `XXX-1` colors
* on top of it.
*
* The soft color must be semi transparent alpha channel. This is crucial
* because it allows adding multiple "soft" colors on top of each other
* to create a accent, such as when having inline code block inside
* custom containers.
*
* - `default`: The color used purely for subtle indication without any
* special meanings attched to it such as bg color for menu hover state.
*
* - `brand`: Used for primary brand colors, such as link text, button with
* brand theme, etc.
*
* - `tip`: Used to indicate useful information. The default theme uses the
* brand color for this by default.
*
* - `warning`: Used to indicate warning to the users. Used in custom
* container, badges, etc.
*
* - `danger`: Used to show error, or dangerous message to the users. Used
* in custom container, badges, etc.
* -------------------------------------------------------------------------- */
:root {
--vp-c-default-1: var(--vp-c-gray-1);
--vp-c-default-2: var(--vp-c-gray-2);
--vp-c-default-3: var(--vp-c-gray-3);
--vp-c-default-soft: var(--vp-c-gray-soft);
--vp-c-brand-1: #6366f1;
--vp-c-brand-2: #818cf8;
--vp-c-brand-3: #6366f1;
--vp-c-brand-soft: rgba(99, 102, 241, 0.14);
--vp-c-tip-1: var(--vp-c-brand-1);
--vp-c-tip-2: var(--vp-c-brand-2);
--vp-c-tip-3: var(--vp-c-brand-3);
--vp-c-tip-soft: var(--vp-c-brand-soft);
--vp-c-warning-1: var(--vp-c-yellow-1);
--vp-c-warning-2: var(--vp-c-yellow-2);
--vp-c-warning-3: var(--vp-c-yellow-3);
--vp-c-warning-soft: var(--vp-c-yellow-soft);
--vp-c-danger-1: var(--vp-c-red-1);
--vp-c-danger-2: var(--vp-c-red-2);
--vp-c-danger-3: var(--vp-c-red-3);
--vp-c-danger-soft: var(--vp-c-red-soft);
}
.dark {
--vp-c-brand-1: #818cf8;
--vp-c-brand-2: #6366f1;
--vp-c-brand-3: #818cf8;
--vp-c-brand-soft: rgba(129, 140, 248, 0.16);
}
/**
* Component: Home
* -------------------------------------------------------------------------- */
:root {
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(
120deg,
#6366f1 30%,
#fcd34d
);
--vp-home-hero-image-background-image: linear-gradient(
-45deg,
#6366f170 50%,
#fcd34d50 50%
);
--vp-home-hero-image-filter: blur(44px);
}
@media (min-width: 640px) {
:root {
--vp-home-hero-image-filter: blur(56px);
}
}
@media (min-width: 960px) {
:root {
--vp-home-hero-image-filter: blur(68px);
}
}
/**
* Component: Screenshot Gallery
* -------------------------------------------------------------------------- */
.sg-gallery {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1.25rem;
margin: 2rem 0;
}
@media (max-width: 768px) {
.sg-gallery {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 480px) {
.sg-gallery {
grid-template-columns: 1fr;
}
}
.sg-item {
border-radius: 12px;
overflow: hidden;
cursor: zoom-in;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
transition: transform 0.25s ease, box-shadow 0.25s ease;
background: var(--vp-c-bg-soft);
}
.sg-item:hover {
transform: translateY(-4px);
box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}
.sg-item img {
width: 100%;
display: block;
margin: 0 !important;
}
.sg-caption {
padding: 0.5rem 0.75rem;
font-size: 0.78rem;
color: var(--vp-c-text-2);
text-align: center;
border-top: 1px solid var(--vp-c-divider);
}
/* Lightbox */
.sg-lightbox {
position: fixed;
inset: 0;
z-index: 9999;
background: rgba(0, 0, 0, 0.88);
backdrop-filter: blur(10px);
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
}
.sg-lightbox-inner {
display: flex;
flex-direction: column;
align-items: center;
max-width: min(90vw, 960px);
}
.sg-lightbox-inner img {
max-width: 100%;
max-height: calc(85vh - 3rem);
border-radius: 10px;
object-fit: contain;
margin: 0 !important;
box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
.sg-lightbox-caption {
margin-top: 0.9rem;
color: rgba(255, 255, 255, 0.8);
font-size: 0.9rem;
text-align: center;
}
.sg-close {
position: fixed;
top: 1.25rem;
right: 1.5rem;
background: rgba(255, 255, 255, 0.15);
border: none;
color: white;
width: 2.25rem;
height: 2.25rem;
border-radius: 50%;
font-size: 1rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s;
z-index: 1;
}
.sg-close:hover {
background: rgba(255, 255, 255, 0.28);
}
.sg-nav {
position: fixed;
top: 50%;
transform: translateY(-50%);
background: rgba(255, 255, 255, 0.15);
border: none;
color: white;
width: 2.75rem;
height: 2.75rem;
border-radius: 50%;
font-size: 1.6rem;
line-height: 1;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s;
z-index: 1;
}
.sg-nav:hover {
background: rgba(255, 255, 255, 0.28);
}
.sg-nav-prev { left: 1.25rem; }
.sg-nav-next { right: 1.25rem; }
/* Lightbox fade transition */
.sg-fade-enter-active,
.sg-fade-leave-active {
transition: opacity 0.2s ease;
}
.sg-fade-enter-from,
.sg-fade-leave-to {
opacity: 0;
}
+18
View File
@@ -0,0 +1,18 @@
import DefaultTheme from 'vitepress/theme'
import type { Theme } from 'vitepress'
import { h } from 'vue'
import ScreenshotGallery from './components/ScreenshotGallery.vue'
import AsideAd from './components/AsideAd.vue'
import './custom.css'
export default {
extends: DefaultTheme,
Layout() {
return h(DefaultTheme.Layout, null, {
'aside-outline-after': () => h(AsideAd),
})
},
enhanceApp({ app }) {
app.component('ScreenshotGallery', ScreenshotGallery)
},
} satisfies Theme
+3
View File
@@ -0,0 +1,3 @@
# API 概览
待完善...
+3
View File
@@ -0,0 +1,3 @@
# 代理 API
待完善...
+3
View File
@@ -0,0 +1,3 @@
# 服务器 API
待完善...
+112
View File
@@ -0,0 +1,112 @@
# 二进制安装
::: warning 文档待完善
本页内容正在持续完善中,部分细节可能不够准确,请以实际情况为准。
:::
通过预编译的二进制文件安装 Podux,适合直接在服务器或本地机器上运行。
## 下载
前往 [GitHub Releases](https://github.com/luckjiawei/podux/releases/latest) 页面,根据你的系统选择对应的安装包:
| 系统 | 架构 | 文件名 |
| --- | --- | --- |
| Linux | x86_64 (amd64) | `podux-linux-amd64.tar.gz` |
| Linux | ARM64 | `podux-linux-arm64.tar.gz` |
| Linux | ARMv7 | `podux-linux-armv7.tar.gz` |
| macOS | Intel | `podux-darwin-amd64.tar.gz` |
| macOS | Apple Silicon | `podux-darwin-arm64.tar.gz` |
| Windows | x86_64 | `podux-windows-amd64.zip` |
也可以通过命令行直接下载(以 Linux amd64 为例):
```bash
curl -LO https://github.com/luckjiawei/podux/releases/latest/download/podux-linux-amd64.tar.gz
```
## 安装
### Linux / macOS
```bash
# 解压
tar -xzf podux-linux-amd64.tar.gz
# 移动到系统路径(可选)
sudo mv podux /usr/local/bin/
# 赋予执行权限
sudo chmod +x /usr/local/bin/podux
```
### Windows
解压 `.zip` 文件到任意目录,在解压目录中打开 PowerShell 或命令提示符即可使用。
## 启动
```bash
podux serve --http 0.0.0.0:8090
```
启动后访问 `http://localhost:8090` 进入主界面,`http://localhost:8090/_/` 进入管理后台。
::: tip
首次启动会自动初始化数据库,数据默认存储在当前目录下的 `pb_data/` 文件夹中。建议固定工作目录,避免数据分散。
:::
## 配置开机自启(Linux)
推荐使用 systemd 管理 Podux 进程。
**1. 创建专用用户(可选但推荐)**
```bash
sudo useradd -r -s /bin/false podux
```
**2. 创建数据目录**
```bash
sudo mkdir -p /var/lib/podux
sudo chown podux:podux /var/lib/podux
```
**3. 创建 systemd 服务文件**
```bash
sudo tee /etc/systemd/system/podux.service > /dev/null <<EOF
[Unit]
Description=Podux Service
After=network.target
[Service]
Type=simple
User=podux
WorkingDirectory=/var/lib/podux
ExecStart=/usr/local/bin/podux serve --http 0.0.0.0:8090
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
EOF
```
**4. 启用并启动服务**
```bash
sudo systemctl daemon-reload
sudo systemctl enable podux
sudo systemctl start podux
# 查看运行状态
sudo systemctl status podux
```
## 查看日志
```bash
sudo journalctl -u podux -f
```
+150
View File
@@ -0,0 +1,150 @@
# Docker 安装
使用 Docker 部署 Podux,适合容器化环境或希望快速隔离部署的场景。
## 前置条件
- Docker 20.10+
- (可选)Docker Compose v2
## 镜像信息
官方镜像托管在 GitHub Container Registry:
```text
ghcr.io/luckjiawei/podux:latest
```
支持以下架构:`linux/amd64`、`linux/arm64`、`linux/arm/v7`
## 快速启动
```bash
docker run -d \
--name podux \
--restart unless-stopped \
-p 8090:8090 \
-v ./podux-data:/app/pb_data \
ghcr.io/luckjiawei/podux:latest
```
| 参数 | 说明 |
| --- | --- |
| `-p 8090:8090` | 将容器端口映射到宿主机 |
| `-v ./podux-data:/app/pb_data` | 持久化数据目录 |
| `--restart unless-stopped` | 宿主机重启后自动恢复 |
启动后访问 `http://localhost:8090` 进入主界面。
## Docker Compose(推荐)
创建 `docker-compose.yml` 文件:
```yaml
version: '3.8'
services:
podux:
image: ghcr.io/luckjiawei/podux:${VERSION:-latest}
container_name: podux
restart: unless-stopped
ports:
- "8090:8090"
volumes:
- podux-data:/app/pb_data
environment:
- TZ=Asia/Shanghai
# Resource limits (optional)
deploy:
resources:
limits:
cpus: '2'
memory: 1G
reservations:
cpus: '0.5'
memory: 256M
# Network mode (optional)
# Uncomment if you need host network for better frpc performance
# network_mode: host
# Logging
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8090/api/health"]
interval: 30s
timeout: 3s
start_period: 10s
retries: 3
volumes:
podux-data:
driver: local
networks:
default:
name: podux-network
```
启动:
```bash
docker compose up -d
```
查看日志:
```bash
docker compose logs -f podux
```
## 数据持久化
容器内数据存储在 `/app/pb_data`,包含数据库文件和配置信息。**必须挂载此目录**,否则容器重建后数据丢失。
Docker Compose 配置使用具名 volume `podux-data`,数据由 Docker 统一管理:
```bash
# 查看 volume 位置
docker volume inspect podux-data
```
## 自定义端口
如需修改监听端口,同步修改宿主机映射端口和容器内端口:
```bash
docker run -d \
--name podux \
--restart unless-stopped \
-p 18090:18090 \
-v ./podux-data:/app/pb_data \
ghcr.io/luckjiawei/podux:latest \
serve --http 0.0.0.0:18090
```
## 常用命令
```bash
# 停止
docker compose stop podux
# 重启
docker compose restart podux
# 查看日志
docker compose logs -f podux
# 进入容器
docker compose exec podux sh
```
+71
View File
@@ -0,0 +1,71 @@
# 二进制升级
::: warning 文档待完善
本页内容正在持续完善中,部分细节可能不够准确,请以实际情况为准。
:::
升级 Podux 二进制版本前,建议先备份数据,再替换可执行文件。
## 升级步骤
### 1. 备份数据
数据默认存储在工作目录下的 `pb_data/`,升级前先备份:
```bash
cp -r /var/lib/podux/pb_data /var/lib/podux/pb_data.bak
```
### 2. 停止服务
```bash
sudo systemctl stop podux
```
若未使用 systemd,手动终止进程:
```bash
pkill podux
```
### 3. 下载新版本
前往 [GitHub Releases](https://github.com/luckjiawei/podux/releases/latest) 查看最新版本,或通过命令行下载(以 Linux amd64 为例):
```bash
curl -LO https://github.com/luckjiawei/podux/releases/latest/download/podux-linux-amd64.tar.gz
tar -xzf podux-linux-amd64.tar.gz
```
### 4. 替换二进制文件
```bash
sudo mv podux /usr/local/bin/podux
sudo chmod +x /usr/local/bin/podux
```
### 5. 重启服务
```bash
sudo systemctl start podux
# 确认服务正常运行
sudo systemctl status podux
```
## 回滚
如果升级后出现问题,恢复备份数据并重新安装旧版本:
```bash
# 停止服务
sudo systemctl stop podux
# 恢复数据备份
rm -rf /var/lib/podux/pb_data
cp -r /var/lib/podux/pb_data.bak /var/lib/podux/pb_data
# 从 GitHub Releases 下载对应旧版本并替换二进制文件,然后启动
sudo systemctl start podux
```
+69
View File
@@ -0,0 +1,69 @@
# Docker 升级
升级 Docker 部署的 Podux,只需拉取新镜像并重建容器,数据通过挂载 volume 自动保留。
## Docker Compose 升级(推荐)
```bash
# 拉取最新镜像
docker compose pull
# 重建并启动容器
docker compose up -d
# 确认运行状态
docker compose ps
```
旧镜像不会自动删除,可手动清理:
```bash
docker image prune -f
```
## docker run 升级
```bash
# 拉取最新镜像
docker pull ghcr.io/luckjiawei/podux:latest
# 停止并删除旧容器(数据存储在 volume 中,不会丢失)
docker stop podux
docker rm podux
# 启动新容器
docker run -d \
--name podux \
--restart unless-stopped \
-p 8090:8090 \
-v ./podux-data:/app/pb_data \
ghcr.io/luckjiawei/podux:latest
```
## 升级到指定版本
如需升级到特定版本而非 `latest`,修改镜像标签:
```bash
# Docker Compose:设置环境变量
VERSION=v1.2.0 docker compose up -d
# 或编辑 docker-compose.yml 中的 image 字段
image: ghcr.io/luckjiawei/podux:v1.2.0
```
## 回滚
如果升级后出现问题,切换回旧版本:
```bash
# 停止当前容器
docker compose down
# 修改 docker-compose.yml 中的版本号为旧版本,然后启动
VERSION=v1.1.0 docker compose up -d
```
::: tip
数据存储在 volume `podux-data` 中,回滚容器不影响已有数据。
:::
+120
View File
@@ -0,0 +1,120 @@
# Binary Installation
::: warning Work in Progress
This page is still being improved. Some details may not be fully accurate — please refer to the actual behavior when in doubt.
:::
Install Podux using pre-compiled binaries — ideal for running directly on a server or local machine.
## Download
Go to the [GitHub Releases](https://github.com/luckjiawei/podux/releases/latest) page and download the package for your platform:
| OS | Architecture | Filename |
| --- | --- | --- |
| Linux | x86_64 (amd64) | `podux-linux-amd64.tar.gz` |
| Linux | ARM64 | `podux-linux-arm64.tar.gz` |
| Linux | ARMv7 | `podux-linux-armv7.tar.gz` |
| macOS | Intel | `podux-darwin-amd64.tar.gz` |
| macOS | Apple Silicon | `podux-darwin-arm64.tar.gz` |
| Windows | x86_64 | `podux-windows-amd64.zip` |
Or download directly from the command line (Linux amd64 example):
```bash
curl -LO https://github.com/luckjiawei/podux/releases/latest/download/podux-linux-amd64.tar.gz
```
## Install
### Linux / macOS
```bash
# Extract
tar -xzf podux-linux-amd64.tar.gz
# Move to system path (optional)
sudo mv podux /usr/local/bin/
# Make executable
sudo chmod +x /usr/local/bin/podux
# Verify installation
podux --version
```
### Windows
Extract the `.zip` file to any directory, then open PowerShell or Command Prompt inside that directory to use it.
## Start
```bash
podux serve --http 0.0.0.0:8090
```
After starting, visit `http://localhost:8090` for the main interface and `http://localhost:8090/_/` for the admin panel.
::: tip
On first launch, the database is initialized automatically. Data is stored in a `pb_data/` folder in the current working directory. Fix the working directory to avoid data scatter.
:::
## Auto-start on Boot (Linux)
Use systemd to manage the Podux process.
**1. Create a dedicated user (optional but recommended)**
```bash
sudo useradd -r -s /bin/false podux
```
**2. Create the data directory**
```bash
sudo mkdir -p /var/lib/podux
sudo chown podux:podux /var/lib/podux
```
**3. Create the systemd service file**
```bash
sudo tee /etc/systemd/system/podux.service > /dev/null <<EOF
[Unit]
Description=Podux Service
After=network.target
[Service]
Type=simple
User=podux
WorkingDirectory=/var/lib/podux
ExecStart=/usr/local/bin/podux serve --http 0.0.0.0:8090
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
EOF
```
**4. Enable and start the service**
```bash
sudo systemctl daemon-reload
sudo systemctl enable podux
sudo systemctl start podux
# Check status
sudo systemctl status podux
```
## View Logs
```bash
sudo journalctl -u podux -f
```
## Next Steps
- [Binary Upgrade](/en/deploy/upgrade/binary) — Upgrade to a new version
- [Getting Started](/en/guide/getting-started) — Add servers and proxies
+154
View File
@@ -0,0 +1,154 @@
# Docker Installation
Deploy Podux with Docker — ideal for containerized environments or quick isolated deployments.
## Prerequisites
- Docker 20.10+
- Docker Compose v2 (optional)
## Image
The official image is hosted on GitHub Container Registry:
```text
ghcr.io/luckjiawei/podux:latest
```
Supported architectures: `linux/amd64`, `linux/arm64`, `linux/arm/v7`
## Quick Start
```bash
docker run -d \
--name podux \
--restart unless-stopped \
-p 8090:8090 \
-v ./podux-data:/app/pb_data \
ghcr.io/luckjiawei/podux:latest
```
| Flag | Description |
| --- | --- |
| `-p 8090:8090` | Map container port to host |
| `-v ./podux-data:/app/pb_data` | Persist data directory |
| `--restart unless-stopped` | Auto-recover after host reboot |
After starting, visit `http://localhost:8090`.
## Docker Compose (Recommended)
Create a `docker-compose.yml` file:
```yaml
version: '3.8'
services:
podux:
image: ghcr.io/luckjiawei/podux:${VERSION:-latest}
container_name: podux
restart: unless-stopped
ports:
- "8090:8090"
volumes:
- podux-data:/app/pb_data
environment:
- TZ=Asia/Shanghai
# Resource limits (optional)
deploy:
resources:
limits:
cpus: '2'
memory: 1G
reservations:
cpus: '0.5'
memory: 256M
# Network mode (optional)
# Uncomment if you need host network for better frpc performance
# network_mode: host
# Logging
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8090/api/health"]
interval: 30s
timeout: 3s
start_period: 10s
retries: 3
volumes:
podux-data:
driver: local
networks:
default:
name: podux-network
```
Start:
```bash
docker compose up -d
```
View logs:
```bash
docker compose logs -f podux
```
## Data Persistence
Container data is stored in `/app/pb_data`, which includes the database and configuration. **This directory must be mounted**, otherwise data will be lost when the container is recreated.
Docker Compose uses a named volume `podux-data` managed by Docker:
```bash
# Inspect volume location
docker volume inspect podux-data
```
## Custom Port
To change the listening port, update both the host mapping and the container port:
```bash
docker run -d \
--name podux \
--restart unless-stopped \
-p 18090:18090 \
-v ./podux-data:/app/pb_data \
ghcr.io/luckjiawei/podux:latest \
serve --http 0.0.0.0:18090
```
## Common Commands
```bash
# Stop
docker compose stop podux
# Restart
docker compose restart podux
# View logs
docker compose logs -f podux
# Enter container shell
docker compose exec podux sh
```
## Next Steps
- [Docker Upgrade](/en/deploy/upgrade/docker) — Upgrade to a new version
- [Getting Started](/en/guide/getting-started) — Add servers and proxies
+70
View File
@@ -0,0 +1,70 @@
# Binary Upgrade
::: warning Work in Progress
This page is still being improved. Some details may not be fully accurate — please refer to the actual behavior when in doubt.
:::
Before upgrading the Podux binary, back up your data first, then replace the executable.
## Upgrade Steps
### 1. Back Up Data
Data is stored in `pb_data/` under the working directory. Back it up before upgrading:
```bash
cp -r /var/lib/podux/pb_data /var/lib/podux/pb_data.bak
```
### 2. Stop the Service
```bash
sudo systemctl stop podux
```
If not using systemd, kill the process manually:
```bash
pkill podux
```
### 3. Download the New Version
Visit [GitHub Releases](https://github.com/luckjiawei/podux/releases/latest) for the latest version, or download via command line (Linux amd64 example):
```bash
curl -LO https://github.com/luckjiawei/podux/releases/latest/download/podux-linux-amd64.tar.gz
tar -xzf podux-linux-amd64.tar.gz
```
### 4. Replace the Binary
```bash
sudo mv podux /usr/local/bin/podux
sudo chmod +x /usr/local/bin/podux
```
### 5. Restart the Service
```bash
sudo systemctl start podux
# Confirm service is running
sudo systemctl status podux
```
## Rollback
If issues occur after upgrading, restore the backup and reinstall the old version:
```bash
# Stop service
sudo systemctl stop podux
# Restore data backup
rm -rf /var/lib/podux/pb_data
cp -r /var/lib/podux/pb_data.bak /var/lib/podux/pb_data
# Download the old version from GitHub Releases, replace the binary, then start
sudo systemctl start podux
```
+69
View File
@@ -0,0 +1,69 @@
# Docker Upgrade
To upgrade a Docker-deployed Podux, pull the new image and recreate the container. Data in the mounted volume is preserved automatically.
## Docker Compose Upgrade (Recommended)
```bash
# Pull the latest image
docker compose pull
# Recreate and start the container
docker compose up -d
# Confirm running status
docker compose ps
```
Old images are not removed automatically. Clean them up manually:
```bash
docker image prune -f
```
## docker run Upgrade
```bash
# Pull the latest image
docker pull ghcr.io/luckjiawei/podux:latest
# Stop and remove the old container (data in volume is preserved)
docker stop podux
docker rm podux
# Start a new container
docker run -d \
--name podux \
--restart unless-stopped \
-p 8090:8090 \
-v ./podux-data:/app/pb_data \
ghcr.io/luckjiawei/podux:latest
```
## Upgrade to a Specific Version
To target a specific version instead of `latest`, set the image tag:
```bash
# Docker Compose: set via environment variable
VERSION=v1.2.0 docker compose up -d
# Or edit the image field in docker-compose.yml
image: ghcr.io/luckjiawei/podux:v1.2.0
```
## Rollback
If issues occur after upgrading, switch back to the previous version:
```bash
# Stop the current container
docker compose down
# Set the old version and start
VERSION=v1.1.0 docker compose up -d
```
::: tip
Data is stored in the `podux-data` volume. Rolling back the container does not affect existing data.
:::
+124
View File
@@ -0,0 +1,124 @@
# Getting Started
This guide helps you install and configure Podux in under 5 minutes using Docker.
## Prerequisites
- [Docker](https://docs.docker.com/get-docker/) installed
- A public server with frps deployed (or a third-party frp service)
- The machine running Podux must have internet access
::: info Don't have a public server yet?
Check out **[RainYun](https://www.rainyun.com/s=ljw_?podux)** — an affordable and reliable cloud server provider, great for hosting frps and other self-hosted services.
:::
## Step 1: Start the Container
```bash
docker run -d \
--name podux \
--restart unless-stopped \
-p 8090:8090 \
-v podux-data:/app/pb_data \
ghcr.io/luckjiawei/podux:latest
```
On successful startup, the terminal will display:
```text
App: http://0.0.0.0:8090
Admin: http://0.0.0.0:8090/_/
```
::: tip Using Docker Compose
You can also manage it with Docker Compose:
```yaml
services:
podux:
image: ghcr.io/luckjiawei/podux:latest
container_name: podux
restart: unless-stopped
ports:
- "8090:8090"
volumes:
- podux-data:/app/pb_data
volumes:
podux-data:
```
```bash
docker compose up -d
```
:::
## Step 2: Create an Account
Open your browser and navigate to the main interface:
```text
http://localhost:8090
```
On the first visit, you will be guided to create an account. Enter your username and password and submit.
## Step 3: Create a Backend Account (Optional)
If you need access to the backend management panel, navigate to the Admin UI:
```text
http://localhost:8090/_/
```
On the first visit, you will be guided to create a backend account. Enter your email and password and submit.
::: warning Security Notice
If Podux is accessible from the public internet, use a strong password and consider restricting access to port `8090` via your firewall.
:::
## Step 4: Open the Main Interface
Visit the application dashboard:
```text
http://localhost:8090
```
You will see the Podux main console.
## Step 5: Add a Server
1. Click **Servers** in the left navigation
2. Click **Add Server** and fill in the following:
| Field | Description | Example |
| --- | --- | --- |
| Name | Display name for this server | `My Server` |
| Server Address | IP or domain of your frps host | `your-server.com` |
| Server Port | frps listening port, default `7000` | `7000` |
| Auth Token | The `auth.token` from your frps config | `your-token` |
3. Enable **Auto Connect** and save — Podux will connect immediately.
Once connected, the server card will show an **Online** status and current latency.
## Step 6: Add a Proxy
1. Click **Proxies**, then **Add Proxy**
2. Choose a proxy type (TCP / UDP / HTTP / HTTPS, etc.) and fill in the config:
**Example: Expose local SSH (port 22) to the internet**
| Field | Value |
| --- | --- |
| Name | `my-ssh` |
| Type | `TCP` |
| Server | Select the server you added |
| Local IP | `127.0.0.1` |
| Local Port | `22` |
| Remote Port | `6022` |
3. Save — Podux will automatically hot-reload the frpc config, no restart needed.
You can then connect via `ssh -p 6022 user@your-server.com`.
+5
View File
@@ -0,0 +1,5 @@
# Screenshots
<img src="/11.png" alt="Dashboard Overview" style="border-radius:12px;box-shadow:0 8px 40px rgba(0,0,0,0.18);width:100%;margin:1rem 0;" />
<ScreenshotGallery />
+114
View File
@@ -0,0 +1,114 @@
# What is Podux?
Podux is a **modern frpc management platform** built on PocketBase and React, providing a visual interface to manage intranet penetration services.
## Dashboard
![Podux Dashboard](/11.png)
## The Name
**Podux** = **proxy** + **port** + **dux** (Latin: leader, guide)
The name itself is a statement of intent: not just a frontend for one tool, but a unified platform to lead and guide your tunneling infrastructure.
## Why the Rename?
Podux started life as **frpc-hub** — a project built around frpc. As it grew, the vision became clear: support not just frp, but become a unified platform for managing multiple tunneling tools.
The name **frpc-hub** tied the project to a single tool and couldn't carry that larger ambition. **Podux** reflects where the project is headed — a single, forward-looking platform that can grow to support more protocols and tools beyond frp.
> The rename happened in March 2026. The repository and all related references have been updated accordingly.
## Background
[frp](https://github.com/fatedier/frp) is one of the most popular open-source intranet penetration tools. Its client `frpc` establishes tunnels with the server `frps` via configuration files (`.toml` / `.ini`), exposing local services to the public internet.
However, using native frpc comes with several pain points:
- **Config-file-driven only**: Every change requires manually editing files and restarting the process
- **Difficult multi-server management**: Maintaining multiple frps servers leads to scattered, error-prone configs
- **No visual monitoring**: No intuitive way to view connection status or latency
- **High operational cost**: Upgrades, backups, and migrations are all manual
Podux was built to solve exactly these problems.
## Core Features
### Server Management
Centrally manage multiple frps servers with support for:
- Add, edit, and delete server configurations
- Auto-connect and automatic reconnection on failure
- Real-time latency monitoring with geolocation display
- One-click enable/disable toggle
### Proxy Management
Create and manage proxy tunnels via visual forms. Supported proxy types:
| Type | Description |
| --- | --- |
| TCP | General-purpose TCP port forwarding |
| UDP | UDP traffic forwarding |
| HTTP | HTTP reverse proxy |
| HTTPS | HTTPS reverse proxy |
| STCP | Secure TCP, peer-to-peer encrypted |
| SUDP | Secure UDP |
### Hot Reload
After modifying proxy configurations, Podux automatically triggers an frpc reload — **no manual restart required**, zero service interruption.
### Modern Interface
Built with Radix UI and Tailwind CSS, delivering a clean and elegant UI with Chinese/English language switching.
## Architecture
```text
┌─────────────────────────────────┐
│ Browser (React) │
│ Radix UI + Tailwind CSS │
└────────────────┬────────────────┘
│ HTTP API
┌────────────────▼────────────────┐
│ Backend (PocketBase) │
│ Embedded SQLite Database │
└────────────────┬────────────────┘
│ Process Management
┌────────────────▼────────────────┐
│ frpc │
│ Local intranet tunnel client │
└────────────────┬────────────────┘
│ Encrypted Tunnel
┌────────────────▼────────────────┐
│ frps │
│ Public server (user-deployed) │
└─────────────────────────────────┘
```
Podux ships as a **single executable** that embeds both the PocketBase backend and frontend assets — ready to run with zero extra dependencies.
## Comparison with Manual Management
| | Manual frpc | Podux |
| --- | --- | --- |
| Configuration | Edit `.toml` files | Visual forms |
| Reload config | Restart process manually | Automatic hot reload |
| Multi-server | Maintain multiple config files | Unified dashboard |
| Status monitoring | Read logs | Real-time monitoring panel |
| Cross-platform deploy | Requires environment setup | Single file, ready to run |
## Use Cases
- **Developers**: Quickly expose local dev environments (web services, databases, SSH) to the internet for testing or demos
- **DevOps engineers**: Manage intranet penetration configs across multiple machines from one place
- **Home users**: Set up home servers, NAS, or remote desktop without memorizing complex config syntax
## Next Steps
- [Getting Started](/en/guide/getting-started) — Up and running in 5 minutes
- [Binary Installation](/en/deploy/install/binary) — Deploy to your server
- [Docker Installation](/en/deploy/install/docker) — Container-based deployment
+47
View File
@@ -0,0 +1,47 @@
---
layout: home
hero:
name: "Podux"
text: "Modern Frpc Management Platform"
tagline: One-stop intranet penetration service management platform, making frpc configuration and monitoring simple and efficient.
image:
src: /logo.svg
alt: Podux Dashboard
actions:
- theme: brand
text: What is Podux?
link: /en/guide/what-is-podux
- theme: alt
text: Get Started
link: /en/guide/getting-started
- theme: alt
text: GitHub
link: https://github.com/luckjiawei/podux
features:
- icon: 🖥️
title: Server Management
details: Easily create, configure, and manage multiple frpc servers with auto-connection and status monitoring.
- icon: 🔌
title: Proxy Configuration
details: Supports HTTP, HTTPS, TCP, UDP, and more proxy types with simple and intuitive configuration.
- icon: 📊
title: Real-time Monitoring
details: Real-time network latency monitoring and geolocation display at a glance.
- icon: 🔄
title: Hot Reload
details: Automatically reloads frpc after configuration changes without manual service restart.
- icon: 🌐
title: Multi-language Support
details: Built-in internationalization support for easy switching between Chinese and English interfaces.
- icon: 🎨
title: Modern Interface
details: Elegant user experience based on Radix UI and Tailwind CSS.
- icon: 🚀
title: High Performance
details: Fast development and runtime experience based on Go and React.
- icon: 📦
title: Out of the Box
details: Cross-platform support, single executable file, quick deployment to Linux, Windows, macOS without complex configuration.
---
+31
View File
@@ -0,0 +1,31 @@
# FAQ
## Basics & Installation
### Q: What is Podux? How is it different from plain frpc?
A: Podux is a graphical management tool built on top of frpc. It integrates the core frp client functionality and provides a modern web interface for managing configuration, monitoring status, and viewing logs — eliminating the need to manually edit config files and the lack of visual monitoring in vanilla frpc.
### Q: Which operating systems does Podux support?
A: Windows, macOS, and major Linux distributions are all supported.
## Configuration & Usage
### Q: Can I import my existing `frpc.toml` config file?
A: It is currently recommended to recreate your configuration through Podux's visual interface to ensure all fields are correctly parsed and managed.
### Q: How do configuration changes take effect?
A: Podux supports hot reload. After saving changes in the web UI, the application automatically applies the new configuration — a full service restart is usually not required.
### Q: Which proxy protocols are supported?
A: **TCP**, **UDP**, **HTTP**, and **HTTPS** are fully supported. Advanced protocols such as **STCP** and **XTCP** are under development and will be available in future releases.
## Troubleshooting
### Q: How do I report a bug or unknown error?
A: Please open an issue on the GitHub repository. Include detailed error logs, steps to reproduce, and your operating system information to help us diagnose the problem quickly.
+3
View File
@@ -0,0 +1,3 @@
# 基础配置
待完善...
+124
View File
@@ -0,0 +1,124 @@
# 快速开始
本指南帮助你在 5 分钟内通过 Docker 完成 Podux 的安装和初始配置。
## 前置条件
- 已安装 [Docker](https://docs.docker.com/get-docker/)
- 一台已部署 frps 的公网服务器(或使用第三方 frp 服务)
- 运行 Podux 的机器能够访问公网
::: info 还没有公网服务器?
推荐使用 **[雨云](https://www.rainyun.com/s=ljw_?podux)** —— 价格实惠、稳定可靠的国内云服务器,适合部署 frps 和各类自托管服务。
:::
## 第一步:启动容器
```bash
docker run -d \
--name podux \
--restart unless-stopped \
-p 8090:8090 \
-v podux-data:/app/pb_data \
ghcr.io/luckjiawei/podux:latest
```
启动成功后,终端会输出类似以下内容:
```text
App: http://0.0.0.0:8090
Admin: http://0.0.0.0:8090/_/
```
::: tip 使用 Docker Compose
也可以通过 Docker Compose 管理:
```yaml
services:
podux:
image: ghcr.io/luckjiawei/podux:latest
container_name: podux
restart: unless-stopped
ports:
- "8090:8090"
volumes:
- podux-data:/app/pb_data
volumes:
podux-data:
```
```bash
docker compose up -d
```
:::
## 第二步:创建账号
打开浏览器访问主界面:
```text
http://localhost:8090
```
首次访问时,系统会引导你创建账号,填写用户名和密码后提交即可。
## 第三步:创建后台账号(可选)
如需使用后台管理功能,可访问 Admin UI:
```text
http://localhost:8090/_/
```
首次访问时,系统会引导你创建后台账号,填写邮箱和密码后提交即可。
::: warning 安全提示
如果 Podux 运行在公网可访问的服务器上,请务必设置强密码,并考虑通过防火墙限制 `8090` 端口的访问来源。
:::
## 第四步:进入主界面
访问应用主界面:
```text
http://localhost:8090
```
你将看到 Podux 的主控制台。
## 第五步:添加服务器
1. 点击左侧导航栏的 **服务器** 菜单
2. 点击 **添加服务器**,填写以下信息:
| 字段 | 说明 | 示例 |
| --- | --- | --- |
| 名称 | 服务器的显示名称 | `我的服务器` |
| 服务器地址 | frps 所在主机的 IP 或域名 | `your-server.com` |
| 服务器端口 | frps 监听端口,默认 `7000` | `7000` |
| 认证令牌 | frps 配置的 `auth.token` | `your-token` |
3. 开启 **自动连接** 后保存,Podux 会立即尝试连接。
连接成功后,服务器卡片将显示 **在线** 状态和当前网络延迟。
## 第六步:添加代理
1. 点击 **代理** 菜单,然后点击 **添加代理**
2. 选择代理类型(TCP / UDP / HTTP / HTTPS 等)并填写配置:
**示例:将本机 SSH (22 端口) 映射到公网**
| 字段 | 值 |
| --- | --- |
| 名称 | `my-ssh` |
| 类型 | `TCP` |
| 服务器 | 选择已添加的服务器 |
| 本地 IP | `127.0.0.1` |
| 本地端口 | `22` |
| 远程端口 | `6022` |
3. 保存后,Podux 会自动热重载 frpc 配置,无需重启。
之后即可通过 `ssh -p 6022 user@your-server.com` 访问本机。
+3
View File
@@ -0,0 +1,3 @@
# 安装部署
待完善...
+5
View File
@@ -0,0 +1,5 @@
# 界面预览
<img src="/11.png" alt="Dashboard 总览" style="border-radius:12px;box-shadow:0 8px 40px rgba(0,0,0,0.18);width:100%;margin:1rem 0;" />
<ScreenshotGallery />
+105
View File
@@ -0,0 +1,105 @@
# 什么是 Podux?
Podux 是一个**现代化的 frpc 管理平台**,基于 PocketBase 和 React 构建,提供可视化界面来管理内网穿透服务。
## 名称由来
**Podux** = **proxy** + **port** + **dux**(拉丁语:领导者、引导者)
这个名字本身就是一份宣言:不只是一个工具的前端,而是一个统一管理隧道工具的平台。
## 为什么从 frpc-hub 改名?
Podux 的前身是 **frpc-hub**,最初专为管理 frpc 而生。随着项目的成长,目标逐渐清晰 —— 不只是 frp,而是成为支持多种隧道工具的统一管理平台。
**frpc-hub** 这个名字将项目与单一工具绑定,无法承载更大的愿景。**Podux** 代表的是面向未来的设计:一个可以容纳更多隧道协议与工具的统一入口。
> 改名发生于 2026 年 3 月,仓库地址及所有相关引用均已同步更新。
## 背景
[frp](https://github.com/fatedier/frp) 是目前最流行的开源内网穿透工具之一,其客户端 `frpc` 通过配置文件(`.toml` / `.ini`)与服务端 `frps` 建立隧道,将内网服务暴露到公网。
然而,原生 frpc 的使用方式存在一些痛点:
- **纯配置文件驱动**:每次修改都需要手动编辑文件并重启进程
- **多服务器管理困难**:同时维护多个 frps 服务端时,配置容易混乱
- **缺乏可视化监控**:无法直观查看连接状态和延迟情况
- **运维成本高**:升级、备份、迁移全靠手动操作
Podux 正是为解决这些问题而生。
## 核心能力
### 服务器管理
集中管理多个 frps 服务器,支持:
- 添加、编辑、删除服务器配置
- 自动连接与断线重连
- 实时延迟监控与地理位置显示
- 一键切换启用/禁用状态
### 代理管理
通过可视化表单创建和管理代理隧道,支持以下代理类型:
| 类型 | 说明 |
| --- | --- |
| TCP | 通用 TCP 端口转发 |
| UDP | UDP 流量转发 |
| HTTP | HTTP 反向代理 |
| HTTPS | HTTPS 反向代理 |
| STCP | 安全 TCP,点对点加密 |
| SUDP | 安全 UDP |
### 热重载
修改代理配置后,Podux 会自动触发 frpc 重载,**无需手动重启**,服务零中断。
### 现代化界面
基于 Radix UI 组件库和 Tailwind CSS 构建,界面简洁美观,支持中英文切换。
## 技术架构
```text
┌─────────────────────────────────┐
│ 浏览器 (React) │
│ Radix UI + Tailwind CSS │
└────────────────┬────────────────┘
│ HTTP API
┌────────────────▼────────────────┐
│ 后端 (PocketBase) │
│ 内嵌 SQLite 数据库 │
└────────────────┬────────────────┘
│ 进程管理
┌────────────────▼────────────────┐
│ frpc │
│ 本机运行的内网穿透客户端 │
└────────────────┬────────────────┘
│ 加密隧道
┌────────────────▼────────────────┐
│ frps │
│ 公网服务端(用户自行部署) │
└─────────────────────────────────┘
```
Podux 以**单一可执行文件**的形式分发,内嵌了 PocketBase 后端与前端资源,开箱即用,无需额外依赖。
## 与手动管理对比
| 对比项 | 手动管理 frpc | Podux |
| --- | --- | --- |
| 配置方式 | 编辑 `.toml` 文件 | 可视化表单 |
| 重载配置 | 手动重启进程 | 自动热重载 |
| 多服务器 | 维护多份配置文件 | 统一界面管理 |
| 状态监控 | 查看日志 | 实时监控面板 |
| 跨平台部署 | 需配置环境 | 单文件,开箱即用 |
## 适用场景
- **开发者**:快速将本地开发环境(Web 服务、数据库、SSH 等)暴露到公网进行调试或演示
- **运维人员**:统一管理多台机器的内网穿透配置,降低运维复杂度
- **个人用户**:无需记忆复杂的配置语法,通过界面轻松配置家庭服务器、NAS、远程桌面等
+48
View File
@@ -0,0 +1,48 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home
hero:
name: "Podux"
text: "现代化的 Frpc 管理平台"
tagline: 一站式内网穿透服务管理平台,让 frpc 配置和监控变得简单高效
image:
src: /logo.svg
alt: Podux Dashboard
actions:
- theme: brand
text: 什么是 Podux?
link: /guide/what-is-podux
- theme: alt
text: 快速开始
link: /guide/getting-started
- theme: alt
text: GitHub
link: https://github.com/luckjiawei/podux
features:
- icon: 🖥️
title: 服务器管理
details: 轻松创建、配置和管理多个 frpc 服务器,支持自动连接和状态监控
- icon: 🔌
title: 代理配置
details: 支持 HTTP、HTTPS、TCP、UDP 等多种代理类型,配置简单直观
- icon: 📊
title: 实时监控
details: 实时网络延迟监控、地理位置展示,一目了然
- icon: 🔄
title: 热重载
details: 配置更改后自动重载 frpc,无需手动重启服务
- icon: 🌐
title: 多语言支持
details: 内置国际化支持,轻松切换中英文界面
- icon: 🎨
title: 现代化界面
details: 基于 Radix UI 和 Tailwind CSS,提供优雅的用户体验
- icon: 🚀
title: 高性能
details: 基于 Go 和 React,提供快速的开发和运行体验
- icon: 📦
title: 开箱即用
details: 跨平台支持,单一可执行文件,无需复杂配置即可快速部署到 Linux、Windows、macOS
---
+11
View File
@@ -0,0 +1,11 @@
{
"scripts": {
"docs:dev": "vitepress dev",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview"
},
"devDependencies": {
"vitepress": "^1.5.0",
"vue": "^3.5.13"
}
}
+1623
View File
File diff suppressed because it is too large. Load diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 589 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by Pixelmator Pro 3.7 -->
<svg width="814" height="814" viewBox="0 0 814 814" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<image id="image1" x="34" y="32" width="373" height="751" xlink:href="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAXUAAALvCAYAAACa6FVwAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABdaADAAQAAAABAAAC7wAAAADb4BoWAABAAElEQVR4Aey9CZQk2VUl+G3x3WPNtTYhIaFBgPqoQWqQGFpIaCQQAhoEojnQw9YLatQ0OjRI7KIHneYwzDAzZ04f+kwP3adZxAhtJZWklljULSSVpMqqrDUr94zcY8nYI3w1d5t737fnbu7hERkZGZkVHvl/lbmZ/eX9Z88i73/2/vvve8YlJwEnASeBfSCBeOmRCePnfTNSrHje66r74JF29Ajejlq5Rk4CTgJOAi+gBOLZD5ZrrdbBqL5WWK+uviyKGq+MGs1XxKY95gXBDeP7530vPJPPlU6F5ZGFjF+ulY9E8573jtYLyPZd6dqB+l0Rs+vEScBJ4HYlEMfHMo2Zk1+/tDLzusrK4mvXlhf+fqO2PlGtrh/2/FYubrVNo9EwYTZjTOybTCa3EntBM18oz4VhfnlsfPLRAwcf+FRp9OBj3sQPLt0uP3u1vQP1vfpmHF9OAk4CIoHl2T952frSwhtrKzPfVVm78arF2esv99o1k/V906ivmyDwTBj6xvM802pHJgwyJmq3kB+YVuSZIFswtXrDGD9rcvlSVBo//MTkoYc+Vj7w4KfLh3/8yf0mZgfq++2NuudxEtgnElif+5P76qvz33X98pmfW5q/9u3NyorJ+RG08IbJhW2Tg0IOGAeYx7C2+KbVskAeZnzTbrdN4KOCQX7bM5VaZNrQ3mtNY4LcqAlxFEcPPXX0oZf/h7EjRz/uFd9xdZ+IDTJxyUnAScBJYA9JIJ57eGSpevmNCzNTP375/PM/ElWXTTHTNhkPYB7EplgMTTuqmBjaeC7jAcAj02w2TRzHoq37PrRzaOkE+mYzgtbuQ0MvGj/MmWbkwz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Fo0eBYyX8G8e61tRFunOQfmFU6G5otl0dYJ1PSood952m5OWkz2d1AZBwr06sNHHTzyOsB+pw3QCjnrGrXw/bH3k9PU9/47chw6CexZCdTn/uLHr5x/8t8szZzxS9kagnPBy8XDbkUtTIoCPmluoQZM04v1K7ePQvCmYYSToC3Uob5OMOJq0DbMHxgGBNBZj/ZtauecvuQhwM+6IK1ATbNLBlp6iFAA1NyBy5KknHZ11GViWyrkpKNtmW+v7RcDr/XgwBFhwRNODBc5wbp7PTlQ3+tvyPHnJLBHJVBf+ujbL547/n9PnX6qPAqTy+FJhLJF6Fof4XPpsqigSSDV683O+ogK2LzXdmyj+fRy4XXvAS8VbDatNnACsSaloff9/XfocoRAohYvvu5Afpp0WE5tX0h6mSWptMd/nPllj78gx56TwF6UQLz2yVctz5z51ekLz42HrVWsEoW23eQKTK7zx96hgMcutFqAhqYLkEzAHtq4j/vexBaJSt1bYDVnaO+CuiyjmyJMJBn4o2fzCKMLAGb8ljbMMSQhYJ2YW/iFIAn5FtRtv6K9s7vEHiP3MoBwgMDAQTBHIb8ooP1jGaxZtYT29m+/VPc2t447JwEngRdcAvHKJw7euHby/zrz3JLine truncated
<image id="image2" x="147" y="67" width="119" height="152" xlink:href="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAHcAAACYCAYAAADeK3bdAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAd6ADAAQAAAABAAAAmAAAAADmtKHkAAAk/ElEQVR4Ae2dB5SURbbHv+7JM+SkAgooQQQDDxBF1MWIiKLrE1F0FdCHC4gKiCCoRAN6BNE1rG8fuG8R8751DbDqcVdUVo8BFUFJkjMySJg88+6v2jtT803H6Z6Zbuw65+vKVbfuv27lqvY4SRUzDpSVlXlWrVp1dElJSWpRUVF+ampqcWlpafbhw4cdr9dbnJ2dXSjmdDJMT08vLSws9EoYLzr+Sgh+mCUNo2NOS0v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4yw5QE5zTIvFOnqfPn3KpkyZEvEZqMjoqho6anCff/7592Ta05KCcJvOrWBAvCgFXempLm0KKhW4fD4rINNaUbGZ9Line truncated
<image id="image3" x="181" y="67" width="599" height="672" xlink:href="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAlcAAAKgCAYAAAC2rFglAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAACV6ADAAQAAAABAAACoAAAAAARWqrRAABAAElEQVR4Aey9CZxVxZU/fnuj6YXuptlBWZTFDSbGjHHUiSYmxphMNNFJZtyyzPwmiSaO+ZuYaIwzjpPJNmbBJK5jEo3GfUVQUUDAhV1UEAUUAWVfmm5ouqG7//Wt19/u08W9b1/ue+/U5/NebadOnfrWdm5V3bolnhpFQBFIGYGurq7SJUuWlJ1wwgkdxu5/8ODB8tbW1n2HHXZY2bZt20pHjBjRtWPHjo76+vpSmVl7e3tXv379ShjW1NTUSTfs5ubmLvpPP/30HjfDYM+ZM6dExsEv4xFnZCo1soF3l4m3MnSnsX6R3vX3sOrOp8MElKCskI28QRQgK2TuIw9ou01PnJSZssQbhrJRFqQZMGCAzY/y0I88gcGaNWvKgTPTdGNjywUaN1/y7MavJ17ih3SUG25pkN6Ji1lutJuNGzdCJg/yV1VVlZj2ZOsfcg8dOrSnHaH9oB1t3bq1E+FsT7JtlZeXl5g22cUw6TdYlA0ZMqQT7RT5STd5mfzB9wBoTf7tkA8YfuQjHzmANGoUAUWgLwJBg15fKvUpAopAIAKPPPLIWb/5zW9mlJWVeZiA9u/fXwFiM4F5HR0dXmdnp1dSUmJ/LhOGG+WsJx5h8PsZGc40oHdNNB4ubZDf8jdidHpdXmlpqddlsinxF+uQ8oEWhvTwk18kJuKn27WRJwzS27L48LMEnd24lUYISrv1OOTl4gOegfwE3kjnGhkm3aCzfpM/bJaXde7yoZ88eurOlb+7vF53+Vw8JT7gWVJmSo42ZkQHb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yzBIIGvrVzg0Csn+w3yQjiZtW+rkyhX6K/PDrVaYiVzogT76V2NXVz/bhsrISr6Kynzd46BCv3LhxxQN4rF67BgrXJcZ9ybgjj9h/1113/cJ8V3SaueJhUTKya5rCREBXrgqzXrVUGULgk5/8ZKe5mb0EW4IYtLGCxTeS5ETB7P3CGKd2uBDAhKz1lVydALdohtiCxs9NZShV/Jme8kCJwioVbGkYT3rkDzqYiHyR1S18tRJpK8oj3wut6NffbhkeaGv3NmzY4FXX1tj+X1td45177hfuPenkk35jboxfdeqppzbL/NRdfAioclV8da4lThKBGTNmfPriiy9+uqGhwW4J4gAsDJQraeTkIcPVXRgIUBEojNLEVwoqIdHs+DgFU7HfSDuYOnoM5IRSBJuGfoTJcMYjX9YtVqjw4wMU7rDDlxiwtYhw6Gq4Kb6iotIqWQfbD3j4DA/4Hjl+/Af/9o1/+7y5S2v1SSedtIf81S4uBFS5Kq761tKmgMD3v//9p/785z+fjcOtuIQQylVkoC21NgfmFLLQpHmKQD7XvZ+ike1qgAxUfpi362d4kA0ebj1Ivohzy+r6kSdXsPDQRD/PaOF8Fn5VVZX2gHxpaeSsZefBDvvWMOj3t0c+3I5PYuENwwsvvPBfJ0+evCVIbg0vTARUuSrMetVSpRmB1atX1/3zPLine truncated
<image id="image4" x="330" y="67" width="450" height="424" xlink:href="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAcIAAAGoCAYAAADVd+V5AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABwqADAAQAAAABAAABqAAAAAAUS/DFAABAAElEQVR4Aey9B7xfRZn/f25Jvek9oSWQ0GFFXJYVFBALlrXB4orKuu7+LKis/lUUFt3lx8/V1dV1wYawrKKgIJ3QWwihhRJqIIQSkkACpPd673/e883n3snkfOv99vvM6/X9PlOfeeYzc57nzJw5c1qSPui6urpaH3300bbDDz98u6MDt23b1r5x48YNu+++e9ubb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PFOILL+1ia85utlaFCMTjIEyrZ39sCGopq66d3mBJewrho3xqL+EQC8nQwytzgDhLpTi/kYbvLDptx7uJLJWybwD36quv+uVTZpF8RooVJHeKzVP/8I+f+/Q73/nOJ30m+2t6BJrSEF544YW//PrXv/6lCZMmZpZF33jT3/1xBLine truncated
</svg>

After

Width:  |  Height:  |  Size: 340 KiB

+31
View File
@@ -0,0 +1,31 @@
# 常见问题
## 基础与安装
### Q: Podux 是什么?它和原本的 Frpc 有什么区别?
A: Podux 是一个基于 Frpc 的图形化管理工具。它集成了 Frp 客户端的核心功能,并提供了一个现代化的 Web 界面来管理配置文件、监控状态和日志,解决了原生 Frpc 需要手动编辑配置文件和缺乏可视化监控的痛点。
### Q: Podux 支持哪些操作系统?
A: 目前支持 Windows、macOS 和 Linux 主流发行版。
## 配置与使用
### Q: 我现有的 `frpc.toml` 配置文件可以直接导入吗?
A: 目前建议通过 Podux 的可视化界面重新创建配置,以确保所有字段都能被正确解析和管理。
### Q: 修改配置后通过什么方式生效?
A: Podux 支持配置热重载(Hot Reload)。在 Web 界面保存修改后,程序会自动尝试应用新的配置,通常无需重启整个服务。
### Q: 支持哪些类型的代理协议?
A: 目前完整支持 **TCP**、**UDP**、**HTTP** 和 **HTTPS** 协议。**STCP** 和 **XTCP** 等高级协议的支持正在开发中,敬请期待后续版本更新。
## 故障排查
### Q: 遇到未知错误或 Bug 该如何反馈?
A: 欢迎在 GitHub 仓库提交 Issue,请尽量提供详细的错误日志、复现步骤以及您的操作系统环境信息,以便我们快速定位问题。
+1 -1
View File
@@ -3,7 +3,7 @@ module podux
go 1.25.5
require (
github.com/fatedier/frp v0.67.0
github.com/fatedier/frp v0.68.0
github.com/pelletier/go-toml/v2 v2.2.0
github.com/pocketbase/dbx v1.11.0
github.com/pocketbase/pocketbase v0.35.0
+2
View File
@@ -27,6 +27,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fatedier/frp v0.67.0 h1:w6xHLkruAJcq+fZP9VOiY6w/FBy/wB1aPqA4frs98K8=
github.com/fatedier/frp v0.67.0/go.mod h1:0Q3mAI0c9WtAsgMQpTQhinWTKa2Qp121YWsqaFu41Zg=
github.com/fatedier/frp v0.68.0 h1:woKC31EpgCLQDirRAOAUgHP3IRxLu2mBHS6zGpcw7tw=
github.com/fatedier/frp v0.68.0/go.mod h1:qFdez6Z+RDqoqF1xJhh48+IW91SVQ+pNWnrmcl43Wjs=
github.com/fatedier/golib v0.5.1 h1:hcKAnaw5mdI/1KWRGejxR+i1Hn/NvbY5UsMKDr7o13M=
github.com/fatedier/golib v0.5.1/go.mod h1:W6kIYkIFxHsTzbgqg5piCxIiDo4LzwgTY6R5W8l9NFQ=
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
+18 -24
View File
@@ -21,6 +21,7 @@ import (
"podux/pkg/utils"
"github.com/fatedier/frp/client"
frpcsource "github.com/fatedier/frp/pkg/config/source"
v1 "github.com/fatedier/frp/pkg/config/v1"
"github.com/fatedier/frp/pkg/util/log"
"github.com/pocketbase/pocketbase/core"
@@ -235,10 +236,6 @@ func (fs *Service) LaunchFrpc(serverId *string) error {
fs.app.Logger().Debug("Config", "serverAddr", cfg.ServerAddr, "serverPort", cfg.ServerPort, "proxyCount", len(proxyCfgs))
for _, c := range proxyCfgs {
c.Complete(cfg.User)
}
// Print frp configurations in logs with sensitive data masked
commonCfgBytes, _ := json.Marshal(cfg)
proxyCfgsBytes, _ := json.Marshal(proxyCfgs)
@@ -251,9 +248,13 @@ func (fs *Service) LaunchFrpc(serverId *string) error {
cfg.Complete()
log.InitLogger(cfg.Log.To, cfg.Log.Level, int(cfg.Log.MaxDays), cfg.Log.DisablePrintColor)
configSrc := frpcsource.NewConfigSource()
if err := configSrc.ReplaceAll(proxyCfgs, nil); err != nil {
return err
}
svr, err := client.NewService(client.ServiceOptions{
Common: cfg,
ProxyCfgs: proxyCfgs,
Common: cfg,
ConfigSourceAggregator: frpcsource.NewAggregator(configSrc),
})
if err != nil {
fs.app.Logger().Error("NewService", "err", err)
@@ -284,13 +285,13 @@ func (fs *Service) LaunchFrpc(serverId *string) error {
done <- err
}()
go fs.monitorServiceStatus(serverId, svr, ctx, done, cfg.User)
go fs.monitorServiceStatus(serverId, svr, ctx, done)
return nil
}
// monitorServiceStatus monitors service status and updates the database.
func (fs *Service) monitorServiceStatus(id *string, svr *client.Service, ctx context.Context, done <-chan error, user string) {
func (fs *Service) monitorServiceStatus(id *string, svr *client.Service, ctx context.Context, done <-chan error) {
time.Sleep(2 * time.Second)
select {
@@ -307,7 +308,7 @@ func (fs *Service) monitorServiceStatus(id *string, svr *client.Service, ctx con
fs.app.Logger().Info("Service is running", "id", *id)
}
go fs.monitorProxyStatus(id, svr, ctx, user)
go fs.monitorProxyStatus(id, svr, ctx)
ticker := time.NewTicker(5 * time.Second)
defer ticker.Stop()
@@ -342,7 +343,7 @@ func (fs *Service) destroying(id *string) {
}
// monitorProxyStatus monitors proxy status from frp and updates the database.
func (fs *Service) monitorProxyStatus(serverId *string, svr *client.Service, ctx context.Context, user string) {
func (fs *Service) monitorProxyStatus(serverId *string, svr *client.Service, ctx context.Context) {
fs.app.Logger().Info("Starting proxy status monitoring", "serverId", *serverId)
statusExporter := svr.StatusExporter()
@@ -364,11 +365,13 @@ func (fs *Service) monitorProxyStatus(serverId *string, svr *client.Service, ctx
for _, proxy := range proxies {
baseName := proxy.Name + "-" + proxy.Id
prefix := ""
if user != "" {
prefix = user + "."
}
status, exists := statusExporter.GetProxyStatus(prefix + baseName)
status, exists := statusExporter.GetProxyStatus(baseName)
fs.app.Logger().Info("proxy status check", "baseName", baseName, "exists", exists, "phase", func() string {
if status != nil {
return status.Phase
}
return "nil"
}())
if exists {
var bootStatus proxydomain.ProxyBootStatus
@@ -493,15 +496,6 @@ func (fs *Service) ReloadFrpc(serverId *string) error {
return err
}
server, err := fs.app.FindRecordById("fh_servers", *serverId)
if err != nil {
return err
}
user := server.GetString("user")
for _, c := range proxyCfgs {
c.Complete(user)
}
proxyCfgsBytes, _ := json.Marshal(proxyCfgs)
safeProxies := sensitiveRegex.ReplaceAll(proxyCfgsBytes, []byte(`"${1}":"***"`))
fs.app.Logger().Info("FRP Reload Configurations", "proxies", string(safeProxies))
+359
View File
@@ -0,0 +1,359 @@
package monitoring
import (
"fmt"
"sync"
"time"
"github.com/pocketbase/dbx"
"github.com/pocketbase/pocketbase/core"
)
const MetricKeyFrpsDelay = "frps_delay"
// MetricsService handles writing latency data to fh_metrics_targets and fh_metrics_raw.
type MetricsService struct {
app core.App
// targetCache maps serverID -> fh_metrics_targets record ID
targetCache map[string]string
targetCacheLock sync.RWMutex
}
// NewMetricsService creates a new MetricsService.
func NewMetricsService(app core.App) *MetricsService {
return &MetricsService{
app: app,
targetCache: make(map[string]string),
}
}
// RecordServerLatency records a latency measurement for a server.
// It automatically finds or creates the corresponding fh_metrics_targets record.
// Negative latency (unreachable host) is skipped.
func (s *MetricsService) RecordServerLatency(serverID string, latencyMs int64) error {
if latencyMs < 0 {
return nil
}
targetID, err := s.getOrCreateServerTarget(serverID)
if err != nil {
return fmt.Errorf("get/create metrics target: %w", err)
}
return s.recordMetric(targetID, MetricKeyFrpsDelay, float64(latencyMs))
}
// getOrCreateServerTarget returns the fh_metrics_targets record ID for a server,
// creating one if it does not exist. Results are cached in memory.
func (s *MetricsService) getOrCreateServerTarget(serverID string) (string, error) {
s.targetCacheLock.RLock()
if id, ok := s.targetCache[serverID]; ok {
s.targetCacheLock.RUnlock()
return id, nil
}
s.targetCacheLock.RUnlock()
// Acquire write lock for the entire find-or-create to prevent duplicate records
// when multiple goroutines encounter a cache miss simultaneously.
s.targetCacheLock.Lock()
defer s.targetCacheLock.Unlock()
// Re-check under write lock (another goroutine may have just created it).
if id, ok := s.targetCache[serverID]; ok {
return id, nil
}
records, err := s.app.FindRecordsByFilter(
"fh_metrics_targets",
"serverId = {:serverId} && proxyId = ''",
"",
1,
0,
map[string]any{"serverId": serverID},
)
if err != nil {
return "", fmt.Errorf("query metrics target: %w", err)
}
var targetID string
if len(records) > 0 {
targetID = records[0].Id
} else {
collection, err := s.app.FindCollectionByNameOrId("fh_metrics_targets")
if err != nil {
return "", fmt.Errorf("find collection fh_metrics_targets: %w", err)
}
record := core.NewRecord(collection)
record.Set("serverId", serverID)
if err := s.app.Save(record); err != nil {
return "", fmt.Errorf("save metrics target: %w", err)
}
targetID = record.Id
}
s.targetCache[serverID] = targetID
return targetID, nil
}
// GetLatestLatencyBatch returns the most recent latency for every server in one SQL query.
// The returned map key is the server ID.
func (s *MetricsService) GetLatestLatencyBatch() (map[string]*NetworkStatus, error) {
type row struct {
ServerID string `db:"serverId"`
Val float64 `db:"val"`
T string `db:"t"`
}
var rows []row
err := s.app.DB().
NewQuery(`
SELECT t.serverId, r.val, r.t
FROM fh_metrics_raw r
INNER JOIN fh_metrics_targets t ON r.targetId = t.id
WHERE r.metricKey = {:key}
AND r.t = (
SELECT MAX(r2.t) FROM fh_metrics_raw r2
WHERE r2.targetId = r.targetId AND r2.metricKey = {:key}
)
`).
Bind(dbx.Params{"key": MetricKeyFrpsDelay}).
All(&rows)
if err != nil {
return nil, err
}
result := make(map[string]*NetworkStatus, len(rows))
for _, row := range rows {
latency := int64(row.Val)
t, _ := time.Parse("2006-01-02 15:04:05.000Z", row.T)
result[row.ServerID] = &NetworkStatus{
Latency: latency,
Reachable: latency >= 0,
LastCheckTime: t,
}
}
return result, nil
}
// GetLatestServerLatency returns the most recent latency measurement for a server.
// Returns nil if no data has been recorded yet.
func (s *MetricsService) GetLatestServerLatency(serverID string) (*NetworkStatus, error) {
records, err := s.app.FindRecordsByFilter(
"fh_metrics_raw",
"targetId.serverId = {:serverId} && metricKey = {:key}",
"-t",
1,
0,
map[string]any{"serverId": serverID, "key": MetricKeyFrpsDelay},
)
if err != nil {
return nil, fmt.Errorf("query latest latency: %w", err)
}
if len(records) == 0 {
return nil, nil
}
r := records[0]
latency := int64(r.GetFloat("val"))
return &NetworkStatus{
Latency: latency,
Reachable: latency >= 0,
LastCheckTime: r.GetDateTime("t").Time(),
}, nil
}
// AggregateHourly aggregates the previous full hour from fh_metrics_raw into fh_metrics_hourly.
// It is idempotent — re-running for the same hour updates existing records.
func (s *MetricsService) AggregateHourly() error {
now := time.Now().UTC()
to := now.Truncate(time.Hour)
from := to.Add(-time.Hour)
s.app.Logger().Info("Aggregating hourly metrics", "from", from, "to", to)
type row struct {
TargetID string `db:"targetId"`
MetricKey string `db:"metricKey"`
ValAvg float64 `db:"valAvg"`
ValMax float64 `db:"valMax"`
ValMin float64 `db:"valMin"`
}
var rows []row
err := s.app.DB().
NewQuery(`
SELECT targetId, metricKey,
AVG(val) AS valAvg, MAX(val) AS valMax, MIN(val) AS valMin
FROM fh_metrics_raw
WHERE t >= {:from} AND t < {:to}
GROUP BY targetId, metricKey
`).
Bind(dbx.Params{
"from": from.Format("2006-01-02 15:04:05.000Z"),
"to": to.Format("2006-01-02 15:04:05.000Z"),
}).
All(&rows)
if err != nil {
return fmt.Errorf("query raw for hourly agg: %w", err)
}
tStr := from.Format("2006-01-02 15:04:05.000Z")
for _, r := range rows {
if err := s.upsertHourly(r.TargetID, r.MetricKey, tStr, r.ValAvg, r.ValMax, r.ValMin); err != nil {
return err
}
}
return nil
}
func (s *MetricsService) upsertHourly(targetID, metricKey, t string, avg, max, min float64) error {
existing, err := s.app.FindRecordsByFilter(
"fh_metrics_hourly",
"targetId = {:targetId} && metricKey = {:metricKey} && t = {:t}",
"", 1, 0,
map[string]any{"targetId": targetID, "metricKey": metricKey, "t": t},
)
if err != nil {
return fmt.Errorf("query hourly record: %w", err)
}
var record *core.Record
if len(existing) > 0 {
record = existing[0]
} else {
col, err := s.app.FindCollectionByNameOrId("fh_metrics_hourly")
if err != nil {
return fmt.Errorf("find collection fh_metrics_hourly: %w", err)
}
record = core.NewRecord(col)
record.Set("targetId", targetID)
record.Set("metricKey", metricKey)
record.Set("t", t)
}
record.Set("valAvg", avg)
record.Set("valMax", max)
record.Set("valMin", min)
if err := s.app.Save(record); err != nil {
return fmt.Errorf("save hourly record: %w", err)
}
return nil
}
// AggregateDaily aggregates yesterday's hourly data into fh_metrics_daily.
// Only valAvg is stored since valMax/valMin in fh_metrics_daily are date-type fields.
func (s *MetricsService) AggregateDaily() error {
now := time.Now().UTC()
to := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.UTC)
from := to.AddDate(0, 0, -1)
s.app.Logger().Info("Aggregating daily metrics", "from", from, "to", to)
type row struct {
TargetID string `db:"targetId"`
MetricKey string `db:"metricKey"`
ValAvg float64 `db:"valAvg"`
}
var rows []row
err := s.app.DB().
NewQuery(`
SELECT targetId, metricKey, AVG(valAvg) AS valAvg
FROM fh_metrics_hourly
WHERE t >= {:from} AND t < {:to}
GROUP BY targetId, metricKey
`).
Bind(dbx.Params{
"from": from.Format("2006-01-02 15:04:05.000Z"),
"to": to.Format("2006-01-02 15:04:05.000Z"),
}).
All(&rows)
if err != nil {
return fmt.Errorf("query hourly for daily agg: %w", err)
}
tStr := from.Format("2006-01-02 15:04:05.000Z")
for _, r := range rows {
if err := s.upsertDaily(r.TargetID, r.MetricKey, tStr, r.ValAvg); err != nil {
return err
}
}
return nil
}
func (s *MetricsService) upsertDaily(targetID, metricKey, t string, avg float64) error {
existing, err := s.app.FindRecordsByFilter(
"fh_metrics_daily",
"targetId = {:targetId} && metricKey = {:metricKey} && t = {:t}",
"", 1, 0,
map[string]any{"targetId": targetID, "metricKey": metricKey, "t": t},
)
if err != nil {
return fmt.Errorf("query daily record: %w", err)
}
var record *core.Record
if len(existing) > 0 {
record = existing[0]
} else {
col, err := s.app.FindCollectionByNameOrId("fh_metrics_daily")
if err != nil {
return fmt.Errorf("find collection fh_metrics_daily: %w", err)
}
record = core.NewRecord(col)
record.Set("targetId", targetID)
record.Set("metricKey", metricKey)
record.Set("t", t)
}
record.Set("valAvg", avg)
if err := s.app.Save(record); err != nil {
return fmt.Errorf("save daily record: %w", err)
}
return nil
}
// PurgeOldRaw deletes fh_metrics_raw records older than 7 days.
func (s *MetricsService) PurgeOldRaw() error {
cutoff := time.Now().UTC().Add(-7 * 24 * time.Hour).Format("2006-01-02 15:04:05.000Z")
result, err := s.app.DB().
Delete("fh_metrics_raw", dbx.NewExp("t < {:cutoff}", dbx.Params{"cutoff": cutoff})).
Execute()
if err != nil {
return fmt.Errorf("purge old raw metrics: %w", err)
}
affected, _ := result.RowsAffected()
s.app.Logger().Info("Purged old raw metrics", "deleted", affected)
return nil
}
// PurgeOldHourly deletes fh_metrics_hourly records older than 30 days.
func (s *MetricsService) PurgeOldHourly() error {
cutoff := time.Now().UTC().Add(-30 * 24 * time.Hour).Format("2006-01-02 15:04:05.000Z")
result, err := s.app.DB().
Delete("fh_metrics_hourly", dbx.NewExp("t < {:cutoff}", dbx.Params{"cutoff": cutoff})).
Execute()
if err != nil {
return fmt.Errorf("purge old hourly metrics: %w", err)
}
affected, _ := result.RowsAffected()
s.app.Logger().Info("Purged old hourly metrics", "deleted", affected)
return nil
}
// recordMetric writes a single data point to fh_metrics_raw.
func (s *MetricsService) recordMetric(targetID, metricKey string, value float64) error {
collection, err := s.app.FindCollectionByNameOrId("fh_metrics_raw")
if err != nil {
return fmt.Errorf("find collection fh_metrics_raw: %w", err)
}
record := core.NewRecord(collection)
record.Set("targetId", targetID)
record.Set("metricKey", metricKey)
record.Set("t", time.Now().UTC().Format("2006-01-02 15:04:05.000Z"))
record.Set("val", value)
if err := s.app.Save(record); err != nil {
return fmt.Errorf("save metric record: %w", err)
}
return nil
}
+26 -50
View File
@@ -13,18 +13,20 @@ import (
// MonitorService is the background network monitoring service.
type MonitorService struct {
app core.App
networkService *NetworkService
stopChan chan bool
geoService *GeoService
metricsService *MetricsService
stopChan chan struct{}
latencyTicker *time.Ticker
geoTicker *time.Ticker
}
// NewMonitorService creates a new network monitoring service.
func NewMonitorService(app core.App, networkService *NetworkService) *MonitorService {
func NewMonitorService(app core.App, geoService *GeoService, metricsService *MetricsService) *MonitorService {
return &MonitorService{
app: app,
networkService: networkService,
stopChan: make(chan bool),
geoService: geoService,
metricsService: metricsService,
stopChan: make(chan struct{}),
}
}
@@ -41,30 +43,26 @@ func (s *MonitorService) Start(latencyInterval, geoInterval time.Duration) {
go s.updateAllServersGeoLocation()
s.latencyTicker = time.NewTicker(latencyInterval)
go func() {
for {
select {
case <-s.latencyTicker.C:
s.updateAllServersLatency()
case <-s.stopChan:
return
}
}
}()
s.startTicker(s.latencyTicker, s.updateAllServersLatency)
s.geoTicker = time.NewTicker(geoInterval)
s.startTicker(s.geoTicker, s.updateAllServersGeoLocation)
s.app.Logger().Info("Network monitor service started successfully")
}
// startTicker runs fn on each tick until stopped.
func (s *MonitorService) startTicker(ticker *time.Ticker, fn func()) {
go func() {
for {
select {
case <-s.geoTicker.C:
s.updateAllServersGeoLocation()
case <-ticker.C:
fn()
case <-s.stopChan:
return
}
}
}()
s.app.Logger().Info("Network monitor service started successfully")
}
// Stop halts the background monitoring task.
@@ -129,32 +127,16 @@ func (s *MonitorService) updateAllServersGeoLocation() {
}
}
// updateServerLatency updates latency for a single server.
// updateServerLatency pings a single server and records the result to metrics.
func (s *MonitorService) updateServerLatency(serverID string, serverAddr string, serverPort int) {
addr := fmt.Sprintf("%s:%d", serverAddr, serverPort)
pingResult := utils.PingHost(addr, 5*time.Second)
networkStatus := map[string]interface{}{
"latency": pingResult.Latency,
"reachable": pingResult.Reachable,
"lastCheckTime": time.Now().Format(time.RFC3339),
"error": pingResult.Error,
if err := s.metricsService.RecordServerLatency(serverID, pingResult.Latency); err != nil {
s.app.Logger().Error("Failed to record server latency metric", "serverId", serverID, "error", err)
}
networkStatusJSON, _ := json.Marshal(networkStatus)
_, err := s.app.DB().
Update("fh_servers",
dbx.Params{"networkStatus": string(networkStatusJSON)},
dbx.HashExp{"id": serverID},
).Execute()
if err != nil {
s.app.Logger().Error("Failed to update server latency", "serverId", serverID, "error", err)
return
}
s.app.Logger().Debug("Updated latency",
s.app.Logger().Debug("Checked latency",
"serverId", serverID,
"addr", serverAddr,
"latency", pingResult.Latency,
@@ -164,24 +146,18 @@ func (s *MonitorService) updateServerLatency(serverID string, serverAddr string,
// updateServerGeoLocation updates geolocation for a single server.
func (s *MonitorService) updateServerGeoLocation(serverID string, serverAddr string) {
location, err := s.networkService.getGeoLocationWithCache(serverAddr)
location, err := s.geoService.Lookup(serverAddr)
if err != nil {
s.app.Logger().Warn("Failed to get geo location", "serverId", serverID, "addr", serverAddr, "error", err)
return
}
geoLocation := map[string]interface{}{
"country": location.Country,
"countryCode": location.CountryCode,
"region": location.Region,
"city": location.City,
"isp": location.ISP,
"lat": location.Latitude,
"lon": location.Longitude,
geoLocationJSON, err := json.Marshal(location)
if err != nil {
s.app.Logger().Error("Failed to marshal geo location", "serverId", serverID, "error", err)
return
}
geoLocationJSON, _ := json.Marshal(geoLocation)
_, err = s.app.DB().
Update("fh_servers",
dbx.Params{"geoLocation": string(geoLocationJSON)},
@@ -0,0 +1,37 @@
package monitoring
import "github.com/pocketbase/pocketbase/core"
// MetricsScheduler registers cron jobs for metrics aggregation and data retention.
type MetricsScheduler struct {
app core.App
metrics *MetricsService
}
// NewMetricsScheduler creates a new MetricsScheduler.
func NewMetricsScheduler(app core.App, metrics *MetricsService) *MetricsScheduler {
return &MetricsScheduler{app: app, metrics: metrics}
}
// Register adds all metrics-related cron jobs to the app scheduler.
func (s *MetricsScheduler) Register() {
// Aggregate raw -> hourly at minute 5 of every hour.
s.app.Cron().MustAdd("metrics_hourly_agg", "5 * * * *", func() {
if err := s.metrics.AggregateHourly(); err != nil {
s.app.Logger().Error("Failed to aggregate hourly metrics", "error", err)
}
})
// Aggregate hourly -> daily and enforce data retention every day at 01:05.
s.app.Cron().MustAdd("metrics_daily_agg", "5 1 * * *", func() {
if err := s.metrics.AggregateDaily(); err != nil {
s.app.Logger().Error("Failed to aggregate daily metrics", "error", err)
}
if err := s.metrics.PurgeOldRaw(); err != nil {
s.app.Logger().Error("Failed to purge old raw metrics", "error", err)
}
if err := s.metrics.PurgeOldHourly(); err != nil {
s.app.Logger().Error("Failed to purge old hourly metrics", "error", err)
}
})
}
+21 -90
View File
@@ -1,7 +1,6 @@
package monitoring
import (
"fmt"
"podux/pkg/utils"
"sync"
"time"
@@ -9,123 +8,55 @@ import (
"github.com/pocketbase/pocketbase/core"
)
// NetworkService is the network diagnostic service.
type NetworkService struct {
app core.App
geoCache map[string]*geoCacheItem // IP geolocation cache
geoCacheLock sync.RWMutex // Cache read-write lock
// GeoService resolves IP addresses to geolocation data with a 24-hour in-memory cache.
type GeoService struct {
app core.App
cache map[string]*geoCacheItem
cacheLock sync.RWMutex
}
// geoCacheItem is a geolocation cache entry.
type geoCacheItem struct {
Location *utils.GeoLocation
ExpiresAt time.Time
}
// ServerNetworkStatus holds network status for a server.
type ServerNetworkStatus struct {
ServerID string `json:"serverId"`
ServerName string `json:"serverName"`
ServerAddr string `json:"serverAddr"`
ServerPort int `json:"serverPort"`
NetworkStatus *NetworkStatus `json:"networkStatus"`
GeoLocation *utils.GeoLocation `json:"geoLocation,omitempty"`
}
// NetworkStatus holds latency and reachability information.
type NetworkStatus struct {
Latency int64 `json:"latency"` // Latency in milliseconds
Reachable bool `json:"reachable"` // Whether the host is reachable
LastCheckTime time.Time `json:"lastCheckTime"` // Last check timestamp
Latency int64 `json:"latency"`
Reachable bool `json:"reachable"`
LastCheckTime time.Time `json:"lastCheckTime"`
Error string `json:"error,omitempty"`
}
// NewNetworkService creates a new network diagnostic service.
func NewNetworkService(app core.App) *NetworkService {
return &NetworkService{
app: app,
geoCache: make(map[string]*geoCacheItem),
func NewGeoService(app core.App) *GeoService {
return &GeoService{
app: app,
cache: make(map[string]*geoCacheItem),
}
}
// GetServerNetworkStatus retrieves server network status.
func (s *NetworkService) GetServerNetworkStatus(serverID string) (*ServerNetworkStatus, error) {
record, err := s.app.FindRecordById("fh_servers", serverID)
if err != nil {
return nil, fmt.Errorf("server not found: %w", err)
}
serverName := record.GetString("name")
serverAddr := record.GetString("serverAddr")
serverPort := record.GetInt("serverPort")
addr := fmt.Sprintf("%s:%d", serverAddr, serverPort)
pingResult := utils.PingHost(addr, 5*time.Second)
networkStatus := &NetworkStatus{
Latency: pingResult.Latency,
Reachable: pingResult.Reachable,
LastCheckTime: time.Now(),
Error: pingResult.Error,
}
geoLocation, err := s.getGeoLocationWithCache(serverAddr)
if err != nil {
s.app.Logger().Warn("Failed to get geo location", "addr", serverAddr, "error", err)
}
return &ServerNetworkStatus{
ServerID: serverID,
ServerName: serverName,
ServerAddr: serverAddr,
ServerPort: serverPort,
NetworkStatus: networkStatus,
GeoLocation: geoLocation,
}, nil
}
// getGeoLocationWithCache retrieves geolocation information with a 24-hour cache.
func (s *NetworkService) getGeoLocationWithCache(addr string) (*utils.GeoLocation, error) {
s.geoCacheLock.RLock()
if item, exists := s.geoCache[addr]; exists {
// Lookup returns geolocation for the given address, using the cache when valid.
func (s *GeoService) Lookup(addr string) (*utils.GeoLocation, error) {
s.cacheLock.RLock()
if item, exists := s.cache[addr]; exists {
if time.Now().Before(item.ExpiresAt) {
s.geoCacheLock.RUnlock()
s.cacheLock.RUnlock()
return item.Location, nil
}
}
s.geoCacheLock.RUnlock()
s.cacheLock.RUnlock()
location, err := utils.GetGeoLocation(addr)
if err != nil {
return nil, err
}
s.geoCacheLock.Lock()
s.geoCache[addr] = &geoCacheItem{
s.cacheLock.Lock()
s.cache[addr] = &geoCacheItem{
Location: location,
ExpiresAt: time.Now().Add(24 * time.Hour),
}
s.geoCacheLock.Unlock()
s.cacheLock.Unlock()
return location, nil
}
// ClearGeoCache clears the geolocation cache.
func (s *NetworkService) ClearGeoCache() {
s.geoCacheLock.Lock()
defer s.geoCacheLock.Unlock()
s.geoCache = make(map[string]*geoCacheItem)
}
// CleanExpiredCache removes expired entries from the geolocation cache.
func (s *NetworkService) CleanExpiredCache() {
s.geoCacheLock.Lock()
defer s.geoCacheLock.Unlock()
now := time.Now()
for addr, item := range s.geoCache {
if now.After(item.ExpiresAt) {
delete(s.geoCache, addr)
}
}
}
+3 -2
View File
@@ -166,17 +166,18 @@ func (s *Service) GetAppVersion() string {
type LatestVersionResponse struct {
TagName string `json:"tag_name"`
HTMLURL string `json:"html_url"`
Body string `json:"body"`
}
// GetLatestVersion fetches the latest podux release from GitHub.
func (s *Service) GetLatestVersion() (*LatestVersionResponse, error) {
client := &http.Client{Timeout: 10 * time.Second}
req, err := http.NewRequest("GET", "https://api.github.com/repos/luckjiawei/podux/releases/latest", nil)
req, err := http.NewRequest("GET", "https://ghp.podux.io/repos/luckjiawei/podux/releases/latest", nil)
if err != nil {
return nil, err
}
req.Header.Set("User-Agent", "podux-server")
req.Header.Set("User-Agent", "podux-server/"+buildinfo.AppVersion)
req.Header.Set("Accept", "application/vnd.github+json")
resp, err := client.Do(req)
@@ -79,10 +79,11 @@ func (r *ServerRepository) ResetAllBootStatus() error {
func (r *ServerRepository) GetMaxLatency() (int64, error) {
var maxLatency int64
// Get the max latency among each target's most recent measurement.
err := r.app.DB().
Select("MAX(CAST(json_extract(networkStatus, '$.latency') AS INTEGER))").
From("fh_servers").
Where(dbx.NewExp("networkStatus IS NOT NULL AND networkStatus != ''")).
Select("MAX(val)").
From("fh_metrics_raw").
Where(dbx.NewExp("metricKey = 'frps_delay' AND t IN (SELECT MAX(t) FROM fh_metrics_raw WHERE metricKey = 'frps_delay' GROUP BY targetId)")).
Row(&maxLatency)
if err != nil {
+218
View File
@@ -0,0 +1,218 @@
package httphandler
import (
"fmt"
"math"
"strconv"
"time"
"podux/internal/application/monitoring"
"podux/pkg/response"
"github.com/pocketbase/dbx"
"github.com/pocketbase/pocketbase/core"
)
type ServerHandler struct {
app core.App
metricsService *monitoring.MetricsService
}
func NewServerHandler(app core.App, metricsService *monitoring.MetricsService) *ServerHandler {
return &ServerHandler{app: app, metricsService: metricsService}
}
type serverVO struct {
ID string `json:"id"`
ServerName string `json:"serverName"`
User string `json:"user"`
ServerAddr string `json:"serverAddr"`
ServerPort int `json:"serverPort"`
Description string `json:"description"`
BootStatus string `json:"bootStatus"`
AutoConnection bool `json:"autoConnection"`
SendRate float64 `json:"sendRate"`
RecvRate float64 `json:"recvRate"`
GeoLocation any `json:"geoLocation,omitempty"`
Log any `json:"log,omitempty"`
Auth any `json:"auth,omitempty"`
Transport any `json:"transport,omitempty"`
Metadatas any `json:"metadatas,omitempty"`
Created string `json:"created"`
Updated string `json:"updated"`
NetworkStatus *monitoring.NetworkStatus `json:"networkStatus,omitempty"`
}
type serverListResponse struct {
Page int `json:"page"`
PerPage int `json:"perPage"`
TotalItems int64 `json:"totalItems"`
TotalPages int `json:"totalPages"`
Items []serverVO `json:"items"`
}
type serverOptionVO struct {
ID string `json:"id"`
ServerName string `json:"serverName"`
BootStatus string `json:"bootStatus"`
NetworkStatus *monitoring.NetworkStatus `json:"networkStatus,omitempty"`
}
type probePoint struct {
T string `json:"t"`
Val float64 `json:"val"`
}
func (h *ServerHandler) RegisterHandlers(e *core.ServeEvent) {
// Paginated server list with assembled latency metrics.
e.Router.GET("/api/servers", requireAuth(func(e *core.RequestEvent) error {
page, _ := strconv.Atoi(e.Request.URL.Query().Get("page"))
if page < 1 {
page = 1
}
perPage, _ := strconv.Atoi(e.Request.URL.Query().Get("perPage"))
if perPage < 1 {
perPage = 10
}
search := e.Request.URL.Query().Get("search")
// Count total matching records
var total int64
countQ := h.app.DB().Select("COUNT(*)").From("fh_servers")
if search != "" {
countQ = countQ.Where(dbx.NewExp(
"(serverName LIKE {:s} OR serverAddr LIKE {:s} OR description LIKE {:s})",
dbx.Params{"s": "%" + search + "%"},
))
}
if err := countQ.Row(&total); err != nil {
return e.JSON(500, response.Error(err))
}
// Fetch the page of records
var records []*core.Record
var err error
if search != "" {
records, err = h.app.FindRecordsByFilter(
"fh_servers",
"serverName ~ {:s} || serverAddr ~ {:s} || description ~ {:s}",
"-created",
perPage,
(page-1)*perPage,
map[string]any{"s": search},
)
} else {
records, err = h.app.FindRecordsByFilter("fh_servers", "", "-created", perPage, (page-1)*perPage)
}
if err != nil {
return e.JSON(500, response.Error(err))
}
latencyMap, err := h.metricsService.GetLatestLatencyBatch()
if err != nil {
h.app.Logger().Warn("Failed to get latency batch", "error", err)
latencyMap = map[string]*monitoring.NetworkStatus{}
}
totalPages := int(math.Ceil(float64(total) / float64(perPage)))
items := make([]serverVO, 0, len(records))
for _, r := range records {
items = append(items, serverVO{
ID: r.Id,
ServerName: r.GetString("serverName"),
User: r.GetString("user"),
ServerAddr: r.GetString("serverAddr"),
ServerPort: r.GetInt("serverPort"),
Description: r.GetString("description"),
BootStatus: r.GetString("bootStatus"),
AutoConnection: r.GetBool("autoConnection"),
SendRate: r.GetFloat("sendRate"),
RecvRate: r.GetFloat("recvRate"),
GeoLocation: r.Get("geoLocation"),
Log: r.Get("log"),
Auth: r.Get("auth"),
Transport: r.Get("transport"),
Metadatas: r.Get("metadatas"),
Created: r.GetString("created"),
Updated: r.GetString("updated"),
NetworkStatus: latencyMap[r.Id],
})
}
return e.JSON(200, serverListResponse{
Page: page,
PerPage: perPage,
TotalItems: total,
TotalPages: totalPages,
Items: items,
})
}))
// Probe history for a single server — last 30 minutes of latency data.
e.Router.GET("/api/servers/probe-history", requireAuth(func(e *core.RequestEvent) error {
serverID := e.Request.URL.Query().Get("serverId")
if serverID == "" {
return e.JSON(400, response.Error(fmt.Errorf("serverId is required")))
}
since := time.Now().UTC().Add(-30 * time.Minute).Format("2006-01-02 15:04:05.000Z")
type row struct {
T string `db:"t"`
Val float64 `db:"val"`
}
var rows []row
err := h.app.DB().
NewQuery(`
SELECT r.t, r.val
FROM fh_metrics_raw r
INNER JOIN fh_metrics_targets t ON r.targetId = t.id
WHERE t.serverId = {:serverId}
AND r.metricKey = {:key}
AND r.t >= {:since}
ORDER BY r.t ASC
LIMIT 500
`).
Bind(dbx.Params{
"serverId": serverID,
"key": monitoring.MetricKeyFrpsDelay,
"since": since,
}).
All(&rows)
if err != nil {
return e.JSON(500, response.Error(err))
}
points := make([]probePoint, 0, len(rows))
for _, r := range rows {
points = append(points, probePoint{T: r.T, Val: r.Val})
}
return e.JSON(200, points)
}))
// Flat server list for dropdowns, with latest latency assembled.
e.Router.GET("/api/servers/options", requireAuth(func(e *core.RequestEvent) error {
records, err := h.app.FindRecordsByFilter("fh_servers", "", "-created", 500, 0)
if err != nil {
return e.JSON(500, response.Error(err))
}
latencyMap, err := h.metricsService.GetLatestLatencyBatch()
if err != nil {
h.app.Logger().Warn("Failed to get latency batch for options", "error", err)
latencyMap = map[string]*monitoring.NetworkStatus{}
}
items := make([]serverOptionVO, 0, len(records))
for _, r := range records {
items = append(items, serverOptionVO{
ID: r.Id,
ServerName: r.GetString("serverName"),
BootStatus: r.GetString("bootStatus"),
NetworkStatus: latencyMap[r.Id],
})
}
return e.JSON(200, items)
}))
}
+8 -3
View File
@@ -2,9 +2,9 @@ package main
import (
"embed"
"github.com/spf13/cobra"
"io/fs"
"log"
"github.com/spf13/cobra"
"podux/internal/application/dashboard"
"podux/internal/application/frpc"
@@ -45,8 +45,10 @@ func main() {
frpcService := frpc.NewService(app, serverRepo, proxyRepo)
dashboardService := dashboard.NewService(app, serverService, proxyService)
settingsService := system.NewService(app)
networkService := monitoring.NewNetworkService(app)
networkMonitorService := monitoring.NewMonitorService(app, networkService)
geoService := monitoring.NewGeoService(app)
metricsService := monitoring.NewMetricsService(app)
metricsScheduler := monitoring.NewMetricsScheduler(app, metricsService)
networkMonitorService := monitoring.NewMonitorService(app, geoService, metricsService)
importService := importer.NewService(app)
versionService := version.NewService(app)
//githubService := github.NewService(app)
@@ -58,6 +60,7 @@ func main() {
dashboardHandler := httphandler.NewDashboardHandler(dashboardService)
systemHandler := httphandler.NewSystemHandler(app, settingsService)
importHandler := httphandler.NewImportHandler(app, importService)
serverHandler := httphandler.NewServerHandler(app, metricsService)
// Hook: Reload frpc when proxy is updated
app.OnRecordAfterUpdateSuccess("fh_proxies").BindFunc(func(e *core.RecordEvent) error {
@@ -87,6 +90,7 @@ func main() {
// Start network monitoring service using intervals from settings
latencyInterval, geoInterval := settingsService.GetMonitoringIntervals()
networkMonitorService.Start(latencyInterval, geoInterval)
metricsScheduler.Register()
// Register routes for each module
//githubHandler.RegisterHandlers(e)
@@ -95,6 +99,7 @@ func main() {
dashboardHandler.RegisterHandlers(e)
systemHandler.RegisterHandlers(e)
importHandler.RegisterHandlers(e)
serverHandler.RegisterHandlers(e)
// Serve static files from embedded FS
content, err := fs.Sub(pbPublicDir, "pb_public")
@@ -1,40 +0,0 @@
package migrations
import (
"encoding/json"
"github.com/pocketbase/pocketbase/core"
m "github.com/pocketbase/pocketbase/migrations"
)
func init() {
m.Register(func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("pbc_3738798621")
if err != nil {
return err
}
// update collection data
if err := json.Unmarshal([]byte(`{
"listRule": null
}`), &collection); err != nil {
return err
}
return app.Save(collection)
}, func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("pbc_3738798621")
if err != nil {
return err
}
// update collection data
if err := json.Unmarshal([]byte(`{
"listRule": "@request.auth.id != ''"
}`), &collection); err != nil {
return err
}
return app.Save(collection)
})
}
@@ -1,40 +0,0 @@
package migrations
import (
"encoding/json"
"github.com/pocketbase/pocketbase/core"
m "github.com/pocketbase/pocketbase/migrations"
)
func init() {
m.Register(func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("pbc_3738798621")
if err != nil {
return err
}
// update collection data
if err := json.Unmarshal([]byte(`{
"listRule": ""
}`), &collection); err != nil {
return err
}
return app.Save(collection)
}, func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("pbc_3738798621")
if err != nil {
return err
}
// update collection data
if err := json.Unmarshal([]byte(`{
"listRule": null
}`), &collection); err != nil {
return err
}
return app.Save(collection)
})
}
@@ -1,40 +0,0 @@
package migrations
import (
"encoding/json"
"github.com/pocketbase/pocketbase/core"
m "github.com/pocketbase/pocketbase/migrations"
)
func init() {
m.Register(func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("pbc_3738798621")
if err != nil {
return err
}
// update collection data
if err := json.Unmarshal([]byte(`{
"listRule": "@request.auth.id != ''"
}`), &collection); err != nil {
return err
}
return app.Save(collection)
}, func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("pbc_3738798621")
if err != nil {
return err
}
// update collection data
if err := json.Unmarshal([]byte(`{
"listRule": ""
}`), &collection); err != nil {
return err
}
return app.Save(collection)
})
}
@@ -1,41 +0,0 @@
package migrations
import (
"github.com/pocketbase/pocketbase/core"
m "github.com/pocketbase/pocketbase/migrations"
)
func init() {
m.Register(func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("pbc_2245327697")
if err != nil {
return err
}
// add field
if err := collection.Fields.AddMarshaledJSONAt(12, []byte(`{
"hidden": false,
"id": "json3916310420",
"maxSize": 0,
"name": "plugin",
"presentable": false,
"required": false,
"system": false,
"type": "json"
}`)); err != nil {
return err
}
return app.Save(collection)
}, func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("pbc_2245327697")
if err != nil {
return err
}
// remove field
collection.Fields.RemoveById("json3916310420")
return app.Save(collection)
})
}
@@ -1,45 +0,0 @@
package migrations
import (
"github.com/pocketbase/pocketbase/core"
m "github.com/pocketbase/pocketbase/migrations"
)
func init() {
m.Register(func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("pbc_3738798621")
if err != nil {
return err
}
// add field
if err := collection.Fields.AddMarshaledJSONAt(14, []byte(`{
"autogeneratePattern": "",
"hidden": false,
"id": "text2375276105",
"max": 0,
"min": 0,
"name": "user",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "text"
}`)); err != nil {
return err
}
return app.Save(collection)
}, func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("pbc_3738798621")
if err != nil {
return err
}
// remove field
collection.Fields.RemoveById("text2375276105")
return app.Save(collection)
})
}
@@ -958,6 +958,16 @@ func init() {
"offline"
]
},
{
"hidden": false,
"id": "json3916310420",
"maxSize": 0,
"name": "plugin",
"presentable": false,
"required": false,
"system": false,
"type": "json"
},
{
"hidden": false,
"id": "autodate2990389176",
@@ -1154,14 +1164,18 @@ func init() {
"type": "json"
},
{
"autogeneratePattern": "",
"hidden": false,
"id": "json948844010",
"maxSize": 0,
"name": "networkStatus",
"id": "text2375276105",
"max": 0,
"min": 0,
"name": "user",
"pattern": "",
"presentable": false,
"primaryKey": false,
"required": false,
"system": false,
"type": "json"
"type": "text"
},
{
"hidden": false,
@@ -1337,6 +1351,345 @@ func init() {
"type": "base",
"updateRule": "@request.auth.id != ''",
"viewRule": "@request.auth.id != ''"
},
{
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"cascadeDelete": false,
"collectionId": "pbc_1442576311",
"hidden": false,
"id": "relation361630566",
"maxSelect": 1,
"minSelect": 0,
"name": "targetId",
"presentable": false,
"required": true,
"system": false,
"type": "relation"
},
{
"hidden": false,
"id": "select2505851765",
"maxSelect": 1,
"name": "metricKey",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"frps_delay"
]
},
{
"hidden": false,
"id": "date2238339752",
"max": "",
"min": "",
"name": "t",
"presentable": false,
"required": true,
"system": false,
"type": "date"
},
{
"hidden": false,
"id": "number2548021861",
"max": null,
"min": null,
"name": "val",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}
],
"id": "pbc_793044944",
"indexes": [
"CREATE INDEX ` + "`" + `idx_ccjpJ7y6sJ` + "`" + ` ON ` + "`" + `fh_metrics_raw` + "`" + ` (\n ` + "`" + `targetId` + "`" + `,\n ` + "`" + `t` + "`" + `,\n ` + "`" + `metricKey` + "`" + `\n)"
],
"listRule": null,
"name": "fh_metrics_raw",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
},
{
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"cascadeDelete": false,
"collectionId": "pbc_3738798621",
"hidden": false,
"id": "relation2665642495",
"maxSelect": 1,
"minSelect": 0,
"name": "serverId",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"cascadeDelete": false,
"collectionId": "pbc_2245327697",
"hidden": false,
"id": "relation2990786978",
"maxSelect": 1,
"minSelect": 0,
"name": "proxyId",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
}
],
"id": "pbc_1442576311",
"indexes": [],
"listRule": null,
"name": "fh_metrics_targets",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
},
{
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"cascadeDelete": false,
"collectionId": "pbc_1442576311",
"hidden": false,
"id": "relation361630566",
"maxSelect": 1,
"minSelect": 0,
"name": "targetId",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"hidden": false,
"id": "select2505851765",
"maxSelect": 1,
"name": "metricKey",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"frps_delay"
]
},
{
"hidden": false,
"id": "date2238339752",
"max": "",
"min": "",
"name": "t",
"presentable": false,
"required": false,
"system": false,
"type": "date"
},
{
"hidden": false,
"id": "number4252428468",
"max": null,
"min": null,
"name": "valAvg",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
},
{
"hidden": false,
"id": "number2095552691",
"max": null,
"min": null,
"name": "valMax",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
},
{
"hidden": false,
"id": "number1089120234",
"max": null,
"min": null,
"name": "valMin",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}
],
"id": "pbc_316017333",
"indexes": [
"CREATE INDEX ` + "`" + `idx_er76FRWKT4` + "`" + ` ON ` + "`" + `fh_metrics_hourly` + "`" + ` (\n ` + "`" + `metricKey` + "`" + `,\n ` + "`" + `targetId` + "`" + `,\n ` + "`" + `t` + "`" + `\n)"
],
"listRule": null,
"name": "fh_metrics_hourly",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
},
{
"createRule": null,
"deleteRule": null,
"fields": [
{
"autogeneratePattern": "[a-z0-9]{15}",
"hidden": false,
"id": "text3208210256",
"max": 15,
"min": 15,
"name": "id",
"pattern": "^[a-z0-9]+$",
"presentable": false,
"primaryKey": true,
"required": true,
"system": true,
"type": "text"
},
{
"cascadeDelete": false,
"collectionId": "pbc_1442576311",
"hidden": false,
"id": "relation962958965",
"maxSelect": 1,
"minSelect": 0,
"name": "targetId",
"presentable": false,
"required": false,
"system": false,
"type": "relation"
},
{
"hidden": false,
"id": "select2505851765",
"maxSelect": 1,
"name": "metricKey",
"presentable": false,
"required": false,
"system": false,
"type": "select",
"values": [
"frps_delay"
]
},
{
"hidden": false,
"id": "date2238339752",
"max": "",
"min": "",
"name": "t",
"presentable": false,
"required": false,
"system": false,
"type": "date"
},
{
"hidden": false,
"id": "number4252428468",
"max": null,
"min": null,
"name": "valAvg",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
},
{
"hidden": false,
"id": "number3814843458",
"max": null,
"min": null,
"name": "valMax",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
},
{
"hidden": false,
"id": "number3748453147",
"max": null,
"min": null,
"name": "valMin",
"onlyInt": false,
"presentable": false,
"required": false,
"system": false,
"type": "number"
}
],
"id": "pbc_3875966484",
"indexes": [
"CREATE INDEX ` + "`" + `idx_cytGPviJew` + "`" + ` ON ` + "`" + `fh_metrics_daily` + "`" + ` (\n ` + "`" + `targetId` + "`" + `,\n ` + "`" + `metricKey` + "`" + `,\n ` + "`" + `t` + "`" + `\n)"
],
"listRule": null,
"name": "fh_metrics_daily",
"system": false,
"type": "base",
"updateRule": null,
"viewRule": null
}
]`
+1 -1
View File
@@ -2,4 +2,4 @@ package buildinfo
// AppVersion is the single source of truth for the application version.
// Update this value to release a new version.
const AppVersion = "0.1.2"
const AppVersion = "0.1.4"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "podux-web",
"private": true,
"version": "0.1.2",
"version": "0.1.4",
"type": "module",
"scripts": {
"dev": "vite",
Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

+4
View File
@@ -29,6 +29,9 @@ const ProxyFormPage = lazy(() =>
const ServerFormPage = lazy(() =>
import("./pages/Servers/ServerFormPage").then((m) => ({ default: m.ServerFormPage }))
);
const ServerLogPage = lazy(() =>
import("./pages/ServerLog/ServerLogPage").then((m) => ({ default: m.ServerLogPage }))
);
function AuthenticatedLayout() {
console.log("AuthenticatedLayout rendered");
@@ -71,6 +74,7 @@ function App() {
<Route path="/servers/new" element={<ServerFormPage />} />
<Route path="/servers/:id/edit" element={<ServerFormPage />} />
<Route path="/servers/:id" element={<ServerDetailPage />} />
<Route path="/servers/:id/logs" element={<ServerLogPage />} />
<Route path="/settings" element={<SettingsPage />} />
<Route path="/import" element={<ImportPage />} />
{/* <Route path="/versions" element={<VersionPage />} /> */}
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by Pixelmator Pro 3.7 -->
<svg width="814" height="814" viewBox="0 0 814 814" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<image id="image1" x="34" y="32" width="373" height="751" xlink:href="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAXUAAALvCAYAAACa6FV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9kagnPBy8XDbkUtTIoCPmluoQZM04v1K7ePQvCmYYSToC3Uob5OMOJq0DbMHxgGBNBZj/ZtauecvuQhwM+6IK1ATbNLBlp6iFAA1NyBy5KknHZ11GViWyrkpKNtmW+v7RcDr/XgwBFhwRNODBc5wbp7PTlQ3+tvyPHnJLBHJVBf+ujbL547/n9PnX6qPAqTy+FJhLJF6Fof4XPpsqigSSDV683O+ogK2LzXdmyj+fRy4XXvAS8VbDatNnACsSaloff9/XfocoRAohYvvu5Afpp0WE5tX0h6mSWptMd/nPllj78gx56TwF6UQLz2yVctz5z51ekLz42HrVWsEoW23eQKTK7zx96hgMcutFqAhqYLkEzAHtq4j/vexBaJSt1bYDVnaO+CuiyjmyJMJBn4o2fzCKMLAGb8ljbMMSQhYJ2YW/iFIAn5FtRtv6K9s7vEHiP3MoBwgMDAQTBHIb8ooP1jGaxZtYT29m+/VPc2t447JwEngRdcAvHKJw7euHby/zrz3JLine truncated
<image id="image2" x="147" y="67" width="119" height="152" xlink:href="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAHcAAACYCAYAAADeK3bdAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAd6ADAAQAAAABAAAAmAAAAADmtKHkAAAk/ElEQVR4Ae2dB5SURbbHv+7JM+SkAgooQQQDDxBF1MWIiKLrE1F0FdCHC4gKiCCoRAN6BNE1rG8fuG8R8751DbDqcVdUVo8BFUFJkjMySJg88+6v2jtT803H6Z6Zbuw65+vKVbfuv27lqvY4SRUzDpSVlXlWrVp1dElJSWpRUVF+ampqcWlpafbhw4cdr9dbnJ2dXSjmdDJMT08vLSws9EoYLzr+Sgh+mCUNo2NOS0vzqj0rK6u0uLg4NT8//2D9+vUbSNyivLy8jAMHDuzu27dv8csvv5wyaNCgEg8Rkyo8Dgh4qe+///6QzZs3DxbGdvz555+b79y5M1sY6xGAHNGdgwcPGrOA6kh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NiSPf1sb49V2FHpeLAADfz3PZKEX6xVCdMOHHCyUvB1/Swl4hkeqUy+yqyx0x1kFw2PH744QenabOmzjNPPd3jpJNO2uAvj2jcalRyZVR8okjsM3INw/SxNLsMnCgoH4VntFhxENs3l6VAyiB/hVM/Zaa/MMHc7Hi2OVgcf37uuNDFp+7MAHSASLnZeGecwSH37Tt3OPUbNnBmTp/xxmmnnfaVv/SjdasxcOV6xiW33377KvZgTznlFDPdkRP+5SNFZQR9DsxQwCIpkL84ythw01EwIo0XLH3SpFymbNIgsayoW5MAzlmvn2RT4K5x4zded911A4OlFY1fjYDLkuITTzzxd9GdVq1aGSmlcCqtjI4VUBjhYzDNcuzIiRQsaIi1oqXiRAXTHZriho0bmfEF11YuvPDC0jvvvLNtrPO004t5iTgOM2nSpJ8XL16cyjyW9VKW1HwA+iSUQruZqWCHAiVUONK187ILizlUfHf46tq1fAyadDZAWmvW/OD07NmrbPHExemevp6KS0bVzShIvJgPqOQA+LYFCxbUZ1endetjpY/NLwfXZnooEIPQXKVi2GEVXNyUwbZ/bZhNBZLTi8VSiYuln5UL0qav5UhqU+HLH5566jet+7T+saZpiV07KJT++c9/fnXRooXNOV/LMhonJnQApQWh4NEASzrRxq9p0LWC0Q0xl6XPpZ8F5Cn33rsk2Flj5VMs9JiBKwfYps+cOfOqgwcPO8cff7z0MykCbJ6hkT7HBjUacKoLjJ2nOw23PRaM5YBbemqaOXbLac19e39yJk2cuH7osKH9YpF+OGnErFkWCX1PbtN52I9lRMigCaWMs8FVNzeBgdzd4YLZSUPTQSdf205ct3uw9CL1I23d6UFyuRS9YcMG54orryyW2+7NIk0vmvAxkVxZ7N4qS2je9u3bm5UYCqeDJgWVQusXiGBbugKFwV3T8afjr+n4A9btjz0yBct8bCN/8tBZADqj4yw5QE5zTIvFOnqfPn3KpkyZEvEZqMjoqho6anCff/7592Ta05KCcJvOrWBAvCgFXempLm0KKhW4fD4rINNaUbGZ9Line truncated
<image id="image3" x="181" y="67" width="599" height="672" xl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Kya5rCREBXrgqzXrVUGULgk5/8ZKe5mb0EW4IYtLGCxTeS5ETB7P3CGKd2uBDAhKz1lVydALdohtiCxs9NZShV/Jme8kCJwioVbGkYT3rkDzqYiHyR1S18tRJpK8oj3wut6NffbhkeaGv3NmzY4FXX1tj+X1td45177hfuPenkk35jboxfdeqppzbL/NRdfAioclV8da4lThKBGTNmfPriiy9+uqGhwW4J4gAsDJQraeTkIcPVXRgIUBEojNLEVwoqIdHs+DgFU7HfSDuYOnoM5IRSBJuGfoTJcMYjX9YtVqjw4wMU7rDDlxiwtYhw6Gq4Kb6iotIqWQfbD3j4DA/4Hjl+/Af/9o1/+7y5S2v1SSedtIf81S4uBFS5Kq761tKmgMD3v//9p/785z+fjcOtuIQQylVkoC21NgfmFLLQpHmKQD7XvZ+ike1qgAxUfpi362d4kA0ebj1Ivohzy+r6kSdXsPDQRD/PaOF8Fn5VVZX2gHxpaeSsZefBDvvWMOj3t0c+3I5PYuENwwsvvPBfJ0+evCVIbg0vTARUuSrMetVSpRmB1atX1/3zPLine truncated
<image id="image4" x="330" y="67" width="450" height="424" xlink:href="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAcIAAAGoCAYAAADVd+V5AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABwqADAAQAAAABAAABqAAAAAAUS/DFAABAAElEQVR4Aey9B7xfRZn/f25Jvek9oSWQ0GFFXJYVFBALlrXB4orKuu7+LKis/lUUFt3lx8/V1dV1wYawrKKgIJ3QWwihhRJqIIQSkkACpPd673/e883n3snkfOv99vvM6/X9PlOfeeYzc57nzJw5c1qSPui6urpaH3300bbDDz98u6MDt23b1r5x48YNu+++e9ubb77ZOnHixK7ly5dvHz58eGsIz5YtW7r69+/forjVq1d3yg9du3Ztl8LHHntst19x0BkzZrSEaYTDdNKcTK1ONnh3uXQvw44yPhyUj8PdrHbUs91FtNBWZBNvMmWR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30m+2t6BJrSEF544YW//PrXv/6lCZMmZpZF33jT3/1xBLine truncated
</svg>

After

Width:  |  Height:  |  Size: 340 KiB

+272
View File
@@ -0,0 +1,272 @@
import { useEffect, useState } from "react";
import { Flex, Text } from "@radix-ui/themes";
import { motion, AnimatePresence } from "framer-motion";
import { useTranslation } from "react-i18next";
import {
AreaChart,
Area,
XAxis,
YAxis,
CartesianGrid,
Tooltip,
ResponsiveContainer,
} from "recharts";
import { apiGet } from "../lib/api";
interface ProbePoint {
t: string;
val: number;
}
interface ChartPoint {
time: string;
ms: number;
}
function toChartPoints(points: ProbePoint[]): ChartPoint[] {
return points
.filter((p) => p.val >= 0)
.map((p) => ({
time: new Date(p.t.replace(" ", "T").replace(/Z$/, "+00:00")).toLocaleTimeString([], {
hour: "2-digit",
minute: "2-digit",
second: "2-digit",
}),
ms: Math.round(p.val),
}));
}
// ── Custom tooltip ────────────────────────────────────────────────────────────
interface CustomTooltipProps {
active?: boolean;
payload?: { value: number }[];
label?: string;
}
function CustomTooltip({ active, payload, label }: CustomTooltipProps) {
if (!active || !payload?.length) return null;
return (
<motion.div
initial={{ opacity: 0, scale: 0.92, y: -4 }}
animate={{ opacity: 1, scale: 1, y: 0 }}
transition={{ duration: 0.15, ease: "easeOut" }}
style={{
background: "var(--color-panel-solid)",
border: "1px solid var(--gray-5)",
borderRadius: 10,
padding: "8px 12px",
boxShadow: "0 8px 24px rgba(0,0,0,0.14)",
}}
>
<Text size="1" color="gray">{label}</Text>
<Flex align="center" gap="2" mt="1">
<motion.div
animate={{ scale: [1, 1.3, 1] }}
transition={{ repeat: Infinity, duration: 1.5, ease: "easeInOut" }}
style={{ width: 8, height: 8, borderRadius: "50%", background: "var(--green-9)" }}
/>
<Text size="2" weight="bold">{payload[0].value}ms</Text>
</Flex>
</motion.div>
);
}
// ── Pulsing dot on the last data point ───────────────────────────────────────
interface DotProps {
cx?: number;
cy?: number;
index?: number;
dataLength: number;
}
function PulsingDot({ cx = 0, cy = 0, index = 0, dataLength }: DotProps) {
if (index !== dataLength - 1) return null;
return (
<g>
<circle cx={cx} cy={cy} r={4} fill="var(--green-9)" />
<circle cx={cx} cy={cy} r={4} fill="var(--green-9)" opacity={0.5}>
<animate attributeName="r" from="4" to="14" dur="1.6s" repeatCount="indefinite" />
<animate attributeName="opacity" from="0.5" to="0" dur="1.6s" repeatCount="indefinite" />
</circle>
</g>
);
}
// ── Skeleton loader ───────────────────────────────────────────────────────────
function ChartSkeleton() {
// Fake wave path to mimic a latency curve
const path = "M0,60 C20,55 40,70 60,50 C80,30 100,65 120,45 C140,25 160,55 180,40 C200,25 220,50 240,35 C260,20 280,45 300,30 C320,15 340,40 360,25";
return (
<svg width="100%" height={180} style={{ overflow: "hidden" }}>
<defs>
<linearGradient id="shimmer" x1="0" y1="0" x2="1" y2="0">
<stop offset="0%" stopColor="var(--gray-3)" />
<stop offset="40%" stopColor="var(--gray-5)" />
<stop offset="100%" stopColor="var(--gray-3)" />
<animateTransform
attributeName="gradientTransform"
type="translate"
from="-1 0"
to="2 0"
dur="1.4s"
repeatCount="indefinite"
/>
</linearGradient>
<clipPath id="skeletonClip">
<rect x="0" y="0" width="100%" height="100%" />
</clipPath>
</defs>
{/* Fake grid lines */}
{[40, 80, 120, 160].map((y) => (
<line key={y} x1="52" y1={y} x2="100%" y2={y} stroke="var(--gray-3)" strokeDasharray="4 4" />
))}
{/* Fake Y-axis labels */}
{[40, 80, 120].map((y, i) => (
<rect key={i} x="0" y={y - 6} width="36" height="10" rx="4" fill="url(#shimmer)" />
))}
{/* Fake curve area */}
<path
d={`${path} L360,180 L0,180 Z`}
fill="url(#shimmer)"
opacity={0.5}
clipPath="url(#skeletonClip)"
/>
{/* Fake curve line */}
<path d={path} fill="none" stroke="url(#shimmer)" strokeWidth="2" />
</svg>
);
}
// ── Main component ────────────────────────────────────────────────────────────
interface LatencyChartProps {
serverId: string;
}
export function LatencyChart({ serverId }: LatencyChartProps) {
const { t } = useTranslation();
const [data, setData] = useState<ChartPoint[]>([]);
const [loading, setLoading] = useState(true);
const [animKey, setAnimKey] = useState(0);
useEffect(() => {
let cancelled = false;
const load = async () => {
try {
const res = await apiGet(`/api/servers/probe-history?serverId=${serverId}`);
if (!res.ok || cancelled) return;
const points: ProbePoint[] = await res.json();
if (cancelled) return;
setData(toChartPoints(points));
setAnimKey((k) => k + 1);
} catch {
// silent
} finally {
if (!cancelled) setLoading(false);
}
};
load();
const interval = setInterval(load, 30_000);
return () => {
cancelled = true;
clearInterval(interval);
};
}, [serverId]);
const isEmpty = !loading && data.length === 0;
return (
<div style={{ position: "relative", height: 180 }}>
<AnimatePresence mode="wait">
{loading ? (
<motion.div
key="skeleton"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
transition={{ duration: 0.25 }}
style={{ position: "absolute", inset: 0 }}
>
<ChartSkeleton />
</motion.div>
) : isEmpty ? (
<motion.div
key="empty"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
style={{ position: "absolute", inset: 0, display: "flex", alignItems: "center", justifyContent: "center" }}
>
<Text size="2" color="gray">{t("server.probeNoData")}</Text>
</motion.div>
) : (
<motion.div
key={`chart-${animKey}`}
initial={{ opacity: 0, clipPath: "inset(0 100% 0 0)" }}
animate={{ opacity: 1, clipPath: "inset(0 0% 0 0)" }}
transition={{ duration: 0.9, ease: [0.25, 0.46, 0.45, 0.94] }}
style={{ position: "absolute", inset: 0 }}
>
<ResponsiveContainer width="100%" height={180}>
<AreaChart data={data} margin={{ top: 8, right: 4, left: -16, bottom: 0 }}>
<defs>
<linearGradient id="latencyGrad" x1="0" y1="0" x2="0" y2="1">
<stop offset="5%" stopColor="var(--green-9)" stopOpacity={0.28} />
<stop offset="95%" stopColor="var(--green-9)" stopOpacity={0} />
</linearGradient>
</defs>
<CartesianGrid strokeDasharray="3 3" stroke="var(--gray-4)" vertical={false} />
<XAxis
dataKey="time"
tick={{ fontSize: 11, fill: "var(--gray-9)" }}
tickLine={false}
axisLine={false}
interval="preserveStartEnd"
/>
<YAxis
tick={{ fontSize: 11, fill: "var(--gray-9)" }}
tickLine={false}
axisLine={false}
tickFormatter={(v) => `${v}ms`}
width={52}
/>
<Tooltip
content={<CustomTooltip />}
cursor={{ stroke: "var(--green-7)", strokeWidth: 1, strokeDasharray: "4 4" }}
/>
<Area
type="monotone"
dataKey="ms"
stroke="var(--green-9)"
strokeWidth={2}
fill="url(#latencyGrad)"
dot={(props: any) => (
<PulsingDot key={props.index} {...props} dataLength={data.length} />
)}
activeDot={{
r: 5,
fill: "var(--green-9)",
stroke: "var(--color-panel-solid)",
strokeWidth: 2,
}}
isAnimationActive={true}
animationDuration={900}
animationEasing="ease-out"
/>
</AreaChart>
</ResponsiveContainer>
</motion.div>
)}
</AnimatePresence>
</div>
);
}
+296
View File
@@ -0,0 +1,296 @@
import { useEffect, useState } from "react";
import { Flex, Text, Tooltip, Badge } from "@radix-ui/themes";
import { motion } from "framer-motion";
import { Icon } from "@iconify/react";
import { useTranslation } from "react-i18next";
import { apiGet } from "../lib/api";
interface ProbePoint {
t: string;
val: number;
}
interface Bucket {
start: number;
end: number;
avg: number | null; // null = no data, -1 = unreachable
}
const BUCKETS = 30;
const WINDOW_MS = 30 * 60 * 1000;
function buildBuckets(points: ProbePoint[]): Bucket[] {
const now = Date.now();
const slotMs = WINDOW_MS / BUCKETS;
const buckets: Bucket[] = Array.from({ length: BUCKETS }, (_, i) => ({
start: now - WINDOW_MS + i * slotMs,
end: now - WINDOW_MS + (i + 1) * slotMs,
avg: null,
}));
for (const p of points) {
const ts = new Date(p.t.replace(" ", "T").replace(/Z$/, "+00:00")).getTime();
const idx = Math.floor((ts - (now - WINDOW_MS)) / slotMs);
if (idx < 0 || idx >= BUCKETS) continue;
const b = buckets[idx];
if (p.val < 0) {
b.avg = -1;
} else if (b.avg === null) {
b.avg = p.val;
} else if (b.avg >= 0) {
b.avg = (b.avg + p.val) / 2;
}
}
return buckets;
}
function bucketGradient(avg: number | null): string {
if (avg === null) return "linear-gradient(to top, var(--gray-4), var(--gray-5))";
if (avg < 0) return "linear-gradient(to top, var(--red-6), var(--red-8))";
if (avg < 50) return "linear-gradient(to top, var(--green-7), var(--green-9))";
if (avg < 150) return "linear-gradient(to top, var(--amber-7), var(--amber-9))";
return "linear-gradient(to top, var(--red-7), var(--red-9))";
}
function bucketGlow(avg: number | null): string {
if (avg === null || avg < 0) return "none";
if (avg < 50) return "0 2px 8px var(--green-a6)";
if (avg < 150) return "0 2px 8px var(--amber-a6)";
return "0 2px 8px var(--red-a6)";
}
function bucketLabel(b: Bucket, noData: string, unreachable: string): string {
const fmt = (ts: number) =>
new Date(ts).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
const range = `${fmt(b.start)} – ${fmt(b.end)}`;
if (b.avg === null) return `${range}\n${noData}`;
if (b.avg < 0) return `${range}\n${unreachable}`;
return `${range}\n${Math.round(b.avg)}ms`;
}
interface ProbeHistoryProps {
serverId: string;
}
export function ProbeHistory({ serverId }: ProbeHistoryProps) {
const { t } = useTranslation();
const [buckets, setBuckets] = useState<Bucket[]>([]);
const [loading, setLoading] = useState(true);
const [animKey, setAnimKey] = useState(0);
useEffect(() => {
let cancelled = false;
const load = async () => {
try {
const res = await apiGet(`/api/servers/probe-history?serverId=${serverId}`);
if (!res.ok || cancelled) return;
const points: ProbePoint[] = await res.json();
if (cancelled) return;
setBuckets(buildBuckets(points));
setAnimKey((k) => k + 1);
} catch {
// silent
} finally {
if (!cancelled) setLoading(false);
}
};
load();
const interval = setInterval(load, 30_000);
return () => {
cancelled = true;
clearInterval(interval);
};
}, [serverId]);
// Stats
const valid = buckets.filter((b) => b.avg !== null);
const reachable = valid.filter((b) => b.avg! >= 0);
const uptime = valid.length > 0 ? (reachable.length / valid.length) * 100 : null;
const avgLatency =
reachable.length > 0
? Math.round(reachable.reduce((s, b) => s + b.avg!, 0) / reachable.length)
: null;
const maxLatency =
reachable.length > 0 ? Math.round(Math.max(...reachable.map((b) => b.avg!))) : null;
const lastActiveIdx = buckets.reduce((last, b, i) => (b.avg !== null ? i : last), -1);
const uptimeColor =
uptime === null ? "gray" : uptime === 100 ? "green" : uptime >= 80 ? "amber" : "red";
return (
<Flex direction="column" gap="4">
{/* Stats row */}
<Flex gap="5" align="center" wrap="wrap">
{/* Overall status */}
<Flex align="center" gap="2">
{uptime === null || loading ? (
<Badge color="gray" variant="soft">
<Icon icon="lucide:loader-2" width="10" height="10" className="animate-spin" />
{t("server.probeChecking")}
</Badge>
) : uptime === 100 ? (
<Badge color="green" variant="soft">
<motion.span
animate={{ opacity: [1, 0.4, 1] }}
transition={{ repeat: Infinity, duration: 2, ease: "easeInOut" }}
style={{ display: "flex", alignItems: "center" }}
>
<Icon icon="lucide:circle" width="8" height="8" />
</motion.span>
{t("server.probeNormal")}
</Badge>
) : uptime >= 80 ? (
<Badge color="amber" variant="soft">
<Icon icon="lucide:alert-circle" width="10" height="10" />
{t("server.probePartial")}
</Badge>
) : (
<Badge color="red" variant="soft">
<Icon icon="lucide:x-circle" width="10" height="10" />
{t("server.probeOutage")}
</Badge>
)}
</Flex>
{/* Divider */}
<div style={{ width: 1, height: 16, background: "var(--gray-5)" }} />
{/* Uptime */}
{uptime !== null && (
<Flex direction="column" gap="0">
<Text size="1" color="gray">{t("server.probeUptime")}</Text>
<Text size="2" weight="bold" color={uptimeColor}>
{uptime.toFixed(1)}%
</Text>
</Flex>
)}
{/* Avg latency */}
{avgLatency !== null && (
<Flex direction="column" gap="0">
<Text size="1" color="gray">{t("server.probeAvgLatency")}</Text>
<Text size="2" weight="bold">{avgLatency}ms</Text>
</Flex>
)}
{/* Peak latency */}
{maxLatency !== null && (
<Flex direction="column" gap="0">
<Text size="1" color="gray">{t("server.probePeakLatency")}</Text>
<Text size="2" weight="bold" color={maxLatency > 150 ? "red" : maxLatency > 50 ? "amber" : undefined}>
{maxLatency}ms
</Text>
</Flex>
)}
</Flex>
{/* Bar grid */}
<Flex
gap="1"
align="end"
style={{ height: 44, position: "relative" }}
>
{loading
? Array.from({ length: BUCKETS }).map((_, i) => (
<motion.div
key={i}
animate={{ opacity: [0.3, 0.6, 0.3] }}
transition={{
repeat: Infinity,
duration: 1.2,
delay: i * 0.04,
ease: "easeInOut",
}}
style={{
flex: 1,
height: 28 + Math.sin(i * 0.5) * 8,
borderRadius: 4,
background: "var(--gray-4)",
}}
/>
))
: buckets.map((b, i) => {
const isLast = i === lastActiveIdx;
return (
<Tooltip key={`${animKey}-${i}`} content={bucketLabel(b, t("server.probeNoData"), t("server.probeUnreachable"))}>
<motion.div
key={animKey}
initial={{ scaleY: 0, opacity: 0 }}
animate={{ scaleY: 1, opacity: b.avg === null ? 0.35 : 1 }}
transition={{
delay: i * 0.018,
duration: 0.35,
ease: [0.34, 1.56, 0.64, 1], // spring-like
}}
whileHover={{
scaleY: 1.18,
filter: "brightness(1.25)",
transition: { duration: 0.12 },
}}
style={{
flex: 1,
height: 36,
borderRadius: 4,
background: bucketGradient(b.avg),
boxShadow: isLast ? bucketGlow(b.avg) : "none",
transformOrigin: "bottom",
cursor: "default",
position: "relative",
overflow: "hidden",
}}
>
{/* Shine overlay */}
<div
style={{
position: "absolute",
inset: 0,
background:
"linear-gradient(to bottom, rgba(255,255,255,0.15) 0%, transparent 60%)",
borderRadius: 4,
pointerEvents: "none",
}}
/>
{/* Pulse on latest active bar */}
{isLast && b.avg !== null && (
<motion.div
animate={{ opacity: [0, 0.4, 0] }}
transition={{
repeat: Infinity,
duration: 2,
ease: "easeInOut",
}}
style={{
position: "absolute",
inset: 0,
background: "rgba(255,255,255,0.5)",
borderRadius: 4,
pointerEvents: "none",
}}
/>
)}
</motion.div>
</Tooltip>
);
})}
</Flex>
{/* Time labels */}
<Flex justify="between" align="center">
<Text size="1" color="gray">{t("server.probe30mAgo")}</Text>
<Flex align="center" gap="2">
<motion.div
animate={{ opacity: [1, 0.3, 1] }}
transition={{ repeat: Infinity, duration: 2, ease: "easeInOut" }}
style={{ width: 6, height: 6, borderRadius: "50%", background: "var(--green-9)" }}
/>
<Text size="1" color="gray">{t("server.probeNow")}</Text>
</Flex>
</Flex>
</Flex>
);
}
+96
View File
@@ -0,0 +1,96 @@
import { useEffect, useRef, useState } from "react";
import { Box, Button, Flex, Heading, Text } from "@radix-ui/themes";
import { Icon } from "@iconify/react";
import { useTranslation } from "react-i18next";
import pb from "../lib/pocketbase";
interface ServerLogViewerProps {
serverId: string;
/** Height of the scrollable log area. Defaults to 300px. */
height?: number | string;
/** Whether to show the card heading. Defaults to true. */
showHeading?: boolean;
}
export function ServerLogViewer({ serverId, height = 300, showHeading = true }: ServerLogViewerProps) {
const { t } = useTranslation();
const [logs, setLogs] = useState<string[]>([]);
const containerRef = useRef<HTMLDivElement>(null);
// SSE log streaming
useEffect(() => {
const token = pb.authStore.token;
const es = new EventSource(`/api/frpc/logs/stream?id=${serverId}&token=${token}`);
const MAX_LOGS = 500;
es.onmessage = (event) => {
setLogs((prev) => {
const next = [...prev, event.data];
return next.length > MAX_LOGS ? next.slice(next.length - MAX_LOGS) : next;
});
};
es.onerror = () => {
es.close();
};
return () => {
es.close();
};
}, [serverId]);
// Auto-scroll to bottom on new logs
useEffect(() => {
if (containerRef.current) {
containerRef.current.scrollTop = containerRef.current.scrollHeight;
}
}, [logs]);
return (
<Flex direction="column" gap="3">
{showHeading && (
<Flex justify="between" align="center">
<Heading size="4">{t("server.connectionLogs")}</Heading>
<Button size="1" variant="soft" onClick={() => setLogs([])}>
<Icon icon="lucide:trash-2" width="14" height="14" />
{t("server.clear")}
</Button>
</Flex>
)}
{!showHeading && (
<Flex justify="end">
<Button size="1" variant="soft" onClick={() => setLogs([])}>
<Icon icon="lucide:trash-2" width="14" height="14" />
{t("server.clear")}
</Button>
</Flex>
)}
<Box
ref={containerRef}
style={{
backgroundColor: "var(--gray-2)",
borderRadius: "var(--radius-3)",
padding: "1rem",
fontFamily: "monospace",
fontSize: "0.9rem",
height,
overflowY: "auto",
}}
>
{logs.length > 0 ? (
logs.map((log, index) => (
<div key={index} style={{ marginBottom: "4px" }}>
<Text color="gray">{log}</Text>
</div>
))
) : (
<Text color="gray" style={{ fontStyle: "italic" }}>
{t("server.noLogsAvailable")}
</Text>
)}
</Box>
</Flex>
);
}
+7
View File
@@ -1,5 +1,12 @@
@import "tailwindcss";
/* Remove focus outline on all recharts SVG surfaces */
.recharts-surface,
.recharts-legend-wrapper,
.recharts-legend-wrapper * {
outline: none !important;
}
/* Status Indicator Dot — Green pulse (online) */
@keyframes status-pulse-green {
0% {
+22 -2
View File
@@ -9,7 +9,7 @@ import { motion, AnimatePresence } from "framer-motion";
import { PageTransition } from "../components/PageTransition";
import { ThemeToggle } from "../components/ThemeToggle";
import { LanguageToggle } from "../components/LanguageToggle";
import logo from "../assets/logo.png";
import logo from "../assets/logo.svg";
import { Icon } from "@iconify/react";
interface MainLayoutProps {
@@ -83,6 +83,7 @@ export function MainLayout({ children }: MainLayoutProps) {
const [appVersion, setAppVersion] = useState<string>("");
const [latestVersion, setLatestVersion] = useState<string>("");
const [releaseUrl, setReleaseUrl] = useState<string>("");
const [releaseBody, setReleaseBody] = useState<string>("");
const updateAvailable = appVersion && latestVersion ? isNewerVersion(latestVersion, appVersion) : false;
useEffect(() => {
@@ -96,6 +97,7 @@ export function MainLayout({ children }: MainLayoutProps) {
.then((data) => {
if (data.tag_name) setLatestVersion(data.tag_name);
if (data.html_url) setReleaseUrl(data.html_url);
if (data.body) setReleaseBody(data.body);
})
.catch(() => {});
}, []);
@@ -222,7 +224,7 @@ export function MainLayout({ children }: MainLayoutProps) {
/>
</motion.div>
</Popover.Trigger>
<Popover.Content style={{ maxWidth: 280 }}>
<Popover.Content style={{ maxWidth: 320 }}>
<Flex direction="column" gap="3">
<Flex align="center" gap="2">
<Icon icon="lucide:package" width="16" height="16" style={{ color: "var(--amber-11)" }} />
@@ -240,6 +242,24 @@ export function MainLayout({ children }: MainLayoutProps) {
<Text size="1" weight="medium" style={{ color: "var(--amber-11)" }}>{latestVersion}</Text>
</Flex>
</Flex>
{releaseBody && (
<Flex direction="column" gap="1">
<Text size="1" color="gray" weight="medium">{t("version.releaseNotes")}</Text>
<Box
style={{
maxHeight: 160,
overflowY: "auto",
backgroundColor: "var(--gray-a2)",
borderRadius: "var(--radius-2)",
padding: "8px",
}}
>
<Text size="1" style={{ whiteSpace: "pre-wrap", wordBreak: "break-word" }}>
{releaseBody}
</Text>
</Box>
</Flex>
)}
{releaseUrl && (
<a href={releaseUrl} target="_blank" rel="noopener noreferrer" className="no-underline">
<Flex
+21 -2
View File
@@ -238,7 +238,24 @@
"startSuccess": "Server started successfully",
"startFailed": "Failed to start server",
"stopSuccess": "Server stopped successfully",
"stopFailed": "Failed to stop server"
"stopFailed": "Failed to stop server",
"statusCard": "Server Status",
"latencyChartCard": "Latency History",
"probeNormal": "Normal",
"probePartial": "Partial Outage",
"probeOutage": "Outage",
"probeChecking": "Checking",
"probeUptime": "Uptime",
"probeAvgLatency": "Avg Latency",
"probePeakLatency": "Peak Latency",
"probeNoData": "No data",
"probeUnreachable": "Unreachable",
"probeNow": "Now",
"probe30mAgo": "30 min ago",
"latencyMs": "Latency (ms)",
"viewLogs": "Logs",
"viewLogsDesc": "Real-time connection log stream",
"backToDetail": "Back to Details"
},
"proxy": {
"title": "Proxies",
@@ -281,6 +298,7 @@
"customDomainsLabel": "Custom Domains",
"customDomainsPlaceholder": "example.com, www.example.com",
"customDomainsDesc": "Multiple domains separated by commas",
"addCustomDomain": "Add Domain",
"subdomain": "Subdomain",
"subdomainPlaceholder": "myapp",
"subdomainDesc": "Subdomain for the proxy",
@@ -391,7 +409,8 @@
"checkUpdate": "Check for Updates",
"upToDate": "You are up to date",
"updateAvailable": "Update Available",
"updateNow": "View Release"
"updateNow": "View Release",
"releaseNotes": "Release Notes"
},
"import": {
"title": "Import",
+21 -2
View File
@@ -238,7 +238,24 @@
"startSuccess": "服务器启动成功",
"startFailed": "服务器启动失败",
"stopSuccess": "服务器停止成功",
"stopFailed": "服务器停止失败"
"stopFailed": "服务器停止失败",
"statusCard": "服务器状态",
"latencyChartCard": "延迟曲线",
"probeNormal": "正常",
"probePartial": "部分异常",
"probeOutage": "异常",
"probeChecking": "检测中",
"probeUptime": "可达率",
"probeAvgLatency": "平均延迟",
"probePeakLatency": "峰值延迟",
"probeNoData": "无数据",
"probeUnreachable": "不可达",
"probeNow": "现在",
"probe30mAgo": "30 分钟前",
"latencyMs": "延迟 (ms)",
"viewLogs": "日志",
"viewLogsDesc": "实时连接日志流",
"backToDetail": "返回详情"
},
"proxy": {
"title": "代理",
@@ -281,6 +298,7 @@
"customDomainsLabel": "自定义域名",
"customDomainsPlaceholder": "example.com, www.example.com",
"customDomainsDesc": "多个域名用逗号分隔",
"addCustomDomain": "添加域名",
"subdomain": "子域名",
"subdomainPlaceholder": "myapp",
"subdomainDesc": "代理的子域名",
@@ -391,7 +409,8 @@
"checkUpdate": "检查更新",
"upToDate": "已是最新版本",
"updateAvailable": "有可用更新",
"updateNow": "查看发布"
"updateNow": "查看发布",
"releaseNotes": "更新内容"
},
"import": {
"title": "导入",
@@ -1,11 +0,0 @@
.recharts-legend-wrapper {
outline: none !important;
}
.recharts-legend-wrapper * {
outline: none !important;
}
.recharts-surface {
outline: none !important;
}
@@ -14,7 +14,6 @@ import { Link } from "react-router-dom";
import { motion } from "framer-motion";
import { AnimateNumber } from "../../components/AnimateNumber";
import { useTranslation } from "react-i18next";
import "./DashboardPage.css";
interface DashboardViewProps {
stats: DashboardStats;
@@ -271,6 +270,8 @@ export function DashboardView({ stats, topology }: DashboardViewProps) {
borderRadius: "var(--radius-3)",
fontSize: "12px",
}}
labelStyle={{ color: "var(--gray-12)" }}
itemStyle={{ color: "var(--gray-12)" }}
/>
<Legend />
</PieChart>
+1 -1
View File
@@ -5,7 +5,7 @@ import { PageTransition } from "../../components/PageTransition";
import { ThemeToggle } from "../../components/ThemeToggle";
import { LanguageToggle } from "../../components/LanguageToggle";
import { Icon } from "@iconify/react";
import logo from "../../assets/logo.png";
import logo from "../../assets/logo.svg";
import { useTranslation } from "react-i18next";
interface LoginViewProps {
@@ -58,7 +58,7 @@ interface ProxyFormPageViewProps {
isHttpType: boolean;
isSocks5Plugin: boolean;
mounted: boolean;
onChange: (field: keyof ProxyFormData, value: string | boolean) => void;
onChange: (field: keyof ProxyFormData, value: string | boolean | string[]) => void;
onSubmit: () => void;
onCancel: () => void;
onNavigateToServers: () => void;
@@ -240,15 +240,44 @@ export function ProxyFormPageView({
{isHttpType ? (
<>
<FormItem label={t("proxy.customDomainsLabel")}>
<TextField.Root
size="2"
placeholder={t("proxy.customDomainsPlaceholder")}
value={formData.customDomains}
onChange={(e) => onChange("customDomains", e.target.value)}
/>
<Text size="1" color="gray" mt="1">
{t("proxy.customDomainsDesc")}
</Text>
<Flex direction="column" gap="2">
{formData.customDomains.map((domain, index) => (
<Flex key={index} gap="2" align="center">
<TextField.Root
size="2"
style={{ flex: 1 }}
placeholder={`example.com`}
value={domain}
onChange={(e) => {
const next = [...formData.customDomains];
next[index] = e.target.value;
onChange("customDomains", next);
}}
/>
<Button
type="button"
size="2"
variant="soft"
color="red"
onClick={() => {
const next = formData.customDomains.filter((_, i) => i !== index);
onChange("customDomains", next);
}}
>
<Icon icon="lucide:x" />
</Button>
</Flex>
))}
<Button
type="button"
size="2"
variant="soft"
onClick={() => onChange("customDomains", [...formData.customDomains, ""])}
>
<Icon icon="lucide:plus" />
{t("proxy.addCustomDomain")}
</Button>
</Flex>
</FormItem>
<FormItem label={t("proxy.subdomain")}>
<TextField.Root
@@ -2,6 +2,7 @@ import { useState, useEffect } from "react";
import { useNavigate, useParams } from "react-router-dom";
import { useTranslation } from "react-i18next";
import pb from "../../../lib/pocketbase";
import { apiGet } from "../../../lib/api";
import { toast } from "sonner";
import { REGEX } from "../../../lib/regex";
@@ -12,7 +13,7 @@ export interface ProxyFormData {
localIp: string;
localPort: string;
remotePort: string;
customDomains: string;
customDomains: string[];
subdomain: string;
encryption: boolean;
compression: boolean;
@@ -30,7 +31,7 @@ const DEFAULT_FORM: ProxyFormData = {
localIp: "127.0.0.1",
localPort: "",
remotePort: "",
customDomains: "",
customDomains: [],
subdomain: "",
encryption: false,
compression: false,
@@ -68,16 +69,9 @@ export function useProxyForm() {
const fetchServers = async () => {
try {
setLoadingServers(true);
const records = await pb.collection("fh_servers").getFullList({
sort: "-created",
fields: "id,serverName,bootStatus,networkStatus",
});
const list = records.map((r) => ({
id: r.id,
serverName: r.serverName as string,
bootStatus: (r.bootStatus as string) || "stopped",
networkStatus: r.networkStatus as ServerOption["networkStatus"],
}));
const res = await apiGet("/api/servers/options");
if (!res.ok) throw new Error("Failed to fetch servers");
const list: ServerOption[] = await res.json();
setServers(list);
if (list.length > 0 && !isEditing) {
setFormData((prev) => ({ ...prev, serverId: list[0].id }));
@@ -107,7 +101,7 @@ export function useProxyForm() {
localPort: String(record.localPort || ""),
remotePort: String(record.remotePort || ""),
subdomain: (record.subdomain as string) || "",
customDomains: (record.customDomains as string[] | undefined)?.join(", ") || "",
customDomains: (record.customDomains as string[] | undefined) || [],
encryption: (record.transport as Record<string, boolean> | undefined)?.use_encryption || false,
compression: (record.transport as Record<string, boolean> | undefined)?.use_compression || false,
description: (record.description as string) || "",
@@ -145,7 +139,7 @@ export function useProxyForm() {
setErrors((prev) => ({ ...prev, [field]: error }));
};
const handleChange = (field: keyof ProxyFormData, value: string | boolean) => {
const handleChange = (field: keyof ProxyFormData, value: string | boolean | string[]) => {
setFormData((prev) => {
const next = { ...prev, [field]: value };
if (field === "type" && value !== "tcp" && prev.pluginEnabled && prev.pluginType === "socks5") {
@@ -154,6 +148,9 @@ export function useProxyForm() {
return next;
});
if (typeof value === "string") validateField(field, value);
if (Array.isArray(value) && field === "customDomains") {
setErrors((prev) => ({ ...prev, customDomains: undefined }));
}
};
const validate = (data: ProxyFormData): boolean => {
@@ -178,7 +175,7 @@ export function useProxyForm() {
else if (!REGEX.PORT.test(data.remotePort)) newErrors.remotePort = t("proxy.errorInvalidPort");
}
if (isHttp && !data.subdomain && !data.customDomains) {
if (isHttp && !data.subdomain && data.customDomains.length === 0) {
newErrors.subdomain = t("proxy.errorSubdomainRequired");
}
@@ -205,9 +202,7 @@ export function useProxyForm() {
localPort: formData.localPort,
remotePort: formData.remotePort,
subdomain: formData.subdomain,
customDomains: formData.customDomains
? formData.customDomains.split(",").map((d) => d.trim()).filter(Boolean)
: [],
customDomains: formData.customDomains,
transport: {
use_encryption: formData.encryption,
use_compression: formData.compression,
+5 -3
View File
@@ -1,4 +1,4 @@
import { useState, useEffect, useCallback } from "react";
import { useState, useEffect, useCallback, useRef } from "react";
import pb from "../../lib/pocketbase";
import { apiPost } from "../../lib/api";
import { toast } from "sonner";
@@ -25,6 +25,7 @@ export function useProxies() {
const [proxies, setProxies] = useState<Proxy[]>([]);
const [loading, setLoading] = useState(true);
const [refreshing, setRefreshing] = useState(false);
const initializedRef = useRef(false);
const [page, setPage] = useState(1);
const [totalPages, setTotalPages] = useState(1);
@@ -33,7 +34,7 @@ export function useProxies() {
const fetchProxies = useCallback(
async (isRefresh = false) => {
try {
if (!isRefresh && proxies.length === 0) {
if (!initializedRef.current) {
setLoading(true);
} else if (isRefresh) {
setRefreshing(true);
@@ -45,6 +46,7 @@ export function useProxies() {
});
setProxies(result.items);
setTotalPages(result.totalPages);
initializedRef.current = true;
} catch (err) {
if ((err as Record<string, unknown>)?.isAbort) return;
toast.error(err instanceof Error ? err.message : "Failed to fetch proxies");
@@ -53,7 +55,7 @@ export function useProxies() {
setRefreshing(false);
}
},
[page, proxies.length]
[page]
);
useEffect(() => {
@@ -1,4 +1,4 @@
import { useEffect, useRef, useState, useCallback } from "react";
import { useEffect, useState, useCallback } from "react";
import { useParams, useNavigate } from "react-router-dom";
import { Card, Flex, Text, Badge, Grid, Button, Heading, Box, Table, AlertDialog } from "@radix-ui/themes";
import { Icon } from "@iconify/react";
@@ -8,8 +8,10 @@ import pb from "../../lib/pocketbase";
import type { Server } from "../Servers/useServers";
import { toast } from "sonner";
import { motion } from "framer-motion";
import { ServerLatency } from "../../components/ServerLatency";
import { ServerLocation } from "../../components/ServerLocation";
import { ProbeHistory } from "../../components/ProbeHistory";
import { LatencyChart } from "../../components/LatencyChart";
import { ServerLogViewer } from "../../components/ServerLogViewer";
import { useTranslation } from "react-i18next";
import { useServerProxies } from "./useServerProxies";
import { apiPost } from "../../lib/api";
@@ -21,8 +23,6 @@ export function ServerDetailPage() {
const [server, setServer] = useState<Server | null>(null);
const [loading, setLoading] = useState(true);
const [error, setError] = useState<string | null>(null);
const [logs, setLogs] = useState<string[]>([]);
const logContainerRef = useRef<HTMLDivElement>(null);
const [mounted, setMounted] = useState(false);
const [deleteProxyId, setDeleteProxyId] = useState<string | null>(null);
const [copiedId, setCopiedId] = useState<string | null>(null);
@@ -57,7 +57,8 @@ export function ServerDetailPage() {
} finally {
if (showLoading) setLoading(false);
}
}, [id, t]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [id]);
useEffect(() => {
fetchServer();
@@ -99,33 +100,6 @@ export function ServerDetailPage() {
}
};
// SSE log streaming
useEffect(() => {
if (!id) return;
const token = pb.authStore.token;
const es = new EventSource(`/api/frpc/logs/stream?id=${id}&token=${token}`);
es.onmessage = (event) => {
setLogs((prev) => [...prev, event.data]);
};
es.onerror = () => {
es.close();
};
return () => {
es.close();
};
}, [id]);
// Auto-scroll to bottom when new logs arrive
useEffect(() => {
if (logContainerRef.current) {
logContainerRef.current.scrollTop = logContainerRef.current.scrollHeight;
}
}, [logs]);
const getStatusColor = (status: string) => {
switch (status) {
case "running":
@@ -171,6 +145,10 @@ export function ServerDetailPage() {
visible={mounted}
extra={
<Flex gap="3" align="center">
<Button variant="soft" color="gray" onClick={() => navigate("/servers")}>
<Icon icon="lucide:arrow-left" width="16" height="16" />
{t("server.backToServers")}
</Button>
{server.bootStatus === "running" ? (
<Button size="2" color="red" variant="soft" onClick={handleStop} disabled={actionLoading}>
{actionLoading ? <Icon icon="lucide:loader-2" className="animate-spin" /> : <Icon icon="lucide:square" width="16" height="16" />}
@@ -241,14 +219,7 @@ export function ServerDetailPage() {
</Text>
</Box>
)}
<Box>
<Text size="2" color="gray">
{t("server.latency")}
</Text>
<Box mt="1">
<ServerLatency networkStatus={server.networkStatus} size="3" />
</Box>
</Box>
<Box>
<Text size="2" color="gray">
{t("server.location")}
@@ -364,6 +335,34 @@ export function ServerDetailPage() {
</motion.div>
</Grid>
{/* Probe History */}
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={mounted ? { opacity: 1, y: 0 } : { opacity: 0, y: 20 }}
transition={{ duration: 0.5, delay: 0.3, ease: "easeOut" }}
>
<Card size="3">
<Flex direction="column" gap="3">
<Heading size="4">{t("server.statusCard")}</Heading>
<ProbeHistory serverId={id!} />
</Flex>
</Card>
</motion.div>
{/* Latency Chart */}
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={mounted ? { opacity: 1, y: 0 } : { opacity: 0, y: 20 }}
transition={{ duration: 0.5, delay: 0.35, ease: "easeOut" }}
>
<Card size="3">
<Flex direction="column" gap="3">
<Heading size="4">{t("server.latencyChartCard")}</Heading>
<LatencyChart serverId={id!} />
</Flex>
</Card>
</motion.div>
{/* Proxy List */}
<motion.div
initial={{ opacity: 0, y: 20 }}
@@ -537,42 +536,9 @@ export function ServerDetailPage() {
initial={{ opacity: 0, y: 20 }}
animate={mounted ? { opacity: 1, y: 0 } : { opacity: 0, y: 20 }}
transition={{ duration: 0.5, delay: 0.3, ease: "easeOut" }}
className="flex flex-1 flex-col" // To make it expand
>
<Card size="3" className="flex flex-1 flex-col">
<Flex justify="between" align="center" mb="4">
<Heading size="4">{t("server.connectionLogs")}</Heading>
<Flex gap="2">
<Button size="1" variant="soft" onClick={() => setLogs([])}>
<Icon icon="lucide:trash-2" /> {t("server.clear")}
</Button>
</Flex>
</Flex>
<Box
ref={logContainerRef}
style={{
backgroundColor: "var(--gray-2)",
borderRadius: "var(--radius-3)",
padding: "1rem",
fontFamily: "monospace",
fontSize: "0.9rem",
height: "300px",
overflowY: "auto",
}}
>
{logs.length > 0 ? (
logs.map((log, index) => (
<div key={index} style={{ marginBottom: "4px" }}>
<Text color="gray">{log}</Text>
</div>
))
) : (
<Text color="gray" style={{ fontStyle: "italic" }}>
{t("server.noLogsAvailable")}
</Text>
)}
</Box>
<Card size="3">
<ServerLogViewer serverId={id!} />
</Card>
</motion.div>
@@ -1,4 +1,4 @@
import { useState, useEffect, useCallback } from "react";
import { useState, useEffect, useCallback, useRef } from "react";
import pb from "../../lib/pocketbase";
import { apiPost } from "../../lib/api";
import { toast } from "sonner";
@@ -9,6 +9,12 @@ export function useServerProxies(serverId: string | undefined) {
const [loading, setLoading] = useState(true);
const [refreshing, setRefreshing] = useState(false);
const [togglingId, setTogglingId] = useState<string | null>(null);
const mountedRef = useRef(true);
useEffect(() => {
mountedRef.current = true;
return () => { mountedRef.current = false; };
}, []);
const fetchProxies = useCallback(async (isManual = false) => {
if (!serverId) return;
@@ -18,11 +24,14 @@ export function useServerProxies(serverId: string | undefined) {
filter: `serverId = "${serverId}"`,
sort: "-created",
});
if (!mountedRef.current) return;
setProxies(result);
} catch (err) {
if (!mountedRef.current) return;
if ((err as Record<string, unknown>)?.isAbort) return;
toast.error(err instanceof Error ? err.message : "Failed to fetch proxies");
} finally {
if (!mountedRef.current) return;
setLoading(false);
if (isManual) setRefreshing(false);
}
@@ -0,0 +1,46 @@
import { useParams, useNavigate } from "react-router-dom";
import { Button, Card, Flex } from "@radix-ui/themes";
import { Icon } from "@iconify/react";
import { useTranslation } from "react-i18next";
import { PageHeader } from "../../components/PageHeader";
import { ServerLogViewer } from "../../components/ServerLogViewer";
import { useState, useEffect } from "react";
import { motion } from "framer-motion";
export function ServerLogPage() {
const { t } = useTranslation();
const { id } = useParams<{ id: string }>();
const navigate = useNavigate();
const [mounted, setMounted] = useState(false);
useEffect(() => {
const timer = setTimeout(() => setMounted(true), 100);
return () => clearTimeout(timer);
}, []);
return (
<Flex direction="column" gap="5">
<PageHeader
title={t("server.connectionLogs")}
description={t("server.viewLogsDesc")}
visible={mounted}
extra={
<Button variant="soft" onClick={() => navigate("/servers")}>
<Icon icon="lucide:arrow-left" width="16" height="16" />
{t("server.backToServers")}
</Button>
}
/>
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={mounted ? { opacity: 1, y: 0 } : { opacity: 0, y: 20 }}
transition={{ duration: 0.5, delay: 0.1, ease: "easeOut" }}
>
<Card size="3">
<ServerLogViewer serverId={id!} height="calc(100vh - 280px)" showHeading={false} />
</Card>
</motion.div>
</Flex>
);
}
@@ -372,6 +372,18 @@ export function ServersView({
</Button>
</Link>
<Link to={`/servers/${server.id}/logs`} style={{ textDecoration: "none" }}>
<Button
size="1"
variant="soft"
className="cursor-pointer"
color="gray"
>
<Icon icon="lucide:scroll-text" width="14" height="14" />
{t("server.viewLogs")}
</Button>
</Link>
<Button
size="1"
variant="soft"
+19 -16
View File
@@ -1,6 +1,6 @@
import { useState, useEffect, useCallback } from "react";
import { useState, useEffect, useCallback, useRef } from "react";
import pb from "../../lib/pocketbase";
import { apiPost } from "../../lib/api";
import { apiGet, apiPost } from "../../lib/api";
import { toast } from "sonner";
export interface Server {
@@ -65,6 +65,7 @@ export function useServers() {
const [servers, setServers] = useState<Server[]>([]);
const [loading, setLoading] = useState(true);
const [refreshing, setRefreshing] = useState(false);
const initializedRef = useRef(false);
const [page, setPage] = useState(1);
const [totalPages, setTotalPages] = useState(1);
@@ -75,26 +76,25 @@ export function useServers() {
const fetchServers = useCallback(
async (isRefresh = false) => {
try {
// Only show loading spinner on initial load, not on refresh
if (!isRefresh && servers.length === 0) {
if (!initializedRef.current) {
setLoading(true);
} else if (isRefresh) {
setRefreshing(true);
}
const options: any = {
sort: "-created",
};
const params = new URLSearchParams({
page: String(page),
perPage: String(PER_PAGE),
});
if (search) params.set("search", search);
if (search) {
options.filter = `serverName ~ "${search}" || serverAddr ~ "${search}" || description ~ "${search}"`;
}
const res = await apiGet(`/api/servers?${params}`);
if (!res.ok) throw new Error("Failed to fetch servers");
const data = await res.json();
const result = await pb.collection("fh_servers").getList<Server>(page, PER_PAGE, options);
// Network status is already stored in database, no need to fetch separately
setServers(result.items);
setTotalPages(result.totalPages);
setServers(data.items);
setTotalPages(data.totalPages);
initializedRef.current = true;
} catch (err) {
if ((err as any)?.isAbort) return;
toast.error(err instanceof Error ? err.message : "Failed to fetch servers");
@@ -103,11 +103,14 @@ export function useServers() {
setRefreshing(false);
}
},
[page, search, servers.length]
[page, search]
);
useEffect(() => {
setPage(1);
if (initializedRef.current) {
setLoading(true);
}
}, [search]);
useEffect(() => {
+1 -1
View File
@@ -6,7 +6,7 @@ import { Loading } from "../../components/Loading";
import { ThemeToggle } from "../../components/ThemeToggle";
import { LanguageToggle } from "../../components/LanguageToggle";
import { Icon } from "@iconify/react";
import logo from "../../assets/logo.png";
import logo from "../../assets/logo.svg";
import { useTranslation } from "react-i18next";
interface SetupViewProps {