Skip to content

sendThrough使用origin时,udp没有使用连入ip发送 #5017

@a878851497

Description

@a878851497

完整性要求

  • 我保证阅读了文档,了解所有我编写的配置文件项的含义,而不是大量堆砌看似有用的选项或默认值。
  • 我提供了完整的配置文件和日志,而不是出于自己的判断只给出截取的部分。
  • 我搜索了 issues, 没有发现已提出的类似问题。
  • 问题在 Release 最新的版本上可以成功复现

描述

多ip的服务器,使用出站设置为freedom,sendThrough:origin,测试发现服务器的udp连接都是用主ip发起的,而tcp正常。

重现方式

站群服务器上有一个C段的ip ,使用xray开启socks5入站
客户端使用clash.meta,开启tun模式。
浏览器访问https://browserleaks.com/webrtc 触发stun请求。
tcp查询得到的ip是连入的ip,stun查询到的是服务器的主Ip

客户端配置

N/A

服务端配置

Details

{
    "log": {
        "loglevel": "warning",
        "access": "/var/log/xray/access.log",
        "error": "/var/log/xray/error.log"
    },
    "inbounds": [
        {
            "port": 8888,
            "listen": "0.0.0.0",
            "protocol": "socks",
            "tag": "socks-in",
            "settings": {
                "auth": "password",
                "accounts": [
                    {
                        "user": "123456",
                        "pass": "123456"
                    }
                ],
                "udp": true
            },
            "sniffing": {
                "enabled": false
            }
        }
    ],
    "outbounds": [
        {
            "protocol": "freedom",
            "tag": "out",
            "sendThrough": "origin"
        }
    ]
}

客户端日志

Details

3019.18:57:22info[UDP] 198.18.0.1:50424 --> stun.l.google.com:19302 using GLOBAL
3008.18:57:22debug[DNS] cache hit stun.l.google.com --> [74.125.250.129] A, expire at 2025-08-12 18:58:54

服务端日志

Details

2025/08/12 06:57:20.846421 from udp:160.22.143.147:36117 accepted udp:74.125.250.129:19302 [socks-in >> out]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions