Skip to content

nginx+tls+ws+vless,断流 或 503 #5250

@qh-wells

Description

@qh-wells

完整性要求

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

描述

我用于一个爬虫项目。
最近几个版本(之前一直用的 v25.1.30 没问题),访问网站,要么 http 200 断流(页面加载不完整),要么 http 503。
目标网站是 https 好像没出现过问题, http 出问题概率高,如果目标是 http 而且没域名(IP+端口)直接访问,大概率 503。
我不太懂其中原理,我只是描述我的经历。

重现方式

nginx+tls+ws+vless

客户端配置

Details

{
  "inbounds": [
    {
      "port": 8888,
      "protocol": "socks",
      "settings": {
        "udp": true
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "vless",
      "settings": {
        "vnext": [
          {
            "address": "xxx.cn",
            "port": 443,
            "users": [
              {
                "id": "xxx",
                "encryption": "none"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "security": "tls",
        "wsSettings": {
          "path": "/xxx"
        }
      }
    }
  ]
}

服务端配置

Details

{
    "outbounds": [
        {
            "protocol": "freedom"
        }
    ],
    "inbounds": [
        {
            "port": 12345,
            "protocol": "vless",
            "settings": {
                "clients": [
                    {
                        "id": "xxx"
                    }
                ],
                "decryption": "none"
            },
            "streamSettings": {
                "network": "ws",
                "wsSettings": {
                    "path": "/xxx"
                }
            }
        }
    ]
}

客户端日志

2025/10/22 16:01:49.373034 from 192.168.1.12:58622 accepted http://www.google.com/ [socks -> proxy]
2025/10/22 16:01:52.949971 from 192.168.1.12:58623 accepted http://www.google.com/ [socks -> proxy]
2025/10/22 16:01:53.099938 [Warning] [2074581101] app/proxyman/inbound: connection ends > proxy/http: connection ends > proxy/http: failed to write response > io: read/write on closed pipe

服务端日志

2025/10/22 16:01:49.489289 [Info] [964816162] proxy/vless/inbound: firstLen = 219
2025/10/22 16:01:49.489357 [Info] [964816162] proxy/vless/inbound: received request for tcp:www.google.com:80
2025/10/22 16:01:49.489366 [Info] [964816162] app/dispatcher: default route for tcp:www.google.com:80
2025/10/22 16:01:49.489372 [Info] [964816162] transport/internet/tcp: dialing TCP to tcp:www.google.com:80
2025/10/22 16:01:49.489376 [Debug] [964816162] transport/internet: dialing to tcp:www.google.com:80
2025/10/22 16:01:49.491465 [Info] [964816162] proxy/freedom: connection opened to tcp:www.google.com:80, local endpoint 10.0.30.20:57256, remote endpoint 142.250.76.4:80
2025/10/22 16:01:49.491486 [Info] [964816162] proxy: CopyRawConn (maybe) readv
2025/10/22 16:01:49.545040 [Info] [964816162] app/proxyman/outbound: app/proxyman/outbound: failed to process outbound traffic > proxy/freedom: connection ends > proxy/freedom: failed to process request > read tcp [::1]:12345->[::1]:42258: use of closed network connection
2025/10/22 16:01:53.020607 [Info] [641150522] proxy/vless/inbound: firstLen = 219
2025/10/22 16:01:53.020641 [Info] [641150522] proxy/vless/inbound: received request for tcp:www.google.com:80
2025/10/22 16:01:53.020652 [Info] [641150522] app/dispatcher: default route for tcp:www.google.com:80
2025/10/22 16:01:53.020657 [Info] [641150522] transport/internet/tcp: dialing TCP to tcp:www.google.com:80
2025/10/22 16:01:53.020662 [Debug] [641150522] transport/internet: dialing to tcp:www.google.com:80
2025/10/22 16:01:53.023393 [Info] [641150522] proxy/freedom: connection opened to tcp:www.google.com:80, local endpoint 10.0.30.20:57270, remote endpoint 142.250.76.4:80
2025/10/22 16:01:53.023422 [Info] [641150522] proxy: CopyRawConn (maybe) readv
2025/10/22 16:01:53.088356 [Info] [641150522] app/proxyman/outbound: app/proxyman/outbound: failed to process outbound traffic > proxy/freedom: connection ends > proxy/freedom: failed to process request > read tcp 127.0.0.1:12345->127.0.0.1:34592: use of closed network connection

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