mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2026-10-12 01:08:24 +03:00
Fix prettier format with version 3.6.2
This commit is contained in:
@@ -67,18 +67,15 @@ Welcome to help Xray become stronger!
|
||||
### Telegram
|
||||
|
||||
- [Project X Discussion Group](https://t.me/projectXray)
|
||||
|
||||
- You can chat freely above the bottom line in the discussion group, don't fight, no abuse of power.
|
||||
- Feel free to ask questions, and try to answer those you know.
|
||||
- No politics, No NSFW
|
||||
|
||||
- [Project VLESS Group](https://t.me/projectVless)
|
||||
|
||||
- The official Xray-core group for non-Chinese participants. Sister group of [Project X](https://t.me/projectXray)
|
||||
- No advertising, No insults, No politics.
|
||||
|
||||
- [Project X Channel](https://t.me/projectXtls)
|
||||
|
||||
- Publish the latest news of Project X
|
||||
|
||||
### Thanks
|
||||
|
||||
@@ -28,12 +28,10 @@ If the domain name to be queried:
|
||||
- Matches the mapping of "domain name - domain name" in the `hosts`, then the value of this mapping (another domain name) will be used as the domain name to be queried, and enter the DNS processing flow until an IP is resolved and returned, or an empty resolution is returned.
|
||||
|
||||
- Does not match `hosts`, but matches the `domains` list in one or more DNS servers, then according to the priority of the matching rule, use the DNS server corresponding to the rule to perform the query in sequence. If the DNS server that is hit fails to query or `expectedIPs` does not match, then use the next hit DNS server to perform the query. Otherwise, return the resolved IP. If all hit DNS servers fail to query or `expectedIPs` does not match, then the DNS component:
|
||||
|
||||
- By default, it will perform "DNS fallback query": use the "DNS server that has not been used in the last failed query and has a default value of `false` for `skipFallback`" to perform the query in sequence. If the query fails or `expectedIPs` does not match, return an empty resolution; otherwise, return the resolved IP.
|
||||
- If `disableFallback` is set to `true`, "DNS fallback query" will not be performed.
|
||||
|
||||
- If neither `hosts` nor the `domains` list in DNS servers matches, then:
|
||||
|
||||
- By default, use the "DNS server that has a default value of `false` for `skipFallback`" to perform the query in sequence. If the first selected DNS server fails to query or `expectedIPs` does not match, then use the next selected DNS server to perform the query. Otherwise, return the resolved IP. If all selected DNS servers fail to query or `expectedIPs` does not match, return an empty resolution.
|
||||
- If the number of "DNS servers that have a default value of `false` for `skipFallback`" is 0 or `disableFallback` is set to `true`, use the first DNS server in the DNS configuration to perform the query. If the query fails or `expectedIPs` does not match, return an empty resolution; otherwise, return the resolved IP.
|
||||
|
||||
@@ -236,8 +234,7 @@ Traffic generated by built-in DNS, except for `localhost`, `fakedns`, `TCPL`, `D
|
||||
"tag": "server-1",
|
||||
"timeoutMs": 4000,
|
||||
"disableCache": false,
|
||||
"finalQuery": false,
|
||||
|
||||
"finalQuery": false
|
||||
}
|
||||
```
|
||||
|
||||
@@ -277,14 +274,14 @@ When this item is configured, Xray DNS will verify the returned IP addresses and
|
||||
|
||||
If this item is not configured, the IP address will be returned as is.
|
||||
|
||||
if you add "*" in this list, the original-IPs still returned if no IP matched.
|
||||
if you add "\*" in this list, the original-IPs still returned if no IP matched.
|
||||
|
||||
> `unexpectedIPs`: [string]
|
||||
|
||||
reverse of `expectedIPs`, an IP is matched if and only if does not match any of the IP-ranges in the list, in other words:
|
||||
`expectedIPs = [0.0.0.0/0, ::/0] - unexpectedIPs.`
|
||||
|
||||
if you add "*" in this list, the original-IPs still returned if no IP matched.
|
||||
if you add "\*" in this list, the original-IPs still returned if no IP matched.
|
||||
|
||||
> `skipFallback`: true | false
|
||||
|
||||
@@ -315,4 +312,3 @@ The tag of this DNS server. If set, it will use this tag as the inbound tag to i
|
||||
`UseIPv4` only queries A records; `UseIPv6` only queries AAAA records. The default value is `UseIP`, which queries both A and AAAA records.
|
||||
|
||||
`UseSystem`, every time dns-Query call, it check the system-network to see if it supports IPv6(and IPv4) or not, if it support IPv6(or IPv4), the IPv6(or IPv4) is also returned, otherwise not returned.
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ The domain name resolution strategy, which uses different strategies based on di
|
||||
- `"AsIs"`: Use only the domain name for routing selection. Default value.
|
||||
|
||||
- `"IPIfNonMatch"`: If the domain name does not match any rule, resolve the domain name into an IP address (A record or AAAA record) and match it again;
|
||||
|
||||
- When a domain name has multiple A records, it will try to match all A records until one of them matches a rule;
|
||||
- The resolved IP only works for routing selection, and the original domain name is still used in the forwarded packets;
|
||||
|
||||
@@ -117,7 +116,6 @@ An array where each item represents an IP range. This rule will take effect when
|
||||
- [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing): In the format of `"10.0.0.0/8"`.
|
||||
|
||||
- Predefined IP lists: These lists are included in every Xray installation package under the file name `geoip.dat`. They can be used in the format of `"geoip:cn"`, where `cn` is a two-letter country code. The prefix `geoip:`(all lowercase) must be used, and nearly all countries that have internet access are supported.
|
||||
|
||||
- Special value: `"geoip:private"`, which includes all private addresses, such as `127.0.0.1`.
|
||||
|
||||
- Loading IP from a file: In the format of `"ext:file:tag"`, where `file` is the file name and `tag` is a label that must exist in the file. The prefix `ext:` (all lowercase) must be used, and the file should be located in the [resource directory](./features/env.md#resource-file-path) with the same format as `geoip.dat`.
|
||||
|
||||
@@ -23,7 +23,6 @@ You can use the `xray api` command to retrieve traffic statistics.
|
||||
The current traffic statistics are as follows:
|
||||
|
||||
- User Data
|
||||
|
||||
- `user>>>[email]>>>traffic>>>uplink`
|
||||
|
||||
The uplink traffic of a specific user, in bytes.
|
||||
@@ -37,7 +36,6 @@ If the corresponding user does not have an email specified, statistics will not
|
||||
:::
|
||||
|
||||
- Global Data
|
||||
|
||||
- `inbound>>>[tag]>>>traffic>>>uplink`
|
||||
|
||||
The uplink traffic of a specific inbound, in bytes.
|
||||
|
||||
@@ -40,12 +40,10 @@ Xray provides two verification methods:
|
||||
### Install Script
|
||||
|
||||
- Linux Script
|
||||
|
||||
- [XTLS/Xray-install](https://github.com/XTLS/Xray-install) (**Official**)
|
||||
- [tempest](https://github.com/team-cloudchaser/tempest) (supports [`systemd`](https://systemd.io) and [OpenRC](https://github.com/OpenRC/openrc); Linux-only)
|
||||
|
||||
* One Click
|
||||
|
||||
- [Xray-REALITY](https://github.com/zxcvos/Xray-script), [xray-reality](https://github.com/sajjaddg/xray-reality), [reality-ezpz](https://github.com/aleskxyz/reality-ezpz)
|
||||
- [Xray_bash_onekey](https://github.com/hello-yunshu/Xray_bash_onekey), [XTool](https://github.com/LordPenguin666/XTool)
|
||||
- [v2ray-agent](https://github.com/mack-a/v2ray-agent), [Xray_onekey](https://github.com/wulabing/Xray_onekey), [ProxySU](https://github.com/proxysu/ProxySU)
|
||||
|
||||
@@ -95,7 +95,6 @@ If you are not using the username `vpsadmin`, please be sure to understand the m
|
||||
```
|
||||
|
||||
5. Modify `nginx.conf` and restart the `Nginx` service, directing the http access on port 80 to the newly created `html` page.
|
||||
|
||||
1. Modify `nginx.conf`.
|
||||
|
||||
```shell
|
||||
|
||||
@@ -90,7 +90,6 @@ chmod +r ~/xray_cert/xray.key
|
||||

|
||||
|
||||
5. `acme.sh` will check the certificate every 60 days and automatically renew the expiring certificate. But as far as I know, it does not automatically install the new certificate to `xray-core`, so we need to add a system automatic periodic task to complete this step.
|
||||
|
||||
1. Basic Linux commands for beginners:
|
||||
|
||||
| Number | Command name | Command description |
|
||||
@@ -124,7 +123,6 @@ 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
|
||||
to enable this setting and delete the restart command in the script.
|
||||
:::
|
||||
|
||||
4. Add [executable] permissions to this file
|
||||
|
||||
```
|
||||
@@ -160,7 +158,6 @@ First, you can refer to the [official VLESS configuration example](https://githu
|
||||
```
|
||||
|
||||
2. Create log files and folders for backup
|
||||
|
||||
1. Basic Linux commands for beginners:
|
||||
| Number | Command name | Command description |
|
||||
|:--:|:--:|:--:|
|
||||
@@ -181,7 +178,6 @@ First, you can refer to the [official VLESS configuration example](https://githu
|
||||
::: 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`.
|
||||
:::
|
||||
|
||||
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
|
||||
chmod a+w ~/xray_log/*.log
|
||||
@@ -403,7 +399,6 @@ If your line really has a very high packet loss rate, the only reliable solution
|
||||
:::
|
||||
|
||||
6. I have said so much because there are too many misconceptions and scam scripts around `BBR` to fool novices. 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)
|
||||
|
||||
1. Add the official `backports` source to Debian 10 to get the updated software library
|
||||
|
||||
```shell
|
||||
@@ -415,7 +410,6 @@ If your line really has a very high packet loss rate, the only reliable solution
|
||||
distributions, it is recommended that you create a `/etc/apt/sources.list.d/` folder and create your own configuration file in this folder, such as `/etc/apt/sources.list.d/vpsadmin.list`
|
||||
, to ensure compatibility and avoid the default file being overwritten in unforeseen circumstances and causing configuration loss.
|
||||
:::
|
||||
|
||||
2. Then add the following item at the end, save and exit.
|
||||
|
||||
```
|
||||
@@ -433,12 +427,10 @@ If your line really has a very high packet loss rate, the only reliable solution
|
||||
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:
|
||||
|
||||
- Take a system snapshot before trying, or
|
||||
- You have `vnc` to save the day (and you know how to use it)
|
||||
|
||||
:::
|
||||
|
||||
4. Modify the `kernel` parameter configuration file `sysctl.conf` and specify to enable `BBR`
|
||||
|
||||
```shell
|
||||
@@ -450,7 +442,6 @@ If your line really has a very high packet loss rate, the only reliable solution
|
||||
folder and create your own configuration file in this folder, such as `/etc/sysctl.d/vpsadmin.conf`, to ensure compatibility, because some distributions no longer read parameters from `/etc/sysctl.conf` after `systemd`
|
||||
207 version. Using a custom configuration file can also prevent the default file from being overwritten in unexpected circumstances, resulting in configuration loss.
|
||||
:::
|
||||
|
||||
5. Add the following content
|
||||
|
||||
```
|
||||
@@ -473,7 +464,6 @@ If your line really has a very high packet loss rate, the only reliable solution
|
||||
:::
|
||||
|
||||

|
||||
|
||||
8. Confirm that `BBR` is enabled
|
||||
|
||||
If you want to confirm whether `BBR` is enabled correctly, you can use the following command:
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
1. APP 要主动或借助转发工具,将数据【流入(`inbounds`)】`Xray` 客户端
|
||||
|
||||
2. 流量进入客户端后,会被【客户端路由(`routing`)】按规则处理后,向不同方向【流出`(outbounds)`】`Xray` 客户端。比如:
|
||||
|
||||
1. 国内流量直连(`direct`)
|
||||
2. 国外流量转发 VPS(`proxy`)
|
||||
3. 广告流量屏蔽(`block`)
|
||||
@@ -52,23 +51,19 @@
|
||||
:::
|
||||
|
||||
- **v2rayN - 适用于 Windows 平台**
|
||||
|
||||
- 请从它的[GitHub 仓库 Release 页面](https://github.com/2dust/v2rayN/releases)获取最新版
|
||||
- 请根据该客户端的说明进行设置
|
||||
|
||||
- **v2rayNG - 适用于 Android 平台**
|
||||
|
||||
- 请从它的[GitHub 仓库 Release 页面](https://github.com/2dust/v2rayNG/releases)获取最新版
|
||||
- 请根据该客户端的说明进行设置
|
||||
|
||||
- **Shadowrocket - 适用于 iOS, 基于苹果 M 芯片的 macOS**
|
||||
|
||||
- 你需要注册一个【非中国区】的 iCloud 账户
|
||||
- 你需要通过 App Store 搜索并购买
|
||||
- 请根据该客户端的说明进行设置
|
||||
|
||||
- **Qv2ray - 跨平台图形界面,适用于 Linux, Windows, macOS**
|
||||
|
||||
- 请从它的[GitHub 仓库 Release 页面](https://github.com/Qv2ray/Qv2ray/releases)获取最新版(还可以从它的[GitHub 自动构建仓库](https://github.com/Qv2ray/Qv2ray/actions)寻找更新的版本)
|
||||
- 请从它的[项目主页](https://qv2ray.net/)学习文档
|
||||
- 请根据该客户端的说明进行设置
|
||||
@@ -98,7 +93,6 @@
|
||||
2. 在合适的文件夹建立空白配置文件:`config.json` (自己常用平台下新建文件大家肯定都会,这就真不用啰嗦了)
|
||||
3. 至于什么是“合适的文件夹”?这就取决于具体的平台了~
|
||||
4. 填写客户端配置
|
||||
|
||||
- 我就以 `8.1` 原理说明里展示的基本三类分流(国内流量直连、国际流量转发 VPS、广告流量屏蔽),结合 `8.2` 的连接要素,写成一个配置文件
|
||||
- 请将 `uuid` 替换成与你服务器一致的 `uuid`
|
||||
- 请将 `address` 替换成你的真实域名
|
||||
|
||||
@@ -198,7 +198,6 @@
|
||||
`vless` 协议流量直接流入 `Xray` 中做后续处理
|
||||
|
||||
3. **非 `VLESS` 协议流量有 4 个不同的回落目标:**
|
||||
|
||||
1. `path` 为 `websocket` 的流量,回落给端口 `1234` 后续处理
|
||||
2. `path` 为 `vmesstcp` 的流量,回落给端口 `2345` 后续处理
|
||||
3. `path` 为 `vmessws` 的流量,回落给端口 `3456` 后续处理
|
||||
@@ -260,7 +259,6 @@
|
||||
```
|
||||
|
||||
看,神奇的事情发生了, `trojan` 协议这里又出现了一个新的 `fallbacks`。前面已经说过,`xray` 中的 `trojan` 协议也具有完整的回落能力,所以,此时 `trojan` 协议可以再次做判断和回落(这也就是传说中的套娃回落了):
|
||||
|
||||
- 所有 `trojan` 协议的流量,流入 `Xray` 中做后续处理
|
||||
- 所有非 `trojan` 协议的流量,转发至 `80` 端口,【主动探测】的防御,完成!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user