Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mKCP + XTLS 通信错误,日志报 failed to read response version > EOF #300

Closed
tsanie opened this issue Oct 10, 2020 · 4 comments
Closed

Comments

@tsanie
Copy link

tsanie commented Oct 10, 2020

注:下列客户端配置把 xtlsxtlsSettings 修改为 tlstlsSettings,移除 flow 后正常。


  1. 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明)
    服务端和客户端均为 4.31.0

  2. 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。
    使用 Chrome 通过 VLESS 代理查看 google.com 首页

  3. 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等)
    意外终止连接:ERR_CONNECTION_CLOSED

  4. 你期待看到的正确表现是怎样的?
    正确打开网页

  5. 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

服务器端配置:

{
    "log": {
        "access": "",
        "error": "",
        "loglevel": "warning"
    },
    "inbounds": [
        {
            "port": 443,
            "protocol": "vless",
            "settings": {
                "clients": [
                    {
                        "id": "***",  // 留白
                        "level": 0,
                        "email": "me@vless.mkcp.tls",
                        "flow": "xtls-rprx-origin"
                    }
                ],
                "decryption": "none"
            },
            "streamSettings": {
                "network": "kcp",
                "security": "xtls",
                "xtlsSettings": {
                    "certificates": [
                        {
                            "certificateFile": "/path/to/fullchain.cer",  // 留白
                            "keyFile": "/path/to/private.key"  // 留白
                        }
                    ]
                },
                "kcpSettings": {
                    "mtu": 1200,
                    "tti": 20,
                    "uplinkCapacity": 12,
                    "downlinkCapacity": 100
                }
            }
        }
    ],
    "outbounds": [
        {
            "protocol": "freedom",
            "tag": "direct"
        },
        {
            "protocol": "blackhole",
            "tag": "blocked"
        }
    ],
    "routing": {
        "strategy": "rules",
        "settings": {
            "domainStrategy": "IPOnDemand",
            "rules": [
                {
                    "type": "field",
                    "protocol": [
                        "bittorrent"
                    ],
                    "outboundTag": "blocked"
                },
                {
                    "type": "field",
                    "ip": [
                        "geoip:private"
                    ],
                    "outboundTag": "blocked"
                }
            ]
        }
    }
}

客户端配置:

{
    "log": {
        "access": "",
        "error": "",
        "loglevel": "warning"
    },
    "inbounds": [
        {
            "port": 1111,
            "listen": "127.0.0.1",
            "protocol": "socks"
        }
    ],
    "outbounds": [
        {
            "protocol": "vless",
            "settings": {
                "vnext": [
                    {
                        "address": "***",  // 留白
                        "port": 443,
                        "users": [
                            {
                                "id": "***",  // 留白
                                "encryption": "none",
                                "flow": "xtls-rprx-origin"
                            }
                        ]
                    }
                ]
            },
            "streamSettings": {
                "network": "kcp",
                "security": "xtls",
                "xtlsSettings": {
                    "serverName": "***",  // 留白
                    "allowInsecure": false
                },
                "kcpSettings": {
                    "mtu": 1200,
                    "tti": 20,
                    "uplinkCapacity": 12,
                    "downlinkCapacity": 100
                }
            }
        },
        {
            "protocol": "freedom",
            "tag": "direct"
        },
        {
            "protocol": "blackhole",
            "tag": "blocked"
        }
    ],
    "routing": {
        "domainStrategy": "IPOnDemand",
        "rules": [
            {
                "type": "field",
                "ip": [
                    "geoip:private"
                ],
                "outboundTag": "blocked"
            },
            {
                "type": "field",
                "domain": [
                    "geosite:category-ads"
                ],
                "outboundTag": "blocked"
            }
        ]
    }
}
  1. 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。

服务器端错误日志:

2020/10/10 22:13:00 [Warning] [400485014] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vless/inbound: failed to use xtls-rprx-origin, maybe "security" is not "xtls"
2020/10/10 22:13:00 [Warning] [1747630384] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vless/inbound: failed to use xtls-rprx-origin, maybe "security" is not "xtls"

// 注:见到这个错误提示我也第一时间检查了服务端和客户端的配置文件,确定 security 都是 xtls,配置项名也是 xtlsSettings

客户端错误日志:

2020/10/10 22:13:00 [Warning] [623766314] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vless/outbound: connection ends > v2ray.com/core/proxy/vless/outbound: failed to decode response header > v2ray.com/core/proxy/vless/encoding: failed to read response version > EOF
2020/10/10 22:13:00 [Warning] [158083695] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vless/outbound: connection ends > v2ray.com/core/proxy/vless/outbound: failed to decode response header > v2ray.com/core/proxy/vless/encoding: failed to read response version > EOF
  1. 请附上访问日志。在 Linux 中,日志通常在 /var/log/v2ray/access.log 文件中。
    // 在这里附上服务器端日志
  1. 其它相关的配置文件(如 Nginx)和相关日志。

  2. 如果 V2Ray 无法启动,请附上 --test 输出。

  3. 如果 V2Ray 服务运行不正常,请附上 journal 日志。

@RPRX
Copy link
Contributor

RPRX commented Oct 11, 2020

普遍问题,请等待修复

@RPRX
Copy link
Contributor

RPRX commented Oct 11, 2020

ff6bb51 大概半个小时后编译机器人会在该链接下方评论,请测试一下

@tsanie
Copy link
Author

tsanie commented Oct 11, 2020

ff6bb51 大概半个小时后编译机器人会在该链接下方评论,请测试一下

经测试可以了,打开环境变量 V2RAY_VLESS_XTLS_SHOW = true 后服务端和客户端分别出现大量 XTLS sent XTLS received 日志,已生效。

@tsanie tsanie closed this as completed Oct 11, 2020
@RPRX
Copy link
Contributor

RPRX commented Oct 11, 2020

ff6bb51 大概半个小时后编译机器人会在该链接下方评论,请测试一下

经测试可以了,打开环境变量 V2RAY_VLESS_XTLS_SHOW = true 后服务端和客户端分别出现大量 XTLS sent XTLS received 日志,已生效。

感谢测试与反馈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants