Xray-core icon indicating copy to clipboard operation
Xray-core copied to clipboard

Wireguard outbound ignores sockopt:domainStrategy setting

Open paratroop3r opened this issue 1 year ago • 1 comments

Hello! In my wireguard connection I have setting:

"streamSettings": {
        "sockopt": {
          "domainStrategy": "UseIP",
          "happyEyeballs": {
            "interleave": 2,
            "maxConcurrentTry": 4,
            "prioritizeIPv6": true,
            "tryDelayMs": 250
          }
        }

I want to prioritize IPv6 connections. With the current code, I see in the log files that the DNS server returns both A and AAAA records for my domain, but the IP address is selected randomly—sometimes IPv6, sometimes IPv4.

So I decided to use the following code. In the log files, I see that the server still returns both A and AAAA records (it should return only AAAA). The address selection remains random, just as before.

"streamSettings": {
        "sockopt": {
          "domainStrategy": "UseIPv6"
        }
"streamSettings": {
        "sockopt": {
          "domainStrategy": "ForeceIPv6"
        }

Then I decided to test same settings with vless connection. When enabling UseIPv6 and ForceIPv6, the DNS server stops providing A records. The system's response to these settings is correct.

paratroop3r avatar Dec 02 '25 05:12 paratroop3r

dup

Fangliding avatar Dec 02 '25 06:12 Fangliding