diff --git a/docs/en/config/outbounds/wireguard.md b/docs/en/config/outbounds/wireguard.md index 652839527..a73ff966f 100644 --- a/docs/en/config/outbounds/wireguard.md +++ b/docs/en/config/outbounds/wireguard.md @@ -26,7 +26,7 @@ Wireguard is a standard implementation of the Wireguard protocol. "mtu": 1420, // optional, default 1420 "reserved": [1, 2, 3], "workers": 2 // optional, default runtime.NumCPU() - "domainStrategy": "ForceIP" // Requires Xray-core v1.8.6 or higher + "domainStrategy": "ForceIP" } ``` @@ -48,9 +48,11 @@ The fragment size of the underlying `tun` device in Wireguard. > `reserved` \[ number \] -Wireguard Reserved Bytes.
-For example, when connecting to warp via wireguard, some IPs in Hong Kong and Los Angeles need to have a reserved value in order to connect successfully due to cloudflare limitations.
-The value of reserved can be obtained using third-party tools such as [warp-reg](https://github.com/badafans/warp-reg)、[warp-reg.sh](https://github.com/chise0713/warp-reg.sh) +Wireguard Reserved Bytes. + +Xray-core v1.8.0 New parameter.
+When connecting to warp via wireguard, due to cloudflare limitations, some IPs in Hong Kong and Los Angeles need to have a `reserved` value in order to connect successfully.
+The value of `reserved` can be obtained using third-party tools such as [warp-reg](https://github.com/badafans/warp-reg), [warp-reg.sh](https://github.com/chise0713/warp-reg.sh).。 > `workers`: int @@ -62,9 +64,46 @@ A list of Wireguard servers, where each item is a server configuration. > `domainStrategy`: "ForceIPv6v4" | "ForceIPv6" | "ForceIPv4v6" | "ForceIPv4" | "ForceIP" -Requires Xray-core v1.8.6 or higher.
-The default value is `"ForceIP"` when left blank.
-When the incoming request is for a domain name, regardless of whether `domainStrategy` is left empty (or if `domainStrategy` is not written), use the [built-in DNS server](./dns.md) to get an IP (if the DNS part is not written in the configuration, system DNS is used), and this IP is used to send the connection via wireguard. +Xray-core v1.8.6 New parameter.
+If you do not write this parameter, or leave it blank, the default value is `"ForceIP"`.
+When the destination address is a domain name, use the Xray-core [built-in DNS server](./dns.md) to get an IP (if no `"dns"` configuration is written, system DNS is used), and send a connection to this IP via wireguard.
+ +| domainStrategy | test-ipv6.com | bgp.he.net | chat.openai.com | +| :--- | :---: | :---: | :---: | +| ForceIPv6v4 | IPv6v4 | IPv6 | IPv6 | +| ForceIPv6 | The website won't open. | IPv6 | IPv6 | +| ForceIPv4v6 | IPv6v4 **1** | IPv4 | IPv4 | +| ForceIPv4 | IPv4 | IPv4 | IPv4 | +| ForceIP | IPv6v4 **2** | IPv6 | IPv6 | + +**1:** Tip `You already have an IPv6 address, but your browser is less inclined to use it, which is more worrying. `
+**2:** The chances of prompting `You already have an IPv6 address, but your browser is less inclined to use it, which is more worrisome. ` + +**Note 1**: +- Conflicts with `"queryStrategy"` may cause the site to fail to open. +- For example when `domainStrategy: "ForceIPv4"` is used, geosite:openai's site with `"queryStrategy": "UseIPv6"` will fail to open. + +```jsonc + "dns": { + "servers": [ + "https://1.1.1.1/dns-query", + { + "address": "https://1.1.1.1/dns-query", + "domains": [ + "geosite:openai" + ], + "skipFallback": true, + "queryStrategy": "UseIPv6" // Query only AAAA records. + } + ], + "queryStrategy": "UseIP" // If this parameter is not written, the default value is UseIP, i.e. both A and AAAA records are queried, optional values are UseIPv4 and UseIPv6, other record types are queried by the system DNS. + }, +``` + +**Note 2**: +- Xray-core v1.8.0 - v1.8.4 without `"domainStrategy"`. +- When the destination address is a domain name, use the Xray-core built-in DNS server query to obtain the IP, using the value of `"queryStrategy"` in the `"dns"` configuration to control the IPv4 or IPv6 priority. +- If the `"dns"` configuration is not written, the system DNS query is used to obtain IP, and the IPv4 or IPv6 priority is controlled by the system. ### Peers @@ -82,9 +121,8 @@ When the incoming request is for a domain name, regardless of whether `domainStr The server address. Required. -::: tip -Use the format `url:port`, for example, `engage.cloudflareclient.com:2408`. -::: +URL:port format, e.g. `engage.cloudflareclient.com:2408`.
+IP:port format, e.g. `162.159.192.1:2408` or `[2606:4700:d0::a29f:c001]:2408`. > `publicKey`: string