2
0
mirror of https://github.com/acepanel/acepanel.github.io.git synced 2026-02-04 15:20:58 +08:00

l10n: update translations (#2)

* New translations about.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) about.md

* New translations about.md (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) about.md

* New translations api.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) api.md

* New translations api.md (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) api.md

* New translations hub-mirror.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) hub-mirror.md

* New translations hub-mirror.md (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) hub-mirror.md

* New translations proxy.md (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) proxy.md

* New translations quic.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) quic.md

* New translations quic.md (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) quic.md

* New translations safe.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) safe.md

* New translations safe.md (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) safe.md

* New translations supervisor.md (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) supervisor.md

* New translations tls.md (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) tls.md

* New translations cert.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) cert.md

* New translations cert.md (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) cert.md

* New translations index.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) index.md

* New translations index.md (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) index.md

* New translations container.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) container.md

* New translations container.md (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) container.md

* New translations disk.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) disk.md

* New translations disk.md (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) disk.md

* New translations install.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) install.md

* New translations install.md (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) install.md

* New translations panel.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) panel.md

* New translations panel.md (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) panel.md

* New translations support.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) support.md

* New translations support.md (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) support.md

* New translations version-[version].md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) version-[version].md

* New translations version-[version].md (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) version-[version].md

* New translations en.ts (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) en.ts

* New translations en.ts (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) en.ts

* New translations about.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) about.md

* New translations api.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) api.md

* New translations hub-mirror.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) hub-mirror.md

* New translations quic.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) quic.md

* New translations safe.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) safe.md

* New translations cert.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) cert.md

* New translations index.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) index.md

* New translations container.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) container.md

* New translations disk.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) disk.md

* New translations install.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) install.md

* New translations install.md (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) install.md

* New translations panel.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) panel.md

* New translations support.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) support.md

* New translations en.ts (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) en.ts

* New translations en.ts (Chinese Traditional)
[skip ci] Update translations (Chinese Traditional) en.ts

* New translations hub-mirror.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) hub-mirror.md

* New translations tls.md (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) tls.md

* New translations en.ts (Chinese Simplified)
[skip ci] Update translations (Chinese Simplified) en.ts
This commit is contained in:
耗子
2025-05-26 23:32:16 +08:00
committed by GitHub
parent 91aa910ae6
commit 959b291288
32 changed files with 1531 additions and 211 deletions

View File

@@ -1,133 +1,117 @@
import {type DefaultTheme, defineConfig} from 'vitepress';
const resp = await (await fetch('https://panel.haozi.net/api/versions')).json()
import { type DefaultTheme, defineConfig } from 'vitepress';
const resp = await (await fetch('https://panel.haozi.net/api/versions')).json();
const versions = resp.data.slice(0, 10).map((item: any) => {
return item.version
})
export const config = defineConfig({
lang: "zh-CN",
title: "耗子面板",
description: "简单轻量 • 高效运维",
themeConfig: {
nav: nav(),
sidebar: [
{
text: "快速开始",
base: '/zh_CN/quickstart',
items: sidebarQuickstart()
},
{
text: "进阶指南",
base: '/zh_CN/advanced',
items: sidebarAdvanced()
},
{
text: "版本历史",
base: '/zh_CN',
collapsed: true,
items: [
...versions.map((version: string) => {
return {
text: version,
link: `/version-${version}`
}
})
]
},
],
editLink: {
pattern: 'https://github.com/ratpanel/ratpanel.github.io/edit/main/:path',
text: "在 GitHub 上编辑此页面"
},
footer: {
message: '<b style="font-size: larger">严禁使用耗子面板从事违法活动,我司不对违规用户提供任何服务</b>',
copyright: `© 2022-${new Date().getFullYear()} 天津耗子科技有限公司 版权所有丨<a target="_blank" href="https://beian.miit.gov.cn/" rel="noreferrer">津ICP备2022009678号-1</a>丨<a target="_blank" href="https://beian.mps.gov.cn/#/query/webSearch?code=12011502000848" rel="noreferrer">津公网安备12011502000848号</a>`
},
docFooter: {
prev: "上一页",
next: "下一页"
},
outline: {
label: "页面导航"
},
lastUpdated: {
text: "最后更新于",
formatOptions: {
dateStyle: 'short',
timeStyle: 'medium'
}
},
langMenuLabel: "切换语言",
returnToTopLabel: "回到顶部",
sidebarMenuLabel: "菜单",
darkModeSwitchLabel: "主题",
lightModeSwitchTitle: "切换到浅色主题",
darkModeSwitchTitle: "切换到深色主题",
skipToContentLabel: "跳转到内容"
}
return item.version;
});
export const config = defineConfig({
lang: "zh-CN",
title: "耗子面板",
description: "简单轻量 • 高效运维",
themeConfig: {
nav: nav(),
sidebar: [{
text: "快速开始",
base: "/zh_CN/quickstart",
items: sidebarQuickstart()
}, {
text: "进阶指南",
base: "/zh_CN/advanced",
items: sidebarAdvanced()
}, {
text: "版本历史",
collapsed: true,
items: [...versions.map((version: string) => {
return {
text: version,
link: `/version-${version}`
};
})]
}],
editLink: {
pattern: 'https://github.com/ratpanel/ratpanel.github.io/edit/main/:path',
text: "在 GitHub 上编辑此页面"
},
footer: {
message: "<b style=\"font-size: larger\">严禁使用耗子面板从事违法活动,我司不对违规用户提供任何服务</b>",
copyright: `© 2022-${new Date().getFullYear()} 天津耗子科技有限公司 版权所有丨<a target="_blank" href="https://beian.miit.gov.cn/" rel="noreferrer">津ICP备2022009678号-1</a>丨<a target="_blank" href="https://beian.mps.gov.cn/#/query/webSearch?code=12011502000848" rel="noreferrer">津公网安备12011502000848号</a>`
},
docFooter: {
prev: "上一页",
next: "下一页"
},
outline: {
label: "页面导航"
},
lastUpdated: {
text: "最后更新于",
formatOptions: {
dateStyle: 'short',
timeStyle: 'medium'
}
},
langMenuLabel: "切换语言",
returnToTopLabel: "回到顶部",
sidebarMenuLabel: "菜单",
darkModeSwitchLabel: "主题",
lightModeSwitchTitle: "切换到浅色主题",
darkModeSwitchTitle: "切换到深色主题",
skipToContentLabel: "跳转到内容"
}
});
function nav(): DefaultTheme.NavItem[] {
return [
{text: '首页', link: '/zh_CN/'},
{text: '文档', link: '/zh_CN/quickstart/install'},
{text: '支持', link: '/zh_CN/support'},
{text: '🔥证书', link: '/zh_CN/cert'},
{text: '关于', link: '/zh_CN/about'},
]
return [{
text: "首页",
link: "/zh_CN/"
}, {
text: "文档",
link: "/zh_CN/quickstart/install"
}, {
text: "支持",
link: "/zh_CN/support"
}, {
text: "🔥证书",
link: "/zh_CN/cert"
}, {
text: "关于",
link: "/zh_CN/about"
}];
}
function sidebarQuickstart(): DefaultTheme.SidebarItem[] {
return [
{
text: '安装面板',
link: '/install'
},
{
text: '挂载分区',
link: '/disk'
},
{
text: '管理面板',
link: '/panel'
},
{
text: '管理容器',
link: '/container'
},
]
return [{
text: "安装面板",
link: '/install'
}, {
text: "挂载分区",
link: '/disk'
}, {
text: "管理面板",
link: '/panel'
}, {
text: "管理容器",
link: '/container'
}];
}
function sidebarAdvanced(): DefaultTheme.SidebarItem[] {
return [
{
text: '面板 API',
link: '/api'
},
{
text: '配置容器镜像加速',
link: '/hub-mirror'
},
{
text: '配置反向代理',
link: '/proxy'
},
{
text: '配置进程守护',
link: '/supervisor'
},
{
text: '配置 QUICHTTP3',
link: '/quic'
},
{
text: '配置 TLSv1.1 TLSv1',
link: '/tls'
},
{
text: '安全性建议',
link: '/safe'
},
]
return [{
text: "面板 API",
link: '/api'
}, {
text: "配置容器镜像加速",
link: '/hub-mirror'
}, {
text: "配置反向代理",
link: '/proxy'
}, {
text: "配置进程守护",
link: '/supervisor'
}, {
text: "配置 QUICHTTP3",
link: '/quic'
}, {
text: "配置 TLSv1.1 TLSv1",
link: '/tls'
}, {
text: "安全性建议",
link: '/safe'
}];
}

117
.vitepress/config/zh_TW.ts Normal file
View File

@@ -0,0 +1,117 @@
import { type DefaultTheme, defineConfig } from 'vitepress';
const resp = await (await fetch('https://panel.haozi.net/api/versions')).json();
const versions = resp.data.slice(0, 10).map((item: any) => {
return item.version;
});
export const config = defineConfig({
lang: 'en-US',
title: 'RatPanel',
description: "Simple · lightweight · efficient",
themeConfig: {
nav: nav(),
sidebar: [{
text: "Quickstart",
base: '/quickstart',
items: sidebarQuickstart()
}, {
text: "Advanced",
base: '/advanced',
items: sidebarAdvanced()
}, {
text: "Versions",
collapsed: true,
items: [...versions.map((version: string) => {
return {
text: version,
link: `/version-${version}`
};
})]
}],
editLink: {
pattern: 'https://github.com/ratpanel/ratpanel.github.io/edit/main/:path',
text: 'Edit this page on GitHub'
},
footer: {
message: '<b style="font-size: larger">It is strictly forbidden to use Rat Panel for illegal activities, and our company does not provide any services to violators</b>',
copyright: `Copyright © 2022-${new Date().getFullYear()} Tianjin Rat Technology Co., Ltd All Rights Reserved.丨<a target="_blank" href="https://beian.miit.gov.cn/" rel="noreferrer">津ICP备2022009678号-1</a>丨<a target="_blank" href="https://beian.mps.gov.cn/#/query/webSearch?code=12011502000848" rel="noreferrer">津公网安备12011502000848号</a>`
},
docFooter: {
prev: 'Previous page',
next: 'Next page'
},
outline: {
label: 'On this page'
},
lastUpdated: {
text: 'Last updated',
formatOptions: {
dateStyle: 'short',
timeStyle: 'medium'
}
},
langMenuLabel: 'Change language',
returnToTopLabel: 'Return to top',
sidebarMenuLabel: 'Menu',
darkModeSwitchLabel: 'Appearance',
lightModeSwitchTitle: 'Switch to light theme',
darkModeSwitchTitle: 'Switch to dark theme',
skipToContentLabel: 'Skip to content'
}
});
function nav(): DefaultTheme.NavItem[] {
return [{
text: 'Home',
link: '/'
}, {
text: 'Document',
link: '/quickstart/install'
}, {
text: 'Support',
link: '/support'
}, {
text: "🔥證書",
link: '/cert'
}, {
text: 'About',
link: '/about'
}];
}
function sidebarQuickstart(): DefaultTheme.SidebarItem[] {
return [{
text: 'Installing panel',
link: "/安裝"
}, {
text: 'Mounting partition',
link: "/磁碟"
}, {
text: 'Managing panel',
link: '/panel'
}, {
text: 'Managing container',
link: "/容器"
}];
}
function sidebarAdvanced(): DefaultTheme.SidebarItem[] {
return [{
text: 'Panel API',
link: '/api'
}, {
text: 'Configure container image acceleration',
link: '/hub-mirror'
}, {
text: 'Configure reverse proxy',
link: '/proxy'
}, {
text: 'Configure process daemon',
link: '/supervisor'
}, {
text: 'Configure QUIC (HTTP3)',
link: '/quic'
}, {
text: 'Configure TLSv1.1 TLSv1',
link: '/tls'
}, {
text: 'Security recommendations',
link: "/安全"
}];
}

View File

@@ -33,7 +33,7 @@ const members = [
耗子面板是一款专业的服务器运维管理面板,致力于为用户提供简单、高效、安全的服务器管理解决方案。
| 愿景 | 使命 | 价值观 |
|-------------------|---------------|----------------|
| ----------------- | ------------- | -------------- |
| 成为领先的服务器管理解决方案提供商 | 让服务器管理变得简单而高效 | 用户至上、创新驱动、专业专注 |
## 团队介绍
@@ -42,23 +42,23 @@ const members = [
## 发展历程
::: timeline 2024 - 全新起航
:::timeline 2024 - 全新起航
面板得到了众多赞助商的支持2024 年下半年发布了全新的 2.3 版本
:::
::: timeline 2023 - 技术积累
:::timeline 2023 - 技术积累
使用 Go 对面板进行重写,发布 2.0 2.1 系列版本,积累了大量开发经验
:::
::: timeline 2022 - 项目立项
:::timeline 2022 - 项目立项
2022 年中项目立项,年末发布 1.0 版本
:::
## 联系我们
| 名称 | 联系方式 |
|------|--------------------------------------------------------------------------|
| 企业微信 | [点击联系](https://work.weixin.qq.com/kfid/kfc20ea8e38b5a4e73a) |
| 名称 | 联系方式 |
| ---- | ------------------------------------------------------------------------------------------ |
| 企业微信 | [点击联系](https://work.weixin.qq.com/kfid/kfc20ea8e38b5a4e73a) |
| QQ | [826896000](https://wpa.qq.com/msgrd?v=3&uin=826896000&site=qq&menu=yes) |
| 电子邮件 | [admin@haozi.net](mailto:admin@haozi.net) |
| 公司地址 | 天津市武清区黄庄街道泉里路1号智库大厦206室 |
| 电子邮件 | [admin@haozi.net](mailto:admin@haozi.net) |
| 公司地址 | 天津市武清区黄庄街道泉里路1号智库大厦206室 |

View File

@@ -2,7 +2,7 @@
## 概述
耗子面板提供了一套安全的 RESTful 接口,用于与面板系统进行交互。所有 API 请求都需要进行 HMAC-SHA256 签名认证以确保通信的安全性和完整性。
耗子面板提供了一套安全的 RESTful 接口,用于与面板系统进行交互。 所有 API 请求都需要进行 HMAC-SHA256 签名认证以确保通信的安全性和完整性。
## 基础信息
@@ -12,10 +12,10 @@
## 认证机制
API 使用 HMAC-SHA256 签名算法进行认证。每个请求必须包含以下 HTTP 头:
API 使用 HMAC-SHA256 签名算法进行认证。每个请求必须包含以下 HTTP 头: 每个请求必须包含以下 HTTP 头:
| 头部名称 | 描述 |
|-----------------|-----------------------------------------------------------------|
| --------------- | --------------------------------------------------------------- |
| `Content-Type` | 设置为 `application/json` |
| `X-Timestamp` | 当前 UNIX 时间戳(秒) |
| `Authorization` | 身份验证信息,格式为 `HMAC-SHA256 Credential={id}, Signature={signature}` |
@@ -629,7 +629,7 @@ sendApiRequest();
## 常见响应码
| HTTP 状态码 | 描述 |
|----------|---------|
| -------- | ------- |
| 200 | 请求成功 |
| 401 | 身份验证失败 |
| 403 | 权限不足 |

View File

@@ -15,7 +15,7 @@ location = "docker.io"
location = "docker.1ms.run"
```
其中 docker.1ms.run 为配置的镜像加速地址可自行参考其他教程搭建使用。
其中 docker.1ms.run 为配置的镜像加速地址可自行参考其他教程搭建使用。
## 对于 Docker
@@ -29,4 +29,4 @@ location = "docker.1ms.run"
}
```
其中 https://docker.1ms.run 为配置的镜像加速地址可自行参考其他教程搭建使用。
其中 docker.1ms.run 为配置的镜像加速地址可自行参考其他教程搭建使用。

View File

@@ -1,7 +1,6 @@
# 配置 QUICHTTP3
面板目前已支持自动 QUIC 配置,但是出于兼容性考虑,默认未添加 `Alt-Svc` 标头浏览器在未检测到 `Alt-Svc` 标头时不会尝试使用
QUIC 连接。
面板目前已支持自动 QUIC 配置,但是出于兼容性考虑,默认未添加 `Alt-Svc` 标头浏览器在未检测到 `Alt-Svc` 标头时不会尝试使用 QUIC 连接。
如果你不使用 CDN可添加下述配置到网站伪静态中即可让浏览器知晓网站支持并使用 QUIC 连接。
@@ -10,6 +9,7 @@ add_header Alt-Svc 'h3=":$server_port"; ma=2592000';
```
如果你使用 CDN 或者前端还存在代理服务器,则 QUIC 需要在 CDN / 前端开启。
如果配置后仍不生效,请检查浏览器版本和 UDP 443 端口的可用性。
* 根据 Nginx 的 git 提交记录1.25 版本下所有 QUIC 草案版本已经移除,因此 `Alt-Svc` 无需添加草案版本号。
- 根据 Nginx 的 git 提交记录1.25 版本下所有 QUIC 草案版本已经移除,因此 `Alt-Svc` 无需添加草案版本号。

View File

@@ -4,11 +4,11 @@
### 网站方面
根据以往经验大多数被黑挂马都是程序漏洞造成的,与面板等环境无关为了网站安全,你应该做到:
根据以往经验大多数被黑挂马都是程序漏洞造成的,与面板等环境无关为了网站安全,你应该做到:
1. 不要使用盗版程序、软件,特别是在你无法确定有没有被人加过料的情况下。
2. 定期更新网站程序和软件环境,不要怕麻烦使用过时的软件程序,它们的安全性无法保证。
3. 网站后台禁止使用弱密码密码强烈建议使用随机生成器生成大于 20 位的混合密码并保存在安全位置有条件建议开启程序的多因素身份验证2FA
3. 网站后台禁止使用弱密码密码强烈建议使用随机生成器生成大于 20 位的混合密码并保存在安全位置有条件建议开启程序的两步验证2FA
4. 设置定时备份全站数据,不要裸奔。
5. PHP 默认禁用了部分高危函数,非必要请勿删除。
@@ -16,18 +16,17 @@
现代系统出现严重安全漏洞的概率是很低的,但是你仍应该做到:
1. 定期更新系统软件。(使用 `yum update``apt upgrade`)。
2. SSH 禁止使用弱密码和默认 22 端口密码强烈建议使用随机生成器生成大于 20 位的混合密码并保存在安全位置如果可以建议安装
Fail2ban 针对性保护。
1. 定期更新系统软件。 (使用 `yum update``apt upgrade`)。
2. SSH 禁止使用弱密码和默认 22 端口密码强烈建议使用随机生成器生成大于 20 位的混合密码并保存在安全位置如果可以建议安装 Fail2ban 针对性保护。
3. 不要随意给 777 权限和 www 用户的执行权限,可能造成极大安全隐患。
4. 如果运营商提供 VNC 管理服务器,也可以考虑关闭 SSH从源头上解决问题。
### 面板方面
面板拥有和 root 一样的权限,管理不当亦会造成严重安全问题你应该做到:
面板拥有和 root 一样的权限,管理不当亦会造成严重安全问题你应该做到:
1. 定期更新面板及面板安装的应用。同时推荐关注我们的频道或者群,以第一时间接收各类更新消息。
2. 面板禁止使用弱密码和默认 8888 端口密码强烈建议使用随机生成器生成大于 20 位的混合密码并保存在安全位置。
1. 定期更新面板及面板安装的应用。 同时推荐关注我们的频道或者群,以第一时间接收各类更新消息。
2. 面板禁止使用弱密码和默认 8888 端口密码强烈建议使用随机生成器生成大于 20 位的混合密码并保存在安全位置。
3. 建议修改添加面板入口和开启面板 HTTPS防止被扫描器扫描和中间人攻击。
4. 防火墙无必要请不要放行内部服务的端口Redis 6379、MySQL 3306、PostgreSQL 5432等可能造成严重安全隐患。网站本地连接不需要放行连不上是程序的问题
4. 防火墙无必要请不要放行内部服务的端口Redis 6379、MySQL 3306、PostgreSQL 5432等可能造成严重安全隐患。 (网站本地连接不需要放行,连不上是程序的问题)。
5. 对安全性要求较高的情况下,可以考虑日常停止面板的运行,按需启动(面板停止运行不会影响网站、计划任务等的运行)。

View File

@@ -1,8 +1,8 @@
# 配置 TLSv1.1 TLSv1
当前面板OpenResty使用OpenSSL 3.0版本编译默认禁用已弃用的TLSv1.1 TLSv1协议。
当前面板 OpenResty 使用 OpenSSL 3.5 版本编译,默认禁用已弃用的 TLSv1.1 TLSv1 协议。
当然如果你的业务必须要使用这两个协议的话可以使用下述SSL配置启用。
当然,如果你的业务必须要使用这两个协议的话,可以使用下述 SSL 配置启用。
```
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;

View File

@@ -6,7 +6,7 @@ next: false
# 证书
若 3 个月免费证书无法满足您的需求,您可以选择购买更高级别的证书。我们提供 DV 单域名证书和 DV 通配符证书可供选择。
若 3 个月免费证书无法满足您的需求,您可以选择购买更高级别的证书。 我们提供 DV 单域名证书和 DV 通配符证书可供选择。
受限价政策,具体价格及购买请直接通过右上角加群联系销售。
@@ -129,24 +129,19 @@ next: false
<div class="cert-subtitle">国际知名品牌证书</div>
<div class="cert-price">¥ 1X<span>/年</span></div>
<div class="cert-features">
<div class="cert-feature-item">
<span class="cert-check-icon">✓</span>
<div class="cert-feature-item"><span class="cert-check-icon">✓</span>
<span>域名型证书DV</span>
</div>
<div class="cert-feature-item">
<span class="cert-check-icon">✓</span>
<div class="cert-feature-item"><span class="cert-check-icon">✓</span>
<span>支持一个域名</span>
</div>
<div class="cert-feature-item">
<span class="cert-check-icon">✓</span>
<div class="cert-feature-item"><span class="cert-check-icon">✓</span>
<span>一年有效期</span>
</div>
<div class="cert-feature-item">
<span class="cert-check-icon">✓</span>
<div class="cert-feature-item"><span class="cert-check-icon">✓</span>
<span>快速颁发</span>
</div>
</div>
<button class="cert-buy-button">右上角联系销售购买</button>
</div><button class="cert-buy-button">右上角联系销售购买</button>
</div>
<div class="cert-card">
<div class="cert-card-header">
@@ -155,24 +150,19 @@ next: false
<div class="cert-subtitle">国际知名品牌证书</div>
<div class="cert-price">¥ 1XX<span>/年</span></div>
<div class="cert-features">
<div class="cert-feature-item">
<span class="cert-check-icon">✓</span>
<div class="cert-feature-item"><span class="cert-check-icon">✓</span>
<span>域名型证书DV</span>
</div>
<div class="cert-feature-item">
<span class="cert-check-icon">✓</span>
<div class="cert-feature-item"><span class="cert-check-icon">✓</span>
<span>通配所有子域</span>
</div>
<div class="cert-feature-item">
<span class="cert-check-icon">✓</span>
<div class="cert-feature-item"><span class="cert-check-icon">✓</span>
<span>一年有效期</span>
</div>
<div class="cert-feature-item">
<span class="cert-check-icon">✓</span>
<div class="cert-feature-item"><span class="cert-check-icon">✓</span>
<span>快速颁发</span>
</div>
</div>
<button class="cert-buy-button">右上角联系销售购买</button>
</div><button class="cert-buy-button">右上角联系销售购买</button>
</div>
</div>

View File

@@ -1,9 +1,8 @@
---
layout: home
hero:
name: "耗子面板"
text: "简单轻量 • 高效运维"
name: 耗子面板
text: 简单轻量 • 高效运维
tagline: 全能服务器运维管理面板
actions:
- theme: brand
@@ -13,7 +12,6 @@ hero:
- theme: alt
text: 快速安装
link: /zh_CN/quickstart/install
features:
- icon: ✨
title: 极低占用
@@ -43,8 +41,7 @@ features:
## 合作伙伴
<div style="display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap;">
<a href="https://www.weixiaoduo.com/" style="padding: 1rem;">
<div style="display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap;"><a href="https://www.weixiaoduo.com/" style="padding: 1rem;">
<img width="160" src="/wxd.png" alt="微晓朵">
</a>
<a href="https://www.dkdun.cn/aff/MQZZNVHQ" style="padding: 1rem;">

View File

@@ -4,7 +4,7 @@
容器引擎安装完毕后,即可前往面板容器管理处创建容器(此处以 pgadmin4 为例)。
首先导航到镜像选项卡拉取需要的镜像视网络环境可能需要数分钟到数十分钟。
首先导航到镜像选项卡拉取需要的镜像视网络环境可能需要数分钟到数十分钟。
![拉取镜像](/container1.png)
@@ -12,13 +12,14 @@
![创建容器](/container2.png)
表单内容按容器的说明填写此处使用的 pgadmin4 镜像需要映射 80 端口及配置 2 个默认环境变量,无需映射目录。
表单内容按容器的说明填写此处使用的 pgadmin4 镜像需要映射 80 端口及配置 2 个默认环境变量,无需映射目录。
容器创建完成后可点击右上角刷新按钮和容器右侧的日志按钮检查是否正常启动。
![容器启动](/container3.png)
若容器未能启动,请根据日志进行修正。
如果映射了外部端口,需要到防火墙菜单放行相应的端口。
![创建成功](/container4.png)

View File

@@ -1,6 +1,6 @@
# 挂载分区
如果您的服务器有未挂载的数据盘,可在安装前以 `root` 用户登录服务器运行以下命令自动挂载面板安装后不支持跨目录迁移。
如果您的服务器有未挂载的数据盘,可在安装前以 root 用户登录服务器运行以下命令自动挂载面板安装后不支持跨目录迁移。
```shell
curl -fsLm 10 -o auto_mount.sh https://dl.cdn.haozi.net/panel/auto_mount.sh && bash auto_mount.sh

View File

@@ -1,35 +1,35 @@
# 安装面板
面板支持 `amd64` | `arm64` 架构下的主流系统下表中的系统均已测试 LNMP 环境安装。
面板支持 `amd64` | `arm64` 架构下的主流系统下表中的系统均已测试 LNMP 环境安装。
优先建议使用标注**推荐**的系统无特殊情况不建议使用标注**不推荐**的系统。
优先建议使用标注**推荐**的系统无特殊情况不建议使用标注**不推荐**的系统。
不在下表中的其他系统,可自行尝试安装,但不提供无偿技术支持。
| 系统 | 版本 | 备注 |
|---------------------|-----|-----|
| AlmaLinux | 9 | 推荐 |
| AlmaLinux | 8 | 不推荐 |
| RockyLinux | 9 | 支持 |
| RockyLinux | 8 | 不推荐 |
| CentOS Stream | 9 | 不推荐 |
| CentOS Stream | 8 | 不推荐 |
| Ubuntu | 24 | 推荐 |
| Ubuntu | 22 | 支持 |
| Debian | 12 | 推荐 |
| Debian | 11 | 支持 |
| OpenCloudOS | 9 | 支持 |
| TencentOS Server | 4 | 支持 |
| 系统 | 版本 | 备注 |
| ------------------- | ------------------- | --- |
| AlmaLinux | 9 | 推荐 |
| AlmaLinux | 8 | 不推荐 |
| RockyLinux | 9 | 支持 |
| RockyLinux | 8 | 不推荐 |
| CentOS Stream | 9 | 不推荐 |
| CentOS Stream | 8 | 不推荐 |
| Ubuntu | 24 | 推荐 |
| Ubuntu | 22 | 支持 |
| Debian | 12 | 推荐 |
| Debian | 11 | 支持 |
| OpenCloudOS | 9 | 支持 |
| TencentOS Server | 4 | 支持 |
| TencentOS Server | 3.1 | 不推荐 |
| Alibaba Cloud Linux | 3.2 | 不推荐 |
| Anolis | 8 | 不推荐 |
| openEuler | 22 | 不推荐 |
| Anolis | 8 | 不推荐 |
| openEuler | 22 | 不推荐 |
随着系统版本的不断更新,我们亦可能会终止部分过于老旧的系统的支持,以保证面板的健壮性。
## 开始安装
> 如需挂载分区,请在安装面板前完成面板安装后不支持跨目录迁移。
> 如需挂载分区,请在安装面板前完成面板安装后不支持跨目录迁移。
`root` 用户登录服务器,运行以下命令安装面板:
@@ -37,4 +37,4 @@
curl -fsLm 10 -o install.sh https://dl.cdn.haozi.net/panel/install.sh && bash install.sh
```
一般 2 分钟内即可完成安装安装过程中请勿关闭终端。
一般 2 分钟内即可完成安装安装过程中请勿关闭终端。

View File

@@ -2,9 +2,9 @@
请勿在面板仍有任务运行时操作停止 / 重启面板,否则可能会造成问题。
* 启动面板:`systemctl start panel`
* 停止面板:`systemctl stop panel`
* 重启面板:`systemctl restart panel`
- 启动面板:`systemctl start panel`
- 停止面板:`systemctl stop panel`
- 重启面板:`systemctl restart panel`
## 面板命令行
@@ -24,4 +24,4 @@ panel-cli
curl -fsLm 10 -o uninstall.sh https://dl.cdn.haozi.net/panel/uninstall.sh && bash uninstall.sh
```
卸载面板前请务必备份好所有数据,提前卸载面板全部应用。卸载后数据将**无法恢复**
卸载面板前请务必备份好所有数据,提前卸载面板全部应用。 卸载后数据将**无法恢复**

View File

@@ -14,14 +14,14 @@ next: false
## 付费远程服务
网站报错、速度慢、被挂马?服务器资源占用高、配置调优、入侵朔源?我们统统一站式服务。
网站报错、速度慢、被挂马? 服务器资源占用高、配置调优、入侵朔源? 我们统统一站式服务。
### 远程服务价格表
远程服务是指我们通过远程协助的方式,帮助您解决问题。
| 名称 | 介绍 | 价格 |
|------|------------------|-------|
| ---- | ---------------- | ----- |
| 单次服务 | 仅限一次服务,问题解决服务即结束 | ¥50 起 |
### 服务流程

View File

@@ -5,4 +5,4 @@
## 更新内容
<!-- @content -->
<!-- @content -->

64
zh_TW/about.md Normal file
View File

@@ -0,0 +1,64 @@
---
sidebar: false
prev: false
next: false
---
<script setup>
import { VPTeamMembers } from 'vitepress/theme'
const members = [
{
avatar: 'https://weavatar.com/avatar/18e77debb1bc0000c0b50757b8f1bebb2c3e4df3d494124f776c15dbc1ebe8a5',
name: 'Rat',
desc: 'Founder & CEO',
links: [
{ icon: 'github', link: 'https://github.com/devhaozi' },
{ icon: 'bilibili', link: 'https://space.bilibili.com/8067' }
]
},
{
avatar: 'https://weavatar.com/avatar/f6b23deadaa481f0b3ea75ad94f246881ed2326117efebad6f2799ea165779b9',
name: 'Liang Zai',
desc: 'Technical Director',
links: [
{ icon: 'github', link: 'https://github.com/205125' }
]
},
]
</script>
# About
RatPanel is a professional server operation and maintenance management panel dedicated to providing users with simple, efficient, and secure server management solutions.
| Vision | Mission | Values |
| -------------------------------------------------------- | ------------------------------------------- | ------------------------------------------------- |
| Become a leading provider of server management solutions | Make server management simple and efficient | User-first, Innovation-driven, Professional focus |
## Team Introduction
<VPTeamMembers size="small" :members="members" />
## Development History
:::timeline 2024 - New Journey
The Panel received support from numerous sponsors, and released the brand new version 2.3 in the second half of 2024
:::
:::timeline 2023 - Technical Accumulation
Rewrote the Panel using Go, released versions 2.0 and 2.1 series, accumulated extensive development experience
:::
:::timeline 2022 - Project Initiation
Project initiated in mid-2022, version 1.0 released at the end of the year
:::
## Contact Us
| 名稱 | Contact |
| --------------- | -------------------------------------------------------------------------------------------------------- |
| WeChat Work | [Click to Contact](https://work.weixin.qq.com/kfid/kfc20ea8e38b5a4e73a) |
| QQ | [826896000](https://wpa.qq.com/msgrd?v=3&uin=826896000&site=qq&menu=yes) |
| 電子郵件 | [admin@haozi.net](mailto:admin@haozi.net) |
| Company Address | Room 206, Zhiku Building, No.1 Quanli Road, Huangzhuang Street, Wuqing District, Tianjin |

661
zh_TW/advanced/api.md Normal file
View File

@@ -0,0 +1,661 @@
# API Reference Documentation
## Overview
RatPanel provides a secure RESTful interface for interacting with the panel system. All API requests require HMAC-SHA256 signature authentication to ensure the security and integrity of communications.
## Basic Information
- **Base URL**: `http(s)://your-panel-domain/{entry}/api/`
- **Content Type**: All requests and responses use `application/json`
- **Character Encoding**: UTF-8
## Authentication Mechanism
The API uses the HMAC-SHA256 signature algorithm for authentication. Each request must include the following HTTP headers:
| Header Name | 描述 |
| --------------- | -------------------------------------------------------------------------------------------------------- |
| `Content-Type` | Set to `application/json` |
| `X-Timestamp` | Current UNIX timestamp (seconds) |
| `Authorization` | Authentication information, format: `HMAC-SHA256 Credential={id}, Signature={signature}` |
## Signature Algorithm
The signature process consists of four main steps:
### 1. Construct Canonical Request
The canonical request string consists of the following parts, separated by newline characters (\n):
```
HTTP Method
Canonical Path
Canonical Query String
SHA256 Hash of Request Body
```
**Note**: The canonical path should always use the path part starting with `/api/`, ignoring the entry prefix.
### 2. Construct String to Sign
The string to sign consists of the following parts, separated by newline characters (\n):
```
"HMAC-SHA256"
Timestamp
SHA256 Hash of Canonical Request
```
### 3. Calculate Signature
Calculate HMAC-SHA256 on the string to sign using your token, then convert the result to a hexadecimal string.
### 4. Construct Authorization Header
Add the calculated signature to the `Authorization` header:
```
Authorization: HMAC-SHA256 Credential={id}, Signature={signature}
```
## Go Example
```go
package main
import (
"bytes"
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
"fmt"
"io"
"net/http"
"strings"
"time"
)
func main() {
// Create a request to get user information
req, err := http.NewRequest("GET", "http://example.com/entrance/api/user/info", nil)
if err != nil {
fmt.Println("Error creating request:", err)
return
}
// Set content type
req.Header.Set("Content-Type", "application/json")
// Sign request - pass your user ID and API token
if err = SignReq(req, uint(16), "YourSecretToken"); err != nil {
fmt.Println("Error signing request:", err)
return
}
// Send request
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error sending request:", err)
return
}
defer resp.Body.Close()
// Handle response
body, err := io.ReadAll(resp.Body)
if err != nil {
fmt.Println("Error reading response:", err)
return
}
fmt.Println("Response Status:", resp.Status)
fmt.Println("Response Body:", string(body))
}
// SignReq signs an HTTP request
func SignReq(req *http.Request, id uint, token string) error {
// Step 1: Construct canonical request
var body []byte
var err error
if req.Body != nil {
// Read and save request body
body, err = io.ReadAll(req.Body)
if err != nil {
return err
}
// Restore request body for subsequent use
req.Body = io.NopCloser(bytes.NewReader(body))
}
// Canonical path
canonicalPath := req.URL.Path
if !strings.HasPrefix(canonicalPath, "/api") {
index := strings.Index(canonicalPath, "/api")
if index != -1 {
canonicalPath = canonicalPath[index:]
}
}
canonicalRequest := fmt.Sprintf("%s\n%s\n%s\n%s",
req.Method,
canonicalPath,
req.URL.Query().Encode(),
SHA256(string(body)))
// Step 2: Set timestamp and construct string to sign
timestamp := time.Now().Unix()
req.Header.Set("X-Timestamp", fmt.Sprintf("%d", timestamp))
stringToSign := fmt.Sprintf("%s\n%d\n%s",
"HMAC-SHA256",
timestamp,
SHA256(canonicalRequest))
// Step 3: Calculate signature
signature := HMACSHA256(stringToSign, token)
// Step 4: Set Authorization header
authHeader := fmt.Sprintf("HMAC-SHA256 Credential=%d, Signature=%s", id, signature)
req.Header.Set("Authorization", authHeader)
return nil
}
func SHA256(str string) string {
sum := sha256.Sum256([]byte(str))
dst := make([]byte, hex.EncodedLen(len(sum)))
hex.Encode(dst, sum[:])
return string(dst)
}
func HMACSHA256(data string, secret string) string {
h := hmac.New(sha256.New, []byte(secret))
h.Write([]byte(data))
return hex.EncodeToString(h.Sum(nil))
}
```
## PHP Example
```php
<?php
/**
* RatPanel API Request Example (PHP)
*/
function signRequest($method, $url, $body, $id, $token) {
// Parse URL and get path
$parsedUrl = parse_url($url);
$path = $parsedUrl['path'];
$query = isset($parsedUrl['query']) ? $parsedUrl['query'] : '';
// Canonical path
$canonicalPath = $path;
if (strpos($path, '/api') !== 0) {
$apiPos = strpos($path, '/api');
if ($apiPos !== false) {
$canonicalPath = substr($path, $apiPos);
}
}
// Calculate SHA256 hash of request body
$bodySha256 = hash('sha256', $body ?: '');
// Construct canonical request
$canonicalRequest = implode("\n", [
$method,
$canonicalPath,
$query,
$bodySha256
]);
// Get current timestamp
$timestamp = time();
// Construct string to sign
$stringToSign = implode("\n", [
'HMAC-SHA256',
$timestamp,
hash('sha256', $canonicalRequest)
]);
// Calculate signature
$signature = hash_hmac('sha256', $stringToSign, $token);
// Return signature and timestamp
return [
'timestamp' => $timestamp,
'signature' => $signature,
'id' => $id
];
}
// Example request
$apiUrl = 'http://example.com/entrance/api/user/info';
$method = 'GET';
$body = ''; // For GET requests, usually no request body
$id = 16;
$token = 'YourSecretToken';
// Generate signature information
$signingData = signRequest($method, $apiUrl, $body, $id, $token);
// Prepare HTTP headers
$headers = [
'Content-Type: application/json',
'X-Timestamp: ' . $signingData['timestamp'],
'Authorization: HMAC-SHA256 Credential=' . $signingData['id'] . ', Signature=' . $signingData['signature']
];
// Use cURL to send request
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
if (!empty($body)) {
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
}
// Execute request and get response
$response = curl_exec($ch);
$statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
// Output results
echo "Response Status Code: " . $statusCode . PHP_EOL;
echo "Response Content: " . $response . PHP_EOL;
```
## Python Example
```python
import hashlib
import hmac
import json
import requests
import time
from urllib.parse import urlparse, parse_qs
def sha256_hash(text):
"""Calculate SHA256 hash of a string"""
return hashlib.sha256(text.encode('utf-8')).hexdigest()
def hmac_sha256(key, message):
"""Calculate signature using HMAC-SHA256 algorithm"""
return hmac.new(key.encode('utf-8'), message.encode('utf-8'), hashlib.sha256).hexdigest()
def sign_request(method, url, body, user_id, token):
"""Generate signature for API request"""
# Parse URL
parsed_url = urlparse(url)
path = parsed_url.path
query = parsed_url.query
# Canonical path
canonical_path = path
if not path.startswith('/api'):
api_pos = path.find('/api')
if api_pos != -1:
canonical_path = path[api_pos:]
# Construct canonical request
body_str = body if body else ""
canonical_request = "\n".join([
method,
canonical_path,
query,
sha256_hash(body_str)
])
# Get current timestamp
timestamp = int(time.time())
# Construct string to sign
string_to_sign = "\n".join([
"HMAC-SHA256",
str(timestamp),
sha256_hash(canonical_request)
])
# Calculate signature
signature = hmac_sha256(token, string_to_sign)
return {
"timestamp": timestamp,
"signature": signature,
"id": user_id
}
# Example request
api_url = "http://example.com/entrance/api/user/info"
method = "GET"
body = "" # GET requests typically have no body
user_id = 16
token = "YourSecretToken"
# Generate signature information
signing_data = sign_request(method, api_url, body, user_id, token)
# Prepare HTTP headers
headers = {
"Content-Type": "application/json",
"X-Timestamp": str(signing_data["timestamp"]),
"Authorization": f"HMAC-SHA256 Credential={signing_data['id']}, Signature={signing_data['signature']}"
}
# Send request
response = requests.request(
method=method,
url=api_url,
headers=headers,
data=body
)
# Output results
print(f"Response Status Code: {response.status_code}")
print(f"Response Content: {response.text}")
```
## Java Example
```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.time.Instant;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.util.Base64;
/**
* RatPanel API Request Example (Java)
*/
public class RatPanelApiExample {
public static void main(String[] args) {
try {
// Example request
String apiUrl = "http://example.com/entrance/api/user/info";
String method = "GET";
String body = ""; // For GET requests, usually no request body
int id = 16;
String token = "YourSecretToken";
// Generate signature information
SigningData signingData = signRequest(method, apiUrl, body, id, token);
// Prepare HTTP request
HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create(apiUrl))
.header("Content-Type", "application/json")
.header("X-Timestamp", String.valueOf(signingData.timestamp))
.header("Authorization", "HMAC-SHA256 Credential=" + signingData.id +
", Signature=" + signingData.signature);
// Set request method and body
if (method.equals("GET")) {
requestBuilder.GET();
} else {
requestBuilder.method(method, HttpRequest.BodyPublishers.ofString(body));
}
HttpRequest request = requestBuilder.build();
// Send request
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
// Output results
System.out.println("Response Status Code: " + response.statusCode());
System.out.println("Response Content: " + response.body());
} catch (Exception e) {
e.printStackTrace();
}
}
static class SigningData {
long timestamp;
String signature;
int id;
SigningData(long timestamp, String signature, int id) {
this.timestamp = timestamp;
this.signature = signature;
this.id = id;
}
}
public static SigningData signRequest(String method, String url, String body, int id, String token) throws Exception {
// Parse URL
URI uri = new URI(url);
String path = uri.getPath();
String query = uri.getQuery() != null ? uri.getQuery() : "";
// Canonical path
String canonicalPath = path;
if (!path.startsWith("/api")) {
int apiPos = path.indexOf("/api");
if (apiPos != -1) {
canonicalPath = path.substring(apiPos);
}
}
// Calculate SHA256 hash of request body
String bodySha256 = sha256Hash(body != null ? body : "");
// Construct canonical request
String canonicalRequest = String.join("\n",
method,
canonicalPath,
query,
bodySha256);
// Get current timestamp
long timestamp = Instant.now().getEpochSecond();
// Construct string to sign
String stringToSign = String.join("\n",
"HMAC-SHA256",
String.valueOf(timestamp),
sha256Hash(canonicalRequest));
// Calculate signature
String signature = hmacSha256(token, stringToSign);
// Return signature and timestamp
return new SigningData(timestamp, signature, id);
}
private static String sha256Hash(String text) throws Exception {
MessageDigest digest = MessageDigest.getInstance("SHA-256");
byte[] hash = digest.digest(text.getBytes(StandardCharsets.UTF_8));
return bytesToHex(hash);
}
private static String hmacSha256(String key, String message) throws Exception {
Mac mac = Mac.getInstance("HmacSHA256");
SecretKeySpec secretKeySpec = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "HmacSHA256");
mac.init(secretKeySpec);
byte[] hash = mac.doFinal(message.getBytes(StandardCharsets.UTF_8));
return bytesToHex(hash);
}
private static String bytesToHex(byte[] bytes) {
StringBuilder hexString = new StringBuilder();
for (byte b : bytes) {
String hex = Integer.toHexString(0xff & b);
if (hex.length() == 1) {
hexString.append('0');
}
hexString.append(hex);
}
return hexString.toString();
}
}
```
## Node.js Example
```javascript
const crypto = require('crypto');
const axios = require('axios');
const url = require('url');
/**
* Calculate SHA256 hash of a string
* @param {string} text The string to hash
* @returns {string} Hash result (hexadecimal)
*/
function sha256Hash(text) {
return crypto.createHash('sha256').update(text || '').digest('hex');
}
/**
* Calculate signature using HMAC-SHA256 algorithm
* @param {string} key The key
* @param {string} message The message to sign
* @returns {string} Signature result (hexadecimal)
*/
function hmacSha256(key, message) {
return crypto.createHmac('sha256', key).update(message).digest('hex');
}
/**
* Generate signature for API request
* @param {string} method HTTP method
* @param {string} apiUrl API URL
* @param {string} body Request body
* @param {number} id User ID
* @param {string} token Secret key
* @returns {object} Object containing signature, timestamp and ID
*/
function signRequest(method, apiUrl, body, id, token) {
// Parse URL
const parsedUrl = new url.URL(apiUrl);
const path = parsedUrl.pathname;
const query = parsedUrl.search.slice(1); // Remove leading '?'
// Canonical path
let canonicalPath = path;
if (!path.startsWith('/api')) {
const apiPos = path.indexOf('/api');
if (apiPos !== -1) {
canonicalPath = path.slice(apiPos);
}
}
// Construct canonical request
const canonicalRequest = [
method,
canonicalPath,
query,
sha256Hash(body || '')
].join('\n');
// Get current timestamp
const timestamp = Math.floor(Date.now() / 1000);
// Construct string to sign
const stringToSign = [
'HMAC-SHA256',
timestamp,
sha256Hash(canonicalRequest)
].join('\n');
// Calculate signature
const signature = hmacSha256(token, stringToSign);
return {
timestamp,
signature,
id
};
}
/**
* Send API request
*/
async function sendApiRequest() {
// Example request parameters
const apiUrl = 'http://example.com/entrance/api/user/info';
const method = 'GET';
const body = ''; // GET requests typically have no body
const id = 16;
const token = 'YourSecretToken';
try {
// Generate signature information
const signingData = signRequest(method, apiUrl, body, id, token);
// Prepare HTTP headers
const headers = {
'Content-Type': 'application/json',
'X-Timestamp': signingData.timestamp,
'Authorization': `HMAC-SHA256 Credential=${signingData.id}, Signature=${signingData.signature}`
};
// Send request
const response = await axios({
method,
url: apiUrl,
headers,
data: body || undefined
});
// Output results
console.log(`Response Status Code: ${response.status}`);
console.log(`Response Content: ${JSON.stringify(response.data)}`);
} catch (error) {
console.error('Request Error:', error.message);
if (error.response) {
console.error(`Response Status Code: ${error.response.status}`);
console.error(`Response Content: ${JSON.stringify(error.response.data)}`);
}
}
}
// Execute request
sendApiRequest();
```
## Common Response Codes
| HTTP Status Code | 描述 |
| ---------------- | ----------------------- |
| 200 | Request successful |
| 401 | Authentication failed |
| 403 | Permission denied |
| 404 | Resource not found |
| 422 | Request parameter error |
| 500 | Internal server error |
## Security Recommendations
1. **Protect Your API Token**: Do not hardcode or expose your API token in client-side code
2. **Rotate Tokens Regularly**: Change your API token regularly to enhance security
3. **Configure IP Whitelisting**: Use IP whitelisting to restrict access in production environments
## Frequently Asked Questions
### Signature Verification Failed
If you encounter signature verification failures, check:
- Ensure you are using the correct API token and ID
- Check that the client and server times are accurate; timestamp differences greater than 300 seconds will cause verification to fail
- Ensure the request body hasn't been modified before or after signature calculation
- Ensure the URL path is handled correctly; remember to remove the entry prefix when normalizing the path
### Request Timeout
- Check network connection
- Confirm server status
- Consider increasing the client timeout settings

View File

@@ -0,0 +1,32 @@
# Configure Container Image Acceleration
Due to certain reasons, domestic users in China may be unable to connect to Docker Hub to pull container images, thus requiring image acceleration configuration.
## For Podman
Open the Podman settings page in the Panel, and navigate to the Registry Configuration tab.
Scroll to the bottom of the configuration file, add the following configuration and save:
```
[[registry]]
location = "docker.io"
[[registry.mirror]]
location = "docker.1ms.run"
```
Where docker.1ms.run is the configured image acceleration address. You can refer to other tutorials to set up and use it.
## For Docker
Open the Docker settings page in the Panel, and navigate to the Configuration tab.
Add the following configuration and save:
```
{
"registry-mirrors": ["https://docker.1ms.run"]
}
```
Where https://docker.1ms.run is the configured image acceleration address. You can refer to other tutorials to set up and use it.

5
zh_TW/advanced/proxy.md Normal file
View File

@@ -0,0 +1,5 @@
# Configure Reverse Proxy
RatPanel v2.4.10+ comes with a built-in reverse proxy configuration generator, which you can access through the top right corner of the site rewrite configuration page.
Note: If you encounter issues with static resources like CSS/JS not loading properly after setting up a reverse proxy, please remove the **Do not log static files** section from the site's main configuration file.

15
zh_TW/advanced/quic.md Normal file
View File

@@ -0,0 +1,15 @@
# Configure QUIC (HTTP3)
RatPanel currently supports automatic QUIC configuration, but for compatibility reasons, the `Alt-Svc` header is not added by default. Browsers will not attempt to use QUIC connections without detecting the `Alt-Svc` header.
If you are not using a CDN, you can add the configuration below to your website's rewrite rules to let browsers know that the website supports and uses QUIC connections.
```
add_header Alt-Svc 'h3=":$server_port"; ma=2592000';
```
If you are using a CDN or there are proxy servers in front, then QUIC needs to be enabled on the CDN / frontend.
If the configuration still doesn't work, please check your browser version and the availability of UDP port 443.
- According to Nginx's git commit history, all QUIC draft versions have been removed in version 1.25, so there's no need to add draft version numbers to `Alt-Svc`.

32
zh_TW/advanced/safe.md Normal file
View File

@@ -0,0 +1,32 @@
# Security Recommendations
With the following security measures, almost all hacking/malware issues can be prevented.
### Website Aspects
Based on experience, most hacking and malware incidents are caused by program vulnerabilities, unrelated to the Panel or environment. For website security, you should:
1. Avoid using pirated programs or software, especially when you cannot determine if they have been tampered with.
2. Regularly update website programs and software environments; don't use outdated software due to inconvenience, as their security cannot be guaranteed.
3. Never use weak passwords for website admin areas. Passwords are strongly recommended to be generated using a random generator with more than 20 mixed characters and stored in a secure location. If possible, enable 2FA for your programs.
4. Set up scheduled backups of all site data; don't operate without backups.
5. PHP has disabled some high-risk functions by default; don't remove these restrictions unless absolutely necessary.
### System Aspects
The probability of serious security vulnerabilities in modern systems is low, but you should still:
1. Regularly update system software. (Use `yum update` or `apt upgrade`).
2. Prohibit weak passwords and the default port 22 for SSH. Passwords are strongly recommended to be generated using a random generator with more than 20 mixed characters and stored in a secure location. If possible, consider installing Fail2ban for targeted protection.
3. Don't arbitrarily assign 777 permissions or execution permissions to the www user, as this may cause major security risks.
4. If your service provider offers VNC server management, consider disabling SSH to solve the problem at the source.
### Panel Aspects
RatPanel has the same privileges as root, and improper management can cause serious security problems. You should:
1. Regularly update the Panel and applications installed through it. We recommend following our channel or group to receive various update messages promptly.
2. Prohibit weak passwords and the default 8888 port for the Panel. Passwords are strongly recommended to be generated using a random generator with more than 20 mixed characters and stored in a secure location.
3. Consider modifying the Panel entry point and enabling HTTPS for the Panel to prevent scanner detection and man-in-the-middle attacks.
4. Unless necessary, do not allow firewall access to internal service ports (Redis 6379, MySQL 3306, PostgreSQL 5432, etc.), as this may cause serious security risks. (Local website connections don't require firewall access; connection issues are program problems).
5. For high-security requirements, consider stopping the Panel operation routinely and starting it only when needed (stopping the Panel will not affect websites, scheduled tasks, etc.).

View File

@@ -0,0 +1,5 @@
# Configure Process Monitoring
1. Install Supervisor manager and open it.
2. Create processes that need to be monitored in the Supervisor manager (it's not recommended to use root as the running user).
3. Common issues: [https://tom.moe/t/supervisor/3112](https://tom.moe/t/supervisor/3112)

11
zh_TW/advanced/tls.md Normal file
View File

@@ -0,0 +1,11 @@
# Configure TLSv1.1 TLSv1
The current Panel OpenResty is compiled with OpenSSL 3.5, which by default disables the deprecated TLSv1.1 and TLSv1 protocols.
Of course, if your business must use these two protocols, you can enable them using the SSL configuration below.
```
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:@SECLEVEL=0;
ssl_prefer_server_ciphers on;
```

202
zh_TW/cert.md Normal file
View File

@@ -0,0 +1,202 @@
---
sidebar: false
prev: false
next: false
---
# Certificates
If the 3-month free certificate cannot meet your needs, you can choose to purchase higher-level certificates. We offer DV single-domain certificates and DV wildcard certificates for your selection.
Due to pricing policy restrictions, please contact our sales team directly through the group link in the upper right corner for specific prices and purchases.
<style>
.cert-cards-container {
display: flex;
gap: 20px;
margin-bottom: 40px;
}
.cert-card {
flex: 1;
padding: 24px;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
display: flex;
flex-direction: column;
}
.cert-card-header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 16px;
}
.cert-card-title {
margin: 0!important;
border-top: unset!important;
padding-top: unset!important;
min-height: 60px;
display: flex;
align-items: center;
}
.cert-subtitle {
margin-bottom: 8px;
}
.cert-price {
font-size: 24px;
font-weight: bold;
margin-bottom: 24px;
}
.cert-price span {
font-size: 14px;
}
.cert-features {
margin-bottom: 24px;
flex-grow: 1;
}
.cert-feature-item {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 12px;
}
.cert-buy-button {
color: white;
width: 100%;
padding: 12px;
background: #4080ff;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
margin-top: auto;
}
.cert-buy-button:hover {
background: #3570e0;
}
.cert-features-section {
margin-top: 40px;
}
.cert-features-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 24px;
}
.cert-feature-card {
display: flex;
gap: 16px;
align-items: flex-start;
}
.cert-feature-icon {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
}
.cert-feature-content h3 {
margin: 8px 0!important;
font-size: 18px;
}
.cert-feature-content p {
line-height: 1.5;
}
</style>
## Choose Certificates
<div class="cert-cards-container">
<div class="cert-card">
<div class="cert-card-header">
<h2 class="cert-card-title">DV Single-domain Certificate</h2>
</div>
<div class="cert-subtitle">Internationally recognized brand certificate</div>
<div class="cert-price">¥ 1X<span>/year</span></div>
<div class="cert-features">
<div class="cert-feature-item"><span class="cert-check-icon">✓</span>
<span>Domain Validation (DV) Certificate</span>
</div>
<div class="cert-feature-item"><span class="cert-check-icon">✓</span>
<span>Supports one domain</span>
</div>
<div class="cert-feature-item"><span class="cert-check-icon">✓</span>
<span>One-year validity</span>
</div>
<div class="cert-feature-item"><span class="cert-check-icon">✓</span>
<span>Rapid issuance</span>
</div>
</div><button class="cert-buy-button">Contact sales in the upper right corner</button>
</div>
<div class="cert-card">
<div class="cert-card-header">
<h2 class="cert-card-title">DV Wildcard Certificate</h2>
</div>
<div class="cert-subtitle">Internationally recognized brand certificate</div>
<div class="cert-price">¥ 1XX<span>/year</span></div>
<div class="cert-features">
<div class="cert-feature-item"><span class="cert-check-icon">✓</span>
<span>Domain Validation (DV) Certificate</span>
</div>
<div class="cert-feature-item"><span class="cert-check-icon">✓</span>
<span>Covers all subdomains</span>
</div>
<div class="cert-feature-item"><span class="cert-check-icon">✓</span>
<span>One-year validity</span>
</div>
<div class="cert-feature-item"><span class="cert-check-icon">✓</span>
<span>Rapid issuance</span>
</div>
</div><button class="cert-buy-button">Contact sales in the upper right corner</button>
</div>
</div>
## Certificate Features
<div class="cert-features-section">
<div class="cert-features-grid">
<div class="cert-feature-card">
<div class="cert-feature-icon">🛡️</div>
<div class="cert-feature-content">
<h3>Safe and Reliable</h3>
<p>Uses international standards to protect website security</p>
</div>
</div>
<div class="cert-feature-card">
<div class="cert-feature-icon">⚡</div>
<div class="cert-feature-content">
<h3>Rapid Issuance</h3>
<p>Simplified issuance process for quick certificate delivery</p>
</div>
</div>
<div class="cert-feature-card">
<div class="cert-feature-icon">💳</div>
<div class="cert-feature-content">
<h3>Flexible Payment</h3>
<p>Multiple specifications available to meet different needs</p>
</div>
</div>
<div class="cert-feature-card">
<div class="cert-feature-icon">👨‍💻</div>
<div class="cert-feature-content">
<h3>Professional Service</h3>
<p>Professional technical support ensures worry-free usage</p>
</div>
</div>
</div>
</div>

59
zh_TW/index.md Normal file
View File

@@ -0,0 +1,59 @@
---
layout: home
hero:
name: 耗子面板
text: Simple · lightweight · efficient
tagline: Enterprise server operation and maintenance management panel
actions:
- theme: brand
text: 🌟 Star
link: https://github.com/tnb-labs/panel
target: _blank
- theme: alt
text: Quick install
link: /quickstart/install
features:
- icon: ✨
title: Extremely low occupancy
details: Developed in Go language, small installation package, low occupancy, single file operation, will not affect system performance
- icon: 🛠
title: Low destructiveness
details: Designed to minimize additional modifications to the system, we make the fewest modifications to the system among similar products
- icon: 📅
title: Follow the times
details: The overall design is at the forefront of the times, with good compatibility with new systems, leading in the same type of products
- icon: 🚀
title: Efficient operation and maintenance
details: Complete functions, strong customization capabilities, can quickly deploy small websites, and deploy complex applications based on customized requirements
- icon: ⛓️‍💥
title: Offline operation
details: Support offline mode, and even stop the panel process after deployment, without affecting any existing services
- icon: 🛡
title: Safe and stable
details: The panel adopts a variety of industry technologies to ensure the security of the body, and has been running stably in multiple survival environments for a long time
- icon: 💽
title: Fully open source
details: Few fully open source panels, you can freely modify and develop the panel on the premise of complying with the open source agreement
- icon: 🆓
title: Permanently free
details: Commit to the panel body will not introduce any charging/authorization functions in the future, and will be permanently free to use
---
## Partners
<div style="display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap;"><a href="https://www.weixiaoduo.com/" style="padding: 1rem;">
<img width="160" src="/wxd.png" alt="WeiXiaoDuo">
</a>
<a href="https://www.dkdun.cn/aff/MQZZNVHQ" style="padding: 1rem;">
<img width="160" src="/dk.png" alt="LinFeng Cloud">
</a>
<a href="https://waf.pro/">
<img width="160" src="/wafpro.png" alt="WAFPRO" style="padding: 1rem;">
</a>
<a href="https://scdn.ddunyun.com/">
<img width="160" src="/ddunyun.png" alt="DunYun SCDN" style="padding: 1rem;">
</a>
<a href="https://1ms.run/" style="padding: 1rem;">
<img width="160" src="/1ms.svg" alt="Millisecond Mirror">
</a>
</div>

View File

@@ -0,0 +1,25 @@
# Manage Containers
Before starting, you need to install the Docker / Podman container engine.
After the container engine is installed, you can go to the Panel's container management section to create containers (pgadmin4 is used as an example here).
First, navigate to the Images tab to pull the required images. This may take several minutes to tens of minutes depending on your network environment.
![Pull Image](/container1.png)
After the image is pulled, navigate to the Containers tab to start creating a container.
![Create Container](/container2.png)
Fill in the form according to the container's instructions. The pgadmin4 image used here needs to map port 80 and configure 2 default environment variables, with no need to map directories.
After the container is created, you can click the refresh button in the upper right corner and the log button on the right side of the container to check if it has started properly.
![Container Start](/container3.png)
If the container fails to start, please make corrections according to the logs.
If you have mapped external ports, you need to go to the firewall menu to allow the corresponding ports.
![Creation Successful](/container4.png)

9
zh_TW/quickstart/disk.md Normal file
View File

@@ -0,0 +1,9 @@
# Mount Partitions
If your server has unmounted data disks, you can log in as `root` user before installation and run the following command to automatically mount them. Cross-directory migration is not supported after Panel installation.
```shell
curl -fsLm 10 -o auto_mount.sh https://dl.cdn.haozi.net/panel/auto_mount.sh && bash auto_mount.sh
```
You can also contact your server provider via ticket to request assistance with mounting partitions, or mount the partitions yourself before installing the Panel.

View File

@@ -0,0 +1,40 @@
# Install Panel
The Panel supports mainstream systems under `amd64` | `arm64` architectures. LNMP environment installation has been tested on all systems listed in the table below.
It is recommended to use systems marked as **recommended**. Unless there are special circumstances, it is not recommended to use systems marked as **not recommended**.
For systems not listed in the table below, you can try installing on your own, but no free technical support will be provided.
| 系統 | 版本 | Note |
| ------------------- | ------------------- | --------------- |
| AlmaLinux | 9 | Recommended |
| AlmaLinux | 8 | Not Recommended |
| RockyLinux | 9 | Supported |
| RockyLinux | 8 | Not Recommended |
| CentOS Stream | 9 | Not Recommended |
| CentOS Stream | 8 | Not Recommended |
| Ubuntu | 24 | Recommended |
| Ubuntu | 22 | Supported |
| Debian | 12 | Recommended |
| Debian | 11 | Supported |
| OpenCloudOS | 9 | Supported |
| TencentOS Server | 4 | Supported |
| TencentOS Server | 3.1 | Not Recommended |
| Alibaba Cloud Linux | 3.2 | Not Recommended |
| Anolis | 8 | Not Recommended |
| openEuler | 22 | Not Recommended |
As system versions continue to update, we may also terminate support for some overly outdated systems to ensure the robustness of the Panel.
## Start Installation
> If you need to mount partitions, please complete before installing the Panel. Cross-directory migration is not supported after Panel installation.
Log in to the server as `root` user and run the following command to install the Panel:
```shell
curl -fsLm 10 -o install.sh https://dl.cdn.haozi.net/panel/install.sh && bash install.sh
```
Installation is usually completed within 2 minutes. Do not close the terminal during the installation process.

27
zh_TW/quickstart/panel.md Normal file
View File

@@ -0,0 +1,27 @@
# Manage Panel
Do not stop or restart the Panel while tasks are still running, as this may cause issues.
- Start Panel: `systemctl start panel`
- Stop Panel: `systemctl stop panel`
- Restart Panel: `systemctl restart panel`
## Panel Command Line
```bash
panel-cli
```
Follow the prompts to complete the necessary commands for operation.
## Uninstall Panel
It is primarily recommended to back up data and reinstall the system, as this ensures a clean system.
If you are unable to reinstall the system, please log in to the server as `root` user and execute the following command to uninstall the Panel:
```shell
curl -fsLm 10 -o uninstall.sh https://dl.cdn.haozi.net/panel/uninstall.sh && bash uninstall.sh
```
Before uninstalling the Panel, be sure to back up all data and uninstall all Panel applications in advance. Data will be **unrecoverable** after uninstallation!

37
zh_TW/support.md Normal file
View File

@@ -0,0 +1,37 @@
---
sidebar: false
prev: false
next: false
---
# Support
## Free Forum Service
We provide a free forum service where you can ask questions, discuss, and share issues related to using the Panel.
- [Moe Tom](https://tom.moe)
## Paid Remote Service
Website errors, slow speed, malware infections? High server resource usage, configuration optimization, intrusion tracing? We provide all these services in one place.
### Remote Service Price List
Remote service refers to our assistance in solving your problems through remote support.
| Service Name | 描述 | Price |
| -------------- | ----------------------------------------------------------------------- | -------- |
| Single Service | Limited to one service session, service ends when the issue is resolved | From ¥50 |
### Service Process
1. Contact us in advance and explain the issue
2. We evaluate the problem, confirm whether it can be resolved, and provide an estimated price
3. After you confirm the price, pay 50% upfront, and the service begins
4. After service completion, you confirm everything is in order and pay the remaining amount
## Contact Us
- [WeChat Work](https://work.weixin.qq.com/kfid/kfc20ea8e38b5a4e73a)
- [QQ 826896000](https://wpa.qq.com/msgrd?v=3&uin=826896000&site=qq&menu=yes)

View File

@@ -0,0 +1,8 @@
# v{{ $params.version }}
- Version Type: {{ $params.type == 'stable' ? 'Stable' : 'Beta' }}
- Release Time: {{ $params.time }}
## Updates log
<!-- @content -->