mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2026-09-30 02:48:12 +03:00
Tutorial: Remove outdated
This commit is contained in:
@@ -6,7 +6,7 @@ This chapter is somewhat special because it involves monetary transactions. Base
|
||||
|
||||
You need to obtain a healthy VPS whose IP is not blocked, and complete the following basic preparations in the management panel:
|
||||
|
||||
1. Install the **Debian 10 64bit** system in the VPS management panel.
|
||||
1. Install the **Debian** system in the VPS management panel.
|
||||
2. Make a note of the VPS IP address (this article will use `"100.200.300.400"` to represent it).
|
||||
::: tip
|
||||
This is a deliberately written illegal IP; please replace it with your real IP.
|
||||
@@ -17,7 +17,7 @@ You need to obtain a healthy VPS whose IP is not blocked, and complete the follo
|
||||
Purchasing a VPS is a relatively complex matter. It is recommended to learn some relevant knowledge first and choose one that fits your financial ability and line quality needs. Additionally, you can choose to take advantage of free offers from major international tech giants (such as the permanent free or limited-time free tiers provided by Oracle and Google). In short, please act according to your means.
|
||||
|
||||
::: tip Note
|
||||
Regarding the choice of Debian 10 as the operating system, let me add a few words here: No matter what you hear online, no matter which "guru" tells you that XXX version of Linux is better or XXX version of Linux is cooler, these Linux distro wars **have absolutely nothing to do with you right now**! Using Debian 10 is sufficient to allow your VPS server to run securely and stably while receiving enough optimization (such as cloud-specific kernels, timely BBR support, etc.). Once you are familiar with Linux, it won't be too late to look back and try other Linux distributions.
|
||||
Regarding the choice of Debian as the operating system, let me add a few words here: No matter what you hear online, no matter which "guru" tells you that XXX version of Linux is better or XXX version of Linux is cooler, these Linux distro wars **have absolutely nothing to do with you right now**! Using the latest Debian stable release is sufficient to allow your VPS server to run securely and stably while receiving enough optimization (such as cloud-specific kernels, timely BBR support, etc.). Once you are familiar with Linux, it won't be too late to look back and try other Linux distributions.
|
||||
:::
|
||||
|
||||
## 2.2 Obtain a Desired Domain Name
|
||||
|
||||
@@ -102,7 +102,7 @@ First, various configurations can refer to the [official VLESS configuration exa
|
||||
|
||||
| Number | Command Name | Command Description |
|
||||
| :------: | :----------: | :-----------------: |
|
||||
| `cmd-16` | `touch` | Create a blank file |
|
||||
| `cmd-15` | `touch` | Create a blank file |
|
||||
|
||||
2. Create a [Log Dedicated Folder] inside the `vpsadmin` folder.
|
||||
|
||||
@@ -309,14 +309,12 @@ So far, we have used `systemctl` related commands like `start`, `status`, `reloa
|
||||
|
||||
In one word: **No! Don't use these! These are names made up just to attract attention!**
|
||||
|
||||
The update and release of `BBR` follow the Linux kernel (`Kernel`). In other words, as long as you use a relatively new kernel, you will naturally use the new version of `BBR`.
|
||||
Those things with cool-sounding names are essentially kernels that the authors have rebuilt with their own tweaked `BBR` parameters. These scripts merely download and install those modified kernels for you.
|
||||
|
||||
And those things with cool names are essentially unreleased kernels still in the testing phase and their corresponding `BBR` versions. These scripts merely enable them by downloading preview kernels (or even third-party modified kernels).
|
||||
|
||||
Kernel stability is the cornerstone of a stable server operation. **[The subtle performance difference brought by the BBR beta version is absolutely not worth swapping for an unstable kernel.]** Please choose the latest kernel supported by your Linux distribution, which maximizes the long-term stability and compatibility of the server.
|
||||
Kernel stability is the cornerstone of a stable server operation. **[The subtle performance difference brought by modified BBR versions is absolutely not worth swapping for an unstable kernel.]** Please choose the latest kernel supported by your Linux distribution, which maximizes the long-term stability and compatibility of the server.
|
||||
|
||||
::: warning
|
||||
The so-called "lead" of modified `bbr` has a very strong timeliness. For example, many `bbrplus` scripts have not been updated for several years, and even now they will replace your kernel with `4.19`. You should know that stable distributions like Debian are already in the `5.9` era. So maybe this script was a little ahead in January 2018, but by October 2018 when 4.19 was officially released, it had lost its meaning. Putting it in use now can even be considered a complete [Downgrade] and [Degradation].
|
||||
The so-called "lead" of modified `bbr` has a very strong timeliness. For example, many `bbrplus` scripts have not been updated for years, and to this day will still downgrade your kernel to a very old version, leaving your system insecure or even unbootable.
|
||||
:::
|
||||
|
||||
4. Which algorithm is better: `fq`, `fq_codel`, `fq_pie`, `cake` or others?
|
||||
@@ -335,93 +333,53 @@ So far, we have used `systemctl` related commands like `start`, `status`, `reloa
|
||||
If your line really has a ridiculously high packet loss rate, the truly reliable solution is to [Change the Line].
|
||||
:::
|
||||
|
||||
6. I've been rambling so much because there are too many misconceptions and pitfall scripts fooling newbies surrounding `BBR`. I hope you now have a relatively clear understanding of `BBR`. Next, let's install the latest Debian kernel and enable `BBR`! (It's really simple)
|
||||
6. I've been rambling so much because there are too many misconceptions and pitfall scripts fooling newbies surrounding `BBR`. I hope you now have a relatively clear understanding of `BBR`. Next, let's enable `BBR`!
|
||||
|
||||
7. Add the official `backports` source to Debian 10 to get updated software libraries.
|
||||
7. Create a parameter configuration file and enable `BBR`.
|
||||
|
||||
```shell
|
||||
sudo nano /etc/apt/sources.list
|
||||
sudo nano /etc/sysctl.d/99-bbr.conf
|
||||
```
|
||||
|
||||
::: warning Note
|
||||
This article takes Debian 10 as an example, so using `/etc/apt/sources.list` is fine. However, if you are not starting from scratch following this article, or are using another Linux distribution, I suggest you create a `/etc/apt/sources.list.d/` folder and create your own configuration file inside this folder, like `/etc/apt/sources.list.d/vpsadmin.list`. This ensures compatibility and avoids configuration loss caused by default files being overwritten in unforeseen circumstances.
|
||||
:::
|
||||
|
||||
8. Then add the following line at the end, save, and exit.
|
||||
|
||||
```
|
||||
deb [http://archive.debian.org/debian](http://archive.debian.org/debian) buster-backports main
|
||||
```
|
||||
|
||||
9. Refresh the software library, query the latest official Debian kernel, and install it. Please be sure to install the version corresponding to your VPS (this article uses the common [amd64] as an example).
|
||||
|
||||
```shell
|
||||
sudo apt update && sudo apt -t buster-backports install linux-image-amd64
|
||||
```
|
||||
|
||||
::: warning Attention
|
||||
If your VPS supports it, you can try the [Cloud Server Dedicated Kernel] `linux-image-cloud-amd64`. The advantage is that it is streamlined and uses fewer resources. The downside is that some students reported that forcing installation on unsupported systems leads to boot failure (Kernel cannot be recognized).
|
||||
|
||||
To avoid the tragedy of being unable to recognize the kernel, please ensure:
|
||||
- Take a system snapshot before trying, or
|
||||
- You have `vnc` to save the situation (and you know how to use it)
|
||||
:::
|
||||
|
||||
10. Modify the `kernel` parameter configuration file `sysctl.conf` and specify enabling `BBR`.
|
||||
|
||||
```shell
|
||||
sudo nano /etc/sysctl.conf
|
||||
```
|
||||
|
||||
::: warning Note
|
||||
This article takes Debian 10 as an example, so using `/etc/sysctl.conf` is fine. However, if you are not starting from scratch following this article, or are using another Linux distribution, I suggest you create a `/etc/sysctl.d/` folder and create your own configuration file inside this folder, like `/etc/sysctl.d/vpsadmin.conf`. This ensures compatibility because some distributions no longer read parameters from `/etc/sysctl.conf` after `systemd` version 207. Using a custom configuration file also avoids configuration loss caused by default files being overwritten in unforeseen circumstances.
|
||||
:::
|
||||
|
||||
11. Add the following content into it:
|
||||
8. Add the following content into it:
|
||||
|
||||
```
|
||||
net.core.default_qdisc=fq
|
||||
net.ipv4.tcp_congestion_control=bbr
|
||||
```
|
||||
|
||||
12. Reboot the VPS to make the kernel update and `BBR` settings take effect.
|
||||
9. Reboot the VPS to make the `BBR` settings take effect.
|
||||
|
||||
```shell
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
13. The complete process demonstration is as follows:
|
||||
|
||||
::: tip Mr. Verbose
|
||||
Because the VPS I used for the demonstration supports the cloud server dedicated kernel, I used `linux-image-cloud-amd64` in the GIF. If you are not sure if your VPS supports it, please be sure to follow the command in step 3 and use the regular kernel `linux-image-amd64`.
|
||||
:::
|
||||
|
||||

|
||||
|
||||
14. Confirm `BBR` is enabled
|
||||
10. Confirm `BBR` is enabled
|
||||
|
||||
If you want to confirm if `BBR` is enabled correctly, you can use the following command:
|
||||
|
||||
```shell
|
||||
lsmod | grep bbr
|
||||
sysctl net.ipv4.tcp_congestion_control
|
||||
```
|
||||
|
||||
It should return a result like this:
|
||||
|
||||
```
|
||||
tcp_bbr
|
||||
net.ipv4.tcp_congestion_control = bbr
|
||||
```
|
||||
|
||||
If you are wondering about the `ipv4` here, don't worry — it's just legacy naming, and the setting takes effect for IPv6 as well.
|
||||
|
||||
If you want to confirm if the `fq` algorithm is enabled correctly, you can use the following command:
|
||||
|
||||
```shell
|
||||
lsmod | grep fq
|
||||
sysctl net.core.default_qdisc
|
||||
```
|
||||
|
||||
It should return a result like this:
|
||||
|
||||
```
|
||||
sch_fq
|
||||
net.core.default_qdisc = fq
|
||||
```
|
||||
|
||||
## 7.8 Server Optimization 2: Enable Auto-Redirect from HTTP to HTTPS
|
||||
|
||||
@@ -18,22 +18,17 @@
|
||||
| `cmd-12` | `wget` | Access (or download) a web file | [[Chapter 6: Certificate Management]](./ch06-certificates.md) |
|
||||
| `cmd-13` | `acme.sh` | Commands related to acme.sh certificate management | [[Chapter 6: Certificate Management]](./ch06-certificates.md) |
|
||||
| `cmd-14` | `rm` | Remove (delete) command | [[Chapter 7: Xray Server]](./ch07-xray-server.md) |
|
||||
| `cmd-15` | `crontab -e` | Edit current user's scheduled tasks | [[Chapter 7: Xray Server]](./ch07-xray-server.md) |
|
||||
| `cmd-16` | `touch` | Create an empty file | [[Chapter 7: Xray Server]](./ch07-xray-server.md) |
|
||||
| `cmd-17` | `systemctl` | Basic `systemd` service management command | [[Chapter 7: Xray Server]](./ch07-xray-server.md) |
|
||||
| `cmd-18` | `reboot` | Reboot the Linux system | [[Chapter 7: Xray Server]](./ch07-xray-server.md) |
|
||||
| `cmd-15` | `touch` | Create an empty file | [[Chapter 7: Xray Server]](./ch07-xray-server.md) |
|
||||
| `cmd-16` | `systemctl` | Basic `systemd` service management command | [[Chapter 7: Xray Server]](./ch07-xray-server.md) |
|
||||
| `cmd-17` | `reboot` | Reboot the Linux system | [[Chapter 7: Xray Server]](./ch07-xray-server.md) |
|
||||
|
||||
## 2. Index of Important Linux Configuration Files for Beginners
|
||||
|
||||
| ID | Config File Location | File Description | Featured Chapter |
|
||||
| :-------: | :-------------------------------------- | :---------------------------------------- | :------------------------------------------------: |
|
||||
| `conf-01` | `/etc/ssh/sshd_config` | SSH remote login program settings | [[Chapter 3: Remote Login]](./ch03-ssh.md) |
|
||||
| `conf-02` | `/etc/nginx/nginx.conf` | Nginx program settings | [[Chapter 5: Website Building]](./ch05-webpage.md) |
|
||||
| `conf-03` | `/etc/apt/sources.list` | apt software source list | [[Chapter 7: Xray Server]](./ch07-xray-server.md) |
|
||||
| `conf-04` | `/etc/apt/sources.list.d/vpsadmin.list` | User-defined software source list | [[Chapter 7: Xray Server]](./ch07-xray-server.md) |
|
||||
| `conf-05` | `crontab -e` | Current user's scheduled tasks | [[Chapter 7: Xray Server]](./ch07-xray-server.md) |
|
||||
| `conf-06` | `/etc/sysctl.conf` | Manual kernel parameter settings | [[Chapter 7: Xray Server]](./ch07-xray-server.md) |
|
||||
| `conf-07` | `/etc/sysctl.d/vpsadmin.conf` | User-defined kernel parameter config file | [[Chapter 7: Xray Server]](./ch07-xray-server.md) |
|
||||
| ID | Config File Location | File Description | Featured Chapter |
|
||||
| :-------: | :-------------------------- | :---------------------------------- | :------------------------------------------------: |
|
||||
| `conf-01` | `/etc/ssh/sshd_config` | SSH remote login program settings | [[Chapter 3: Remote Login]](./ch03-ssh.md) |
|
||||
| `conf-02` | `/etc/nginx/nginx.conf` | Nginx program settings | [[Chapter 5: Website Building]](./ch05-webpage.md) |
|
||||
| `conf-03` | `/etc/sysctl.d/99-bbr.conf` | Custom kernel parameter config file | [[Chapter 7: Xray Server]](./ch07-xray-server.md) |
|
||||
|
||||
## 3. Index of Important Xray Files for Beginners
|
||||
|
||||
|
||||
Reference in New Issue
Block a user