Prettified Code!

pull/733/head
dependabot[bot] 2025-08-04 19:24:01 +00:00 committed by yuhan6665
parent 96625d10fc
commit d3ad972fb9
4 changed files with 20 additions and 17 deletions

View File

@ -12,7 +12,7 @@ Xray 的配置文件为 json 格式, 客户端和服务端的配置格式没有
```json ```json
{ {
"vsersion":{}, "vsersion": {},
"log": {}, "log": {},
"api": {}, "api": {},
"dns": {}, "dns": {},

View File

@ -1,3 +1,3 @@
# Dokodemo-Door # Dokodemo-Door
See [Tunnel](./tunnel.md) See [Tunnel](./tunnel.md)

View File

@ -444,7 +444,7 @@ sudo apt update && sudo apt -t buster-backports install linux-image-amd64
::: :::
10. 修改 `kernel` 参数配置文件 `sysctl.conf` 并指定开启 `BBR` 10. 修改 `kernel` 参数配置文件 `sysctl.conf` 并指定开启 `BBR`
```shell ```shell
sudo nano /etc/sysctl.conf sudo nano /etc/sysctl.conf
@ -456,20 +456,20 @@ sudo nano /etc/sysctl.conf
207 版本之后便不再从 `/etc/sysctl.conf` 读取参数。使用自定义配置文件也可避免默认文件在不可预见的情况下被覆盖而导致配置丢失。 207 版本之后便不再从 `/etc/sysctl.conf` 读取参数。使用自定义配置文件也可避免默认文件在不可预见的情况下被覆盖而导致配置丢失。
::: :::
11. 把下面的内容添加进去 11. 把下面的内容添加进去
``` ```
net.core.default_qdisc=fq net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr net.ipv4.tcp_congestion_control=bbr
``` ```
12. 重启 VPS、使内核更新和`BBR`设置都生效 12. 重启 VPS、使内核更新和`BBR`设置都生效
```shell ```shell
sudo reboot sudo reboot
``` ```
13. 完整流程演示如下: 13. 完整流程演示如下:
::: tip 啰嗦君 ::: tip 啰嗦君
因为我做展示的 VPS 支持云服务器专用内核,所以动图中我用了 `linux-image-cloud-amd64` 因为我做展示的 VPS 支持云服务器专用内核,所以动图中我用了 `linux-image-cloud-amd64`
@ -478,7 +478,7 @@ sudo reboot
![更新Debian内核并开启`BBR`](./ch07-img06-bbr-proper.gif) ![更新Debian内核并开启`BBR`](./ch07-img06-bbr-proper.gif)
14. 确认`BBR`开启 14. 确认`BBR`开启
如果你想确认 `BBR` 是否正确开启,可以使用下面的命令: 如果你想确认 `BBR` 是否正确开启,可以使用下面的命令:

View File

@ -123,8 +123,7 @@ chmod +r ~/xray_cert/xray.key
In addition, when recording animated images, the script did not include a command to restart `Xray` because `Xray` plans to support the [Certificate Hot Update] function, which means that `Xray` will automatically identify certificate updates and reload certificates without manual restart. After the function is added, I will modify `config.json` appropriately In addition, when recording animated images, the script did not include a command to restart `Xray` because `Xray` plans to support the [Certificate Hot Update] function, which means that `Xray` will automatically identify certificate updates and reload certificates without manual restart. After the function is added, I will modify `config.json` appropriately
to enable this setting and delete the restart command in the script. to enable this setting and delete the restart command in the script.
::: :::
4. Add [executable] permissions to this file
4. Add [executable] permissions to this file
``` ```
chmod +x ~/xray_cert/xray-cert-renew.sh chmod +x ~/xray_cert/xray-cert-renew.sh
@ -179,7 +178,6 @@ First, you can refer to the [official VLESS configuration example](https://githu
::: warning ::: warning
This location is not the standard log file location of `Xray`. It is placed here to avoid permission issues that cause trouble for new users. Once you are familiar with it, it is recommended to return to the default location: `/var/log/xray/access.log` and `/var/log/xray/error.log`. This location is not the standard log file location of `Xray`. It is placed here to avoid permission issues that cause trouble for new users. Once you are familiar with it, it is recommended to return to the default location: `/var/log/xray/access.log` and `/var/log/xray/error.log`.
::: :::
4. Because Xray is used by the nobody user by default, we need to allow other users to have "write" permissions (`*.log` means all files with the suffix `log`, and the efficiency advantage of the `CLI` interface gradually appears at this time) 4. Because Xray is used by the nobody user by default, we need to allow other users to have "write" permissions (`*.log` means all files with the suffix `log`, and the efficiency advantage of the `CLI` interface gradually appears at this time)
```shell ```shell
@ -424,15 +422,16 @@ deb http://deb.debian.org/debian buster-backports main
9. Refresh the software library and query the latest version of the official Debian kernel and install it. Please be sure to install the version corresponding to your VPS (this article takes the more common [amd64] as an example). 9. Refresh the software library and query the latest version of the official Debian kernel and install it. Please be sure to install the version corresponding to your VPS (this article takes the more common [amd64] as an example).
```shell ```shell
sudo apt update && sudo apt -t buster-backports install linux-image-amd64 sudo apt update && sudo apt -t buster-backports install linux-image-amd64
``` ```
::: warning Note ::: warning Note
If your VPS supports it, you can try the [cloud server dedicated kernel] `linux-image-cloud-amd64`. The advantages are simplicity and low resource usage. The disadvantage is that some students have reported that forced installation on an unsupported system will cause the system to fail to boot (the kernel cannot be recognized). If your VPS supports it, you can try the [cloud server dedicated kernel] `linux-image-cloud-amd64`. The advantages are simplicity and low resource usage. The disadvantage is that some students have reported that forced installation on an unsupported system will cause the system to fail to boot (the kernel cannot be recognized).
To avoid the tragedy of being unable to identify, please make sure: To avoid the tragedy of being unable to identify, please make sure:
- Take a system snapshot before trying, or - Take a system snapshot before trying, or
- You have `vnc` to save the day (and you know how to use it) - You have `vnc` to save the day (and you know how to use it)
@ -459,9 +458,9 @@ net.ipv4.tcp_congestion_control=bbr
12. Restart the VPS to make the kernel update and `BBR` settings take effect 12. Restart the VPS to make the kernel update and `BBR` settings take effect
```shell ```shell
sudo reboot sudo reboot
``` ```
13. The complete process is demonstrated as follows: 13. The complete process is demonstrated as follows:
@ -471,26 +470,30 @@ Because the VPS I am demonstrating supports the cloud server-specific kernel, I
If you are not sure whether your VPS supports it, please follow the command in step 3 and use the regular kernel `linux-image-amd64`. If you are not sure whether your VPS supports it, please follow the command in step 3 and use the regular kernel `linux-image-amd64`.
::: :::
![Update Debian kernel and enable `BBR`](./ch07-img06-bbr-proper.gif) ![Update Debian kernel and enable `BBR`](./ch07-img06-bbr-proper.gif)
14. Confirm that `BBR` is enabled 14. Confirm that `BBR` is enabled
If you want to confirm whether `BBR` is enabled correctly, you can use the following command: If you want to confirm whether `BBR` is enabled correctly, you can use the following command:
```shell ```shell
lsmod | grep bbr lsmod | grep bbr
``` ```
This should return the following result: This should return the following result:
``` ```
tcp_bbr tcp_bbr
``` ```
If you want to confirm whether the `fq` algorithm is enabled correctly, you can use the following command: If you want to confirm whether the `fq` algorithm is enabled correctly, you can use the following command:
```shell ```shell
lsmod | grep fq lsmod | grep fq
``` ```
This should return the following result: This should return the following result:
``` ```
sch_fq sch_fq
``` ```