MatsuriDayo / nekoray

Qt based cross-platform GUI proxy configuration manager (backend: sing-box)
https://matsuridayo.github.io/
GNU General Public License v3.0
12.92k stars 1.21k forks source link

由nekoray魔改的v2ray-core在NAT Type Test中呈现UnsupportedServer #181

Closed NekoCompiler closed 1 year ago

NekoCompiler commented 1 year ago

描述问题

预期行为:

由于V2Fly的v2ray-core在v5版本之后解决了VMess的UDP FullCone问题,所以实际上服务器和客户端只要都是≥5.0.0版本是可以达到FullCone NAT效果的。

实际行为:

在nekoray的魔改v2ray-core中无法实现这种效果,测试为UnsupportedServer。❌ 在nekoray的魔改sing-box中可以实现这种效果,测试为FullCone。✅ 在Matsuri的魔改v2ray-core中可以实现这种效果,测试为FullCone。✅

如何复现

服务器版本为v2fly/v2ray-core v5.1.0,nekoray版本为v2.5

在服务器中这样设置 (v2ray JSONv5格式) (vmess websocket with nginx tls)

{
  "log": {
    "access": {
      "type": "File",
      "path": "/var/log/v2ray/access.log"
    },
    "error": {
      "type": "File",
      "path": "/var/log/v2ray/error.log",
      "level": "Warning"
    }
  },
  "inbounds": [
    {
      "listen": "127.0.0.1",
      "port": 2001,
      "protocol": "vmess",
      "settings": {
        "users": [
          "你的UUID"
        ]
      },
      "streamSettings": {
        "transport": "ws",
        "transportSettings": {
          "path": "/你的Path",
          "maxEarlyData": 1024
        },
        "security": "none"
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    }
  ]
}

在nekoray中这样设置

图片

Nekoray (V2Ray) 结果 (使用Socks端口测试)

图片 图片

NekoBox (sing-box) 结果 (使用Mixed端口测试)

图片 图片

Matsuri结果 (使用VPN测试)

IMG_20221128_033912

日志

v2ray-core

>>>>>>>> 正在启动配置 [VMess]你的名字
[2022-11-28 03:42:08] [Debug] app/log: Logger started
[2022-11-28 03:42:08] [Info] app/dns: DNS: created Remote DOH client for https://1.1.1.1/dns-query
[2022-11-28 03:42:08] [Info] app/dns: DNS: created localhost client
[2022-11-28 03:42:08] [Debug] app/proxyman/inbound: creating stream worker on 127.0.0.1:2080
[2022-11-28 03:42:08] [Debug] app/proxyman/inbound: creating stream worker on 127.0.0.1:2081
[2022-11-28 03:42:08] [Debug] app/stats: create new counter outbound>>>proxy>>>traffic>>>uplink
[2022-11-28 03:42:08] [Debug] app/stats: create new counter outbound>>>proxy>>>traffic>>>downlink
[2022-11-28 03:42:08] [Debug] app/stats: create new counter outbound>>>direct>>>traffic>>>uplink
[2022-11-28 03:42:08] [Debug] app/stats: create new counter outbound>>>direct>>>traffic>>>downlink
[2022-11-28 03:42:08] [Debug] app/stats: create new counter outbound>>>bypass>>>traffic>>>uplink
[2022-11-28 03:42:08] [Debug] app/stats: create new counter outbound>>>bypass>>>traffic>>>downlink
[2022-11-28 03:42:08] [Debug] app/stats: create new counter outbound>>>block>>>traffic>>>uplink
[2022-11-28 03:42:08] [Debug] app/stats: create new counter outbound>>>block>>>traffic>>>downlink
[2022-11-28 03:42:08] [Debug] app/stats: create new counter outbound>>>dns-out>>>traffic>>>uplink
[2022-11-28 03:42:08] [Debug] app/stats: create new counter outbound>>>dns-out>>>traffic>>>downlink
[2022-11-28 03:42:08] [Info] transport/internet/tcp: listening TCP on 127.0.0.1:2080
[2022-11-28 03:42:08] [Info] transport/internet/udp: listening UDP on 127.0.0.1:2080
[2022-11-28 03:42:08] [Info] transport/internet/tcp: listening TCP on 127.0.0.1:2081
[2022-11-28 03:42:08] [Warning] V2Ray 5.1.0 started
[2022-11-28 03:43:35] udp:127.0.0.1:55245 accepted [udp:139.59.84.212:3478]  [socks-in -> proxy]
[2022-11-28 03:43:35] [Warning] [2157538916] app/dispatcher: default route for [udp:139.59.84.212:3478]
[2022-11-28 03:43:35] [Info] [2157538916] transport/internet/websocket: creating connection to tcp:你的服务器ip:443
[2022-11-28 03:43:35] [Info] [2157538916] proxy/vmess/outbound: tunneling request to udp:139.59.84.212:3478 via 你的服务器ip:443
arm64v8a commented 1 year ago

无法复现,v2ray packet 测得 full cone,请检查服务器配置

NekoCompiler commented 1 year ago

v2fly侧问题,已使用sing-box覆盖业务,worked out