v2ray / v2ray-core

A platform for building proxies to bypass network restrictions.
https://www.v2ray.com/
MIT License
45.44k stars 8.95k forks source link

报错failed to handler mux client connection > Proxy|Vmess|Outbound: connection ends > websocket: close 1000(normal) #757

Closed lindichao closed 6 years ago

lindichao commented 6 years ago

Please skip to the English section below if you don't write Chinese.

中文: 提交 Issue 之前请先阅读 Issue 指引,然后回答下面的问题,谢谢。 除非特殊情况,请完整填写所有问题。不按模板发的 issue 将直接被关闭。

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

2) 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。 使用Firefox通过 Socks/VMess代理浏览google

3) 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等) 报错failed to handler mux client connection > Proxy|Vmess|Outbound: connection ends > websocket: close 1000(normal),网页无法打开

4) 你期待看到的正确表现是怎样的? 可以正常打开网页

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

服务器端配置:
    // 在这里附上服务器端配置文件
{
    "log":{
    "access":"/var/log/v2ray/access.log",
    "error":"/var/log/v2ray/error.log",
    "loglevel":"warning"
    },
    "inbound":{
    "port":$port,
    "listen":"127.0.0.1",
    "protocol":"vmess",
    "allocate":{
    "strategy":"always"
    },
    "settings":{
    "udp":true,
    "clients":[
    {
    "id":"$UUID",
    "level":1,
    "alterId":64
    }
    ]
    },
    "streamSettings":{
    "network":"ws",
    "security":"auto",
    "wsSettings":{
    "connectionReuse":true,
    "path":"/v2ray/"
    }
    }
    },
    "outbound":{
    "protocol":"freedom",
    "settings":{}
    },
    "outboundDetour":[
    {
    "protocol":"blackhole",
    "settings":{},
    "tag":"blocked"
    }
    ],
    "routing":{
    "strategy":"rules",
    "settings":{
    "rules":[
    {
    "type":"field",
    "ip":[
    "0.0.0.0/8",
    "10.0.0.0/8",
    "100.64.0.0/10",
    "127.0.0.0/8",
    "169.254.0.0/16",
    "172.16.0.0/12",
    "192.0.0.0/24",
    "192.0.2.0/24",
    "192.168.0.0/16",
    "198.18.0.0/15",
    "198.51.100.0/24",
    "203.0.113.0/24",
    "::1/128",
    "fc00::/7",
    "fc80::/10"
    ],
    "outboundTag":"blocked"
    }
    ]
    }
    }
    }    
客户端配置:
    // 在这里附上客户端配置
{
  "log": {
    "error": "C:\\v2ray-windows-32\\v2ray-v3.0-windows-32\\error.log",
    "loglevel": "warning"
  },
  "inbound": {
    "port": 1080,
    "listen": "0.0.0.0",
    "protocol": "socks",
    "settings": {
      "auth": "noauth",
      "udp": true,
      "ip": "127.0.0.1",
      "clients":null
    },
    "streamSettings":null
  },
  "outbound": {
    "tag":"agentout",
    "protocol": "vmess",
    "settings": {
      "vnext":[
        {
          "address":"$domain",
          "port":$port,
          "users":[
            {
              "id":"$UUID",
              "alterId":64,
              "security":"aes-128-gcm"
            }
          ]
        }
      ]
    },
    "streamSettings": {
    "network":"ws",
    "security":"tls",
    "tcpSettings":null,
    "kcpSettings":null,
    "wsSettings":{
      "connectionReuse":true,
      "path":"/v2ray"
    }
  },
  "mux":{
    "enabled":true,
    "concurrency":50
  }
},
"inboundDetour":null,
"outboundDetour":[
{
  "protocol":"freedom",
  "settings":{
    "response":null
  },
  "tag":"direct"
},
{
  "protocol":"blackhole",
  "settings":{
    "response":{

    }
  },
  "tag":"blockout"
}
],
"dns":{
  "servers":[
    "8.8.8.8",
    "8.8.4.4",
    "localhost"
  ]
},
"routing":{
  "strategy":"rules",
  "settings":{
    "domainStrategy":"IPIfNonMatch",
    "rules":[
      {
        "type":"field",
        "port":null,
        "outboundTag":"direct",
        "ip":[
          "0.0.0.0/8",
          "10.0.0.0/8",
          "100.64.0.0/10",
          "127.0.0.0/8",
          "169.254.0.0/16",
          "172.16.0.0/12",
          "192.0.0.0/24",
          "192.0.2.0/24",
          "192.168.0.0/16",
          "198.18.0.0/15",
          "198.51.100.0/24",
          "203.0.113.0/24",
          "::1/128",
          "fc00::/7",
          "fe80::/10"
        ]
      }
    ]
  }
}
}

6) 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。

服务器端错误日志:
    // 在这里附上服务器端日志
2017/12/02 14:42:13 [warning]Core:V2Ray started
客户端错误日志:
    // 在这里附上客户端日志
[Warning]failed to handler mux client connection > Proxy|Vmess|Outbound: connection ends > websocket: close 1000(normal)

7) 请附上访问日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。

    // 在这里附上服务器端日志
空

8) 其它相关的配置文件(如 Nginx)和相关日志。

请预览一下你填的内容再提交。

如果你已经填完上面的问卷,请把下面的英文部份删除,再提交 Issue。

DarienRaymond commented 6 years ago

这个错误看上去没有问题,有其它的错误信息吗?比如浏览器的报错。

c1024 commented 6 years ago

@lindichao 是不是服务器或者客户端时间不对啊,我也遇到了,时间同步就正常了

Steve789 commented 6 years ago

同出现此报错,我把"alterId"由64改为32,同时更改了服务器端口,还是报错。

lindichao commented 6 years ago

排除服务器与客户端时间不一致可能性,按白话文教材,只要服务器分钟是客户端分钟正负两分钟内即可,用date查询服务器时间,显示的分钟数与客户端分钟数一致,应该在正负两分钟之内。

lindichao commented 6 years ago

Firefox的报错提示是:Secure Connection Failed

The connection to www.twitter.com was interrupted while the page was loading.

The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.
lindichao commented 6 years ago

Chrome的报错提示是:无法访问此网站

www.google.com 意外终止了连接。 请试试以下办法: 检查网络连接 检查代理服务器和防火墙 运行 Windows 网络诊断 ERR_CONNECTION_CLOSED

DarienRaymond commented 6 years ago

检查一下是否为 DNS 污染:

  1. 在浏览器代理中开启远程 DNS 解析;
  2. 在 socks 上开启 domainOverride;
lindichao commented 6 years ago

冏,C1024说对了,回到住的地方,再在服务器运行date就发现跟本地电脑相差3分钟了,对照www.beijing-time.org一看,服务器的时间是对的,仅比www.beijing-time.org的快12秒,本地的本来是用time.windows.com同步的,取消同步手动改为跟www.beijing-time.org一致之后,就恢复正常了。

jackandma commented 6 years ago

2.47以后的版本都会遇到failed to handler mux client connection,现在还在用2.47版本

assmdx commented 4 years ago

https://github.com/v2ray/v2ray-core/issues/2143