From 3954ab77f7c95e8f971cc1dc2a567ec2270d44dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=A1=E3=81=8B?= <88967758+chika0801@users.noreply.github.com> Date: Tue, 23 Jan 2024 01:44:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=201.8.7=20=E7=9A=84=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=A1=A5=E5=85=85=E4=BA=86=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E7=9A=84=E5=86=85=E5=AE=B9=20(#459)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update wireguard.md * Update command.md * Update transport.md * Update routing.md * Update routing.md * Update transport.md --- docs/config/outbounds/wireguard.md | 5 +++ docs/config/routing.md | 58 ++++++++++++++++++++++++++++-- docs/config/transport.md | 5 +-- docs/document/command.md | 8 ++++- 4 files changed, 71 insertions(+), 5 deletions(-) diff --git a/docs/config/outbounds/wireguard.md b/docs/config/outbounds/wireguard.md index 69a846b4a..c7ef217ec 100644 --- a/docs/config/outbounds/wireguard.md +++ b/docs/config/outbounds/wireguard.md @@ -134,6 +134,11 @@ Xray-core v1.8.0 - v1.8.4 没有 `"domainStrategy"`。
URL:端口 格式,例如 `engage.cloudflareclient.com:2408`
IP:端口 格式,例如 `162.159.192.1:2408` 或 `[2606:4700:d0::a29f:c001]:2408` +::: tip +当目标地址类型为 URL 时,将使用 Xray-core 内置 DNS 查询 URL 以获取 IP,IPv4 或 IPv6 优先级由 `domainStrategy` 的值控制。
+若没写 `"dns"` 配置,使用系统 DNS 查询 URL 以获取 IP,IPv4 或 IPv6 优先级由系统控制。 +::: + > `publicKey`: string 服务器公钥,用于验证, 必填 diff --git a/docs/config/routing.md b/docs/config/routing.md index 1fa070560..495e73b9c 100644 --- a/docs/config/routing.md +++ b/docs/config/routing.md @@ -89,7 +89,10 @@ > `type`: "field" 目前只支持`"field"`这一个选项。 -Xray-core v1.8.7 前必填,v1.8.7 后可省略该行。 + +::: tip +Xray-core v1.8.7 或更高版本可省略该行。 +::: > `domain`: \[string\] @@ -188,7 +191,10 @@ Xray-core v1.8.7 前必填,v1.8.7 后可省略该行。 ```json { "tag": "balancer", - "selector": [] + "selector": [], + "strategy": { + "type":"roundRobin" + } } ``` @@ -202,6 +208,54 @@ Xray-core v1.8.7 前必填,v1.8.7 后可省略该行。 如果匹配到多个 outbound,负载均衡器目前会从中随机选出一个作为最终的 outbound。 +> `strategy`: \[ string \] + +`"type":"roundRobin"` 表示按顺序选择匹配到的 outbounds tag,若不写 `"strategy"` 字段表示随机选择匹配到的 outbounds tag。 + +配置示例: + +```json + "routing": { + "rules": [ + { + "inboundTag": [ + "in" + ], + "balancerTag": "round" + } + ], + "balancers" : [ + { + "selector": [ + "out" + ], + "strategy": { + "type":"roundRobin" + }, + "tag": "round" + } + ] + } + + "inbounds": [ + { + // 入站配置 + "tag": "in" + } + ] + + "outbounds": [ + { + // 出站配置 + "tag": "out1" + }, + { + // 出站配置 + "tag": "out2" + } + ] +``` + ### 预定义域名列表 此列表预置于每一个 Xray 的安装包中,文件名为 `geosite.dat`。这个文件包含了一些常见的域名,使用方式:`geosite:filename`,如 `geosite:google` 表示对文件内符合 `google` 内包含的域名,进行路由筛选或 DNS 筛选。 diff --git a/docs/config/transport.md b/docs/config/transport.md index c78da5a21..ed224d3b7 100644 --- a/docs/config/transport.md +++ b/docs/config/transport.md @@ -686,8 +686,9 @@ TCP 拥塞控制算法。仅支持 Linux。 > `interface`: "" -指定绑定出口网卡名称,支持 linux / iOS / Mac OS。
-iOS / Mac OS 需要 Xray-core v1.8.6 或更高版本。 +指定绑定出口网卡名称,支持 linux / iOS / Mac OS / Windows。
+iOS / Mac OS 需要 Xray-core v1.8.6 或更高版本。
+Windows 需要 Xray-core v1.8.7 或更高版本。 > `V6Only`: true | false diff --git a/docs/document/command.md b/docs/document/command.md index 3a4498521..60dc4751f 100644 --- a/docs/document/command.md +++ b/docs/document/command.md @@ -6,7 +6,7 @@ Xray 使用 Go 风格的命令及参数 ## 获取基本命令 -您可以运行 `xray help` 来获得所有 xray 最基础的用法, 以及可用的命令及说明. +您可以运行 `xray help` 来获得所有 xray 最基础的用法, 以及可用的命令及说明。 ``` Xray is a platform for building proxies. @@ -58,6 +58,12 @@ without launching the server 配置文件除了默认的 JSON 格式外,也可以使用 TOML 和 YAML。在不指定格式的前提下会通过文件扩展名识别。 ::: +``` + xray run -dump +``` + +用以输出多文件配置融合之后的结果。 + ### xray version 输出 Xray 版本、 Golang 版本等信息。