mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2026-09-22 22:38:05 +03:00
Docs: Fix VitePress container formatting
This commit is contained in:
@@ -17,7 +17,8 @@ HTTP 协议。
|
||||
|
||||
- `export http_proxy=http://127.0.0.1:8080/` (地址须改成你配置的 HTTP 入站代理地址)
|
||||
- `export https_proxy=$http_proxy`
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
## InboundConfigurationObject
|
||||
|
||||
|
||||
@@ -65,7 +65,8 @@ Vmess 的用户 ID,可以是任意小于 30 字节的字符串, 也可以是
|
||||
|
||||
- 写 `"id": "我爱🍉老师1314"`,
|
||||
- 或写 `"id": "5783a3e7-e373-51cd-8642-c83782b807c5"` (此 UUID 是 `我爱🍉老师1314` 的 UUID 映射)
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
其映射标准在 [VLESS UUID 映射标准:将自定义字符串映射为一个 UUIDv5](https://github.com/XTLS/Xray-core/issues/158)
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ gRPC(HTTP/2)内置多路复用,不建议使用 gRPC 与 HTTP/2 时启用 m
|
||||
- gRPC 不支持指定 Host。请在出站代理地址中填写 **正确的域名** ,或在 `(x)tlsSettings` 中填写 `ServerName`,否则无法连接。
|
||||
- gRPC 不支持回落到其他服务。
|
||||
- gRPC 服务存在被主动探测的风险。建议使用 Caddy 或 Nginx 等反向代理工具,通过 Path 前置分流。
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
::: tip
|
||||
如果您使用 Caddy 或 Nginx 等反向代理,请注意下列事项:
|
||||
@@ -23,7 +24,8 @@ gRPC(HTTP/2)内置多路复用,不建议使用 gRPC 与 HTTP/2 时启用 m
|
||||
- 请使用 HTTP/2 或 h2c (Caddy),grpc_pass (Nginx) 连接到 Xray。
|
||||
- 普通模式的 Path 为 `/${serviceName}/Tun`, Multi 模式为 `/${serviceName}/TunMulti`
|
||||
- 如果需要接收客户端 IP,可以通过由 Caddy / Nginx 发送 `X-Real-IP` header 来传递客户端 IP。
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
::: tip
|
||||
如果你正在使用回落,请注意下列事项:
|
||||
@@ -31,7 +33,8 @@ gRPC(HTTP/2)内置多路复用,不建议使用 gRPC 与 HTTP/2 时启用 m
|
||||
- 不建议回落到 gRPC,存在被主动探测的风险。
|
||||
- 请确认`h2` 位于 (x)tlsSettings.alpn 中的第一顺位,否则 gRPC(HTTP/2)可能无法完成 TLS 握手。
|
||||
- gRPC 无法通过进行 Path 分流。
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
## GRPCObject
|
||||
|
||||
|
||||
@@ -111,7 +111,8 @@ xray run -config http+unix:///run/xray-config.sock/config.json
|
||||
|
||||
- 工作目录(Working Directory)
|
||||
- [环境变量](../config/env.md#资源文件路径)中 `Xray.location.asset` 所指定的路径
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
```bash
|
||||
xray run -dump
|
||||
@@ -256,7 +257,8 @@ xray wg [-i "(base64.StdEncoding)"]
|
||||
|
||||
- 工作目录(Working Directory)
|
||||
- [环境变量](../config/env.md#资源文件路径)中 `Xray.location.asset` 所指定的路径
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
### xray mldsa65
|
||||
|
||||
|
||||
@@ -89,7 +89,8 @@
|
||||
|
||||
- 如果是 【非 `root` 用户】,`“~”` 就等价于 `/home/用户名`
|
||||
- 如果是 【 `root` 用户】,`“~”` 就等价于 `/root`
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
4. 把下面的内容完整的复制进去,然后保存(`ctrl+o`)退出(`ctrl+x`)
|
||||
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
|
||||
- 当你的第一个出站是 `[direct-out]` 时:**需要直连的都正确了,但需要代理的则都错误**
|
||||
- 当你的第一个出站是 `[proxy-out-vless]` 时:**需要代理的都正确了,但需要直连的则都错误**
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
所以,我们需要一个办法,让我们鱼与熊掌兼得。这样的办法是否存在呢?**当然存在!** 我们需要的只是【域名】之外更多的【**分流判断依据**】而已。
|
||||
|
||||
|
||||
@@ -63,7 +63,8 @@ PostDown = ip -6 rule del oif %i lookup <table>
|
||||
- 送入此设备 `%i` 的连接 / 送入此 `<IPv4/6>` 的连接 / `fwmark` 被标记为 `<mark>` 的连接
|
||||
- 将会使用 wireguard 进行转发
|
||||
- `%i` 是 wireguard 配置文件中的占位符,表示在启动时替换为这个设备的名称
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
保存
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ Use the following environment variables in Linux to enable a global HTTP proxy f
|
||||
|
||||
- `export http_proxy=http://127.0.0.1:8080/` (Address must be changed to your configured HTTP inbound proxy address)
|
||||
- `export https_proxy=$http_proxy`
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
## InboundConfigurationObject
|
||||
|
||||
|
||||
@@ -65,7 +65,8 @@ A custom string and its mapped UUID are equivalent. This means you can identify
|
||||
|
||||
- Write `"id": "我爱🍉老师1314"`,
|
||||
- Or write `"id": "5783a3e7-e373-51cd-8642-c83782b807c5"` (This UUID is the UUID mapping of `我爱🍉老师1314`)
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
The mapping standard is described in [VLESS UUID Mapping Standard: Mapping Custom Strings to UUIDv5](https://github.com/XTLS/Xray-core/issues/158).
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ gRPC (HTTP/2) has built-in multiplexing. It is not recommended to enable mux.coo
|
||||
- gRPC does not support specifying Host. Please fill in the **correct domain name** in the outbound proxy address, or fill in `ServerName` in `(x)tlsSettings`, otherwise the connection will fail.
|
||||
- gRPC does not support falling back to other services.
|
||||
- gRPC services are at risk of active probing. It is recommended to use reverse proxy tools such as Caddy or Nginx to split traffic via Path prefix.
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
::: tip
|
||||
If you use reverse proxies like Caddy or Nginx, please note the following:
|
||||
@@ -23,7 +24,8 @@ If you use reverse proxies like Caddy or Nginx, please note the following:
|
||||
- Use HTTP/2 or h2c (Caddy), grpc_pass (Nginx) to connect to Xray.
|
||||
- The Path for normal mode is `/${serviceName}/Tun`, and for Multi mode is `/${serviceName}/TunMulti`.
|
||||
- If you need to receive the client IP, you can pass the client IP by having Caddy / Nginx send the `X-Real-IP` header.
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
::: tip
|
||||
If you are using fallback, please note the following:
|
||||
@@ -31,7 +33,8 @@ If you are using fallback, please note the following:
|
||||
- Falling back to gRPC is not recommended due to the risk of active probing.
|
||||
- Please ensure `h2` is in the first position in (x)tlsSettings.alpn, otherwise gRPC (HTTP/2) may fail to complete the TLS handshake.
|
||||
- gRPC cannot be split by Path.
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
## GRPCObject
|
||||
|
||||
|
||||
@@ -111,7 +111,8 @@ When `-config` is not specified, Xray will attempt to load `config.json` from th
|
||||
|
||||
- Working Directory
|
||||
- The path specified by `Xray.location.asset` in [Environment Variables](../config/env.md#resource-file-path)
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
```bash
|
||||
xray run -dump
|
||||
@@ -256,7 +257,8 @@ When `-config` is not specified, Xray will attempt to load `config.json` from th
|
||||
|
||||
- Working Directory
|
||||
- The path specified by `Xray.location.asset` in [Environment Variables](../config/env.md#resource-file-path)
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
### xray mldsa65
|
||||
|
||||
|
||||
@@ -89,7 +89,8 @@ Now for the second question:
|
||||
If you are not using the username `vpsadmin`, please understand the meaning of the `“~”` symbol in this command (this relates to the content you will write in [Step 5]):
|
||||
- If you are a [non-root user], `“~”` is equivalent to `/home/username`.
|
||||
- If you are the [root user], `“~”` is equivalent to `/root`.
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
4. Copy the content below completely into the file, then save (`ctrl+o`) and exit (`ctrl+x`).
|
||||
|
||||
|
||||
@@ -36,7 +36,8 @@ Let's review: what happens when the situations above cannot be matched? That's r
|
||||
|
||||
- When your first outbound is `[direct-out]`: **Everything needing direct connection is correct, but everything needing proxy is wrong.**
|
||||
- When your first outbound is `[proxy-out-vless]`: **Everything needing proxy is correct, but everything needing direct connection is wrong.**
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
Therefore, we need a way to have our cake and eat it too. Does such a way exist? **Of course!** All we need are more **[Shunting Judgment Criteria]** beyond just **[Domain]**.
|
||||
|
||||
|
||||
@@ -62,7 +62,8 @@ PostDown = ip -6 rule del oif %i lookup <table>
|
||||
- Connections sent to this device `%i` / Connections sent to this `<IPv4/6>` / Connections marked with `fwmark` `<mark>`
|
||||
- Will be forwarded using WireGuard.
|
||||
- `%i` is a placeholder in the WireGuard configuration file, which represents the device name to be replaced at startup.
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
Save it.
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
|
||||
- `export http_proxy=http://127.0.0.1:8080/` (замените адрес на адрес вашего настроенного входящего HTTP-прокси)
|
||||
- `export https_proxy=$http_proxy`
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
## InboundConfigurationObject
|
||||
|
||||
|
||||
@@ -66,7 +66,8 @@ LogObject соответствует полю `log` в конфигурацио
|
||||
2. DNS-запросы, сделанные встроенными DNS-клиентами, также записываются в журнал ошибок (с уровнем "Info") даже если эта опция отключена.
|
||||
|
||||
3. Запросы клиента FakeDNS никогда не записываются в журнал доступа.
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
> `maskAddress`: "quarter" | "half" | "full"
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ gRPC (HTTP/2) имеет встроенное мультиплексирован
|
||||
- gRPC не поддерживает указание Host. Пожалуйста, укажите **правильное доменное имя** в адресе исходящего прокси или укажите `ServerName` в `(x)tlsSettings`, иначе подключение не будет установлено.
|
||||
- gRPC не поддерживает fallback на другие сервисы.
|
||||
- Существует риск активного сканирования сервисов gRPC. Рекомендуется использовать обратный прокси-сервер, такой как Caddy или Nginx, для предварительного разделения трафика по пути.
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
::: tip
|
||||
Если вы используете обратный прокси-сервер, такой как Caddy или Nginx, обратите внимание на следующие моменты:
|
||||
@@ -23,7 +24,8 @@ gRPC (HTTP/2) имеет встроенное мультиплексирован
|
||||
- Используйте HTTP/2 или h2c (Caddy), grpc_pass (Nginx) для подключения к Xray.
|
||||
- Путь в обычном режиме: `/${serviceName}/Tun`, в режиме Multi: `/${serviceName}/TunMulti`.
|
||||
- Если необходимо получать IP-адрес клиента, его можно передать через заголовок `X-Real-IP`, отправленный Caddy / Nginx.
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
::: tip
|
||||
Если вы используете fallback, обратите внимание на следующие моменты:
|
||||
@@ -31,7 +33,8 @@ gRPC (HTTP/2) имеет встроенное мультиплексирован
|
||||
- Не рекомендуется использовать fallback на gRPC, так как существует риск активного сканирования.
|
||||
- Убедитесь, что `h2` находится на первом месте в (x)tlsSettings.alpn, иначе gRPC (HTTP/2) может не завершить TLS-рукопожатие.
|
||||
- gRPC не поддерживает маршрутизацию на основе path с помощью Xray.
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
## GRPCObject
|
||||
|
||||
|
||||
@@ -112,7 +112,8 @@ xray run -config http+unix:///run/xray-config.sock/config.json
|
||||
|
||||
- Рабочий каталог (Working Directory)
|
||||
- Путь, указанный в переменной окружения `Xray.location.asset` в [переменных окружения](../config/env.md#путь-к-файлам-ресурсов)
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
```bash
|
||||
xray run -dump
|
||||
@@ -257,7 +258,8 @@ xray wg [-i "(base64.StdEncoding)"]
|
||||
|
||||
- Рабочий каталог (Working Directory);
|
||||
- Путь, указанный в переменной окружения `Xray.location.asset` (см. [Переменные окружения](../config/env.md#путь-к-файлам-ресурсов)).
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
### xray mldsa65
|
||||
|
||||
|
||||
@@ -89,7 +89,8 @@
|
||||
|
||||
- Для пользователей, **отличных от `root`**: `~` эквивалентно `/home/имя_пользователя`.
|
||||
- Для пользователя **`root`**: `~` эквивалентно `/root`.
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
4. Скопируйте следующий код в файл `index.html` и сохраните его (`Ctrl+O`, `Enter`), затем выйдите из редактора (`Ctrl+X`):
|
||||
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
|
||||
- если вашим первым исходящим трафиком является `[direct-out]`: **все, что должно идти напрямую, будет работать правильно, а все, что должно проксироваться, будет работать неправильно**;
|
||||
- если вашим первым исходящим трафиком является `[proxy-out-vless]`: **все, что должно проксироваться, будет работать правильно, а все, что должно идти напрямую, будет работать неправильно**.
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
Поэтому нам нужен способ, который позволит нам получить и то, и другое. Существует ли такой способ? **Конечно, существует!** Нам просто нужны дополнительные **критерии сопоставления** помимо **домена**.
|
||||
|
||||
|
||||
@@ -62,7 +62,8 @@ PostDown = ip -6 rule del oif %i lookup <table>
|
||||
- Подключения, поступающие на этот интерфейс `%i`, с этого IP-адреса `<IPv4/6>` или помеченные `fwmark` как `<mark>`,
|
||||
- будут перенаправлены через WireGuard.
|
||||
- `%i` - это заполнитель в конфигурационном файле WireGuard, который будет заменен на имя интерфейса во время запуска.
|
||||
:::
|
||||
|
||||
:::
|
||||
|
||||
Сохраните файл.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user