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

Domain Configuration Issue in V2Ray

Open deadmann opened this issue 2 years ago • 0 comments
trafficstars

I'm currently using two different V2Ray servers for my network setup: one is X-UI running on a Linux machine, and the other is an executable downloaded from v2ray.com, running on a Windows machine.

When using X-UI, it conveniently generates the VMess URL automatically. However, for the V2Ray server on Windows, I need to manually create a configuration file and then convert it into a VMess URL using a Python script. While I'm not an expert in V2Ray configuration, I've managed to create a V2Ray configuration that looks like this:

{
  "remarks": "G1Mess",
  "inbounds": [{
    "port": 1080,
    "listen": "127.0.0.1",
    "protocol": "socks",
    "settings": {
      "udp": true
    }
  }],
  "outbounds": [{
    "protocol": "vmess",
    "settings": {
      "vnext": [{
        "address": "<SERVER_ADDRESS_XXX>",
        "port": <SERVER_PORT_XXX>,
        "users": [{ "id": "<USER_ID_XXX>" }]
      }]
    }
  },{
    "protocol": "freedom",
    "tag": "direct",
    "settings": {}
  }],
  "routing": {
    "domainStrategy": "IPOnDemand",
    "rules": [{
      "type": "field",
      "ip": ["geoip:private"],
      "outboundTag": "direct"
    }]
  }
}

For the Windows setup, I've created two config files—one with a domain and another without a domain. On the Linux side, which directly provides VMess URLs, I've also created three configurations: one without TLS, another with VMess and TLS, and a third one with VLess and TLS. Additionally, on the client side (using V2RayN), I've duplicated the VMess non-secure configuration and manually added the domain name instead of the IP address.

Now, here's the issue: With both V2Ray servers, everything works perfectly when using IP configurations. However, when switching to domain configurations, even with a non-secure channel (Non-TLS version), which mirrors the IP setup, nothing seems to work. Even when I click on the "One-Click multiple test Latency and Speed (Ctrl+E)" button, only the IP-versioned configuration shows latency, while all others, including the one I'm connected to, display latency as -1 and "skip test" for speed. Oddly, it appears there's some connection, as the singbox_tun Ethernet becomes available, but there's no actual traffic passing through or functioning as expected.

Any assistance or insights into resolving this issue would be greatly appreciated.

deadmann avatar Sep 23 '23 15:09 deadmann