diff --git a/.vitepress/config/en.ts b/.vitepress/config/en.ts index 3592292..84b8d0e 100644 --- a/.vitepress/config/en.ts +++ b/.vitepress/config/en.ts @@ -1,4 +1,4 @@ -import {defineConfig, type DefaultTheme} from 'vitepress' +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) => { @@ -7,7 +7,8 @@ const versions = resp.data.slice(0, 10).map((item: any) => { export const config = defineConfig({ lang: 'en-US', - description: "Goravel is a web application framework with complete functions and excellent scalability. As a starting scaffolding to help Gopher quickly build their own applications.", + title: 'RatPanel', + description: "Simple · lightweight · efficient", themeConfig: { nav: nav(), @@ -15,12 +16,12 @@ export const config = defineConfig({ sidebar: [ { text: "Quickstart", - base: '/quickstart/', + base: '/quickstart', items: sidebarQuickstart() }, { text: "Advanced", - base: '/advanced/', + base: '/advanced', items: sidebarAdvanced() }, { @@ -42,7 +43,7 @@ export const config = defineConfig({ text: 'Edit this page on GitHub' }, footer: { - message: 'Released under the MIT License', + message: 'It is strictly forbidden to use Rat Panel for illegal activities, and our company does not provide any services to violators', copyright: `Copyright © 2022-${new Date().getFullYear()} Tianjin Rat Technology Co., Ltd All Rights Reserved` }, docFooter: { diff --git a/.vitepress/config/index.ts b/.vitepress/config/index.ts index 7dac8e5..54a0917 100644 --- a/.vitepress/config/index.ts +++ b/.vitepress/config/index.ts @@ -1,6 +1,7 @@ -import { defineConfig } from 'vitepress' -import { shared } from './shared' -import { config as en } from './en' +import {defineConfig} from 'vitepress' +import {shared} from './shared' +import {config as en} from './en' +import {config as zh_CN} from './zh_CN' // https://vitepress.dev/reference/site-config @@ -8,5 +9,6 @@ export default defineConfig({ ...shared, locales: { root: { label: 'English', ...en }, + zh_CN: {label: '简体中文', ...zh_CN}, }, }) \ No newline at end of file diff --git a/.vitepress/config/shared.ts b/.vitepress/config/shared.ts index 1d461b2..85f42c5 100644 --- a/.vitepress/config/shared.ts +++ b/.vitepress/config/shared.ts @@ -27,7 +27,7 @@ export const shared = defineConfig({ md.use(groupIconMdPlugin); md.use(timeline); }, - languages: ['go', 'bash', 'shell'] + languages: ['go', 'bash', 'shell', 'nginx', 'ini', 'docker', 'dockerfile', 'json', 'yml', 'yaml'] }, themeConfig: { diff --git a/.vitepress/config/zh_CN.ts b/.vitepress/config/zh_CN.ts new file mode 100644 index 0000000..e6b2dc8 --- /dev/null +++ b/.vitepress/config/zh_CN.ts @@ -0,0 +1,133 @@ +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: '严禁使用耗子面板从事违法活动,我司不对违规用户提供任何服务', + copyright: `© 2022-${new Date().getFullYear()} 天津耗子科技有限公司 版权所有丨津ICP备2022009678号-1丨津公网安备12011502000848号` + }, + 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'}, + ] +} + +function sidebarQuickstart(): DefaultTheme.SidebarItem[] { + 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: '配置 QUIC(HTTP3)', + link: '/quic' + }, + { + text: '配置 TLSv1.1 TLSv1', + link: '/tls' + }, + { + text: '安全性建议', + link: '/safe' + }, + ] +} \ No newline at end of file diff --git a/en/about.md b/en/about.md index 33c5329..bf3083e 100644 --- a/en/about.md +++ b/en/about.md @@ -30,10 +30,7 @@ const members = [ # About -## About RatPanel - -RatPanel is a professional server operation and maintenance management panel dedicated to providing users with simple, -efficient, and secure server management solutions. +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 | |----------------------------------------------------------|---------------------------------------------|---------------------------------------------------| diff --git a/en/advanced/api.md b/en/advanced/api.md index d4df920..32afddb 100644 --- a/en/advanced/api.md +++ b/en/advanced/api.md @@ -2,8 +2,7 @@ ## 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. +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 @@ -13,8 +12,7 @@ signature authentication to ensure the security and integrity of communications. ## Authentication Mechanism -The API uses the HMAC-SHA256 signature algorithm for authentication. Each request must include the following HTTP -headers: +The API uses the HMAC-SHA256 signature algorithm for authentication. Each request must include the following HTTP headers: | Header Name | Description | |-----------------|------------------------------------------------------------------------------------------| @@ -652,8 +650,7 @@ sendApiRequest(); 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 +- 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 diff --git a/en/advanced/hub-mirror.md b/en/advanced/hub-mirror.md index ab0e293..6625a25 100644 --- a/en/advanced/hub-mirror.md +++ b/en/advanced/hub-mirror.md @@ -1,7 +1,6 @@ # 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. +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 @@ -16,8 +15,7 @@ location = "docker.io" 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. +Where docker.1ms.run is the configured image acceleration address. You can refer to other tutorials to set up and use it. ## For Docker @@ -31,5 +29,4 @@ Add the following configuration and save: } ``` -Where https://docker.1ms.run is the configured image acceleration address. You can refer to other tutorials to set up -and use it. \ No newline at end of file +Where https://docker.1ms.run is the configured image acceleration address. You can refer to other tutorials to set up and use it. diff --git a/en/advanced/proxy.md b/en/advanced/proxy.md index b719073..9f20848 100644 --- a/en/advanced/proxy.md +++ b/en/advanced/proxy.md @@ -1,7 +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. +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. +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. diff --git a/en/advanced/quic.md b/en/advanced/quic.md index 344263a..84c2a14 100644 --- a/en/advanced/quic.md +++ b/en/advanced/quic.md @@ -1,17 +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. +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. +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`. +* 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`. diff --git a/en/advanced/safe.md b/en/advanced/safe.md index 6b66bfb..ef2908c 100644 --- a/en/advanced/safe.md +++ b/en/advanced/safe.md @@ -4,15 +4,11 @@ With the following security measures, almost all hacking/malware issues can be p ### Website Aspects -Based on past experience, most hacking and malware incidents are caused by program vulnerabilities, unrelated to the -Panel or environment. For website security, you should: +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 multi-factor - authentication (2FA) for your programs. +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. @@ -21,25 +17,16 @@ Panel or environment. For website security, you should: 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. +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.). +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.). diff --git a/en/advanced/supervisor.md b/en/advanced/supervisor.md index 6df9c5f..312e3da 100644 --- a/en/advanced/supervisor.md +++ b/en/advanced/supervisor.md @@ -1,6 +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). +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) diff --git a/en/advanced/tls.md b/en/advanced/tls.md index 3c975d8..08cab0e 100644 --- a/en/advanced/tls.md +++ b/en/advanced/tls.md @@ -1,7 +1,6 @@ # 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. +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. @@ -9,4 +8,4 @@ Of course, if your business must use these two protocols, you can enable them us 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; -``` \ No newline at end of file +``` diff --git a/en/cert.md b/en/cert.md index 018145a..440fa8e 100644 --- a/en/cert.md +++ b/en/cert.md @@ -6,11 +6,9 @@ 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. +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. +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. + +## 选购证书 + +
采用国际标准,保护网站安全
+简化签发流程,快速颁发证书
+多种规格可选,满足不同需求
+专业技术支持,保障使用无忧
+