failed to process outbound traffic > proxy/vmess/outbound: connection ends > proxy/vmess/outbound: failed to read header > proxy/vmess/encoding: failed to read response header > EOF
你正在使用哪个版本的 V2Ray?
你的使用场景是什么?
使用 Chrome vmess .访问Google
你看到的异常现象是什么?
www.google.com 的回應時間過長。 建議做法:
檢查連線狀態 檢查 Proxy 和防火牆 執行 Windows 網路診斷 ERR_CONNECTION_TIMED_OUT
你期待看到的正常表现是怎样的?
正常使用Google搜索。
请附上你的配置
服务端配置:
// 在这里附上服务器端配置文件
{
"inbounds": [{
"port": 18696, // 服务器监听端口,必须和上面的一样
"protocol": "vmess",
"settings": {
"clients": [{ "id": "886abe43-****-8888-a58d-c1d4feb38888",
"alterId": 64
}]
},
"streamSettings": {
"network": "tcp"
}
}],
"outbounds": [{
"protocol": "freedom",
"settings": {}
}]
}
客户端配置:
// 在这里附上客户端配置
{
"inbounds": [
{
"port": 1080,
"listen": "127.0.0.1",
"protocol": "http"
}
],
"outbounds": [
{
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "**.*****.**",
"port": 443,
"users": [
{
"id": "886abe43-****-8888-a58d-c1d4feb38888",
"alterId": 64,
"security": "none"
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"security": "tls"
},
"tag": "proxy"
},
{
"protocol": "freedom",
"settings": {},
"tag": "direct"//如果要使用路由,这个 tag 是一定要有的,在这里 direct 就是 freedom 的一个标号,在路由中说 direct V2Ray 就知道是这里的 freedom 了
},
{
"protocol": "blackhole",
"settings": {},
"tag": "adblock"//同样的,这个 tag 也是要有的,在路由中说 adblock 就知道是这里的 blackhole(黑洞) 了
}
],"routing": {
"domainStrategy": "IPOnDemand",
"rules":[
{
"type": "field",
"outboundTag": "block", //拦截广告相关域名
"domain": [
"ext:h2y.dat:ad"
]
},
{
"type": "field",
"outboundTag": "proxy", //被 gfw 屏蔽的域名走代理
"domain": [
"ext:h2y.dat:gfw"
]
},
{
"type": "field",
"network":"tcp,udp",
"outboundTag": "direct" // 默认直连
}
]
}
}
请附上出错时软件输出的错误日志
服务器端错误日志:
// 在这里附上服务器端日志
日志为空
客户端错误日志:
// 在这里附上客户端日志
2022/07/03 16:01:45 [Warning] [1209104353] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: connection ends > proxy/vmess/outbound: failed to read header > proxy/vmess/encoding: failed to read response header > EOF
2022/07/03 16:01:45 [Warning] [1209104353] proxy/http: failed to read response from www.gstatic.com > io: read/write on closed pipe
2022/07/03 16:02:18 [Warning] [2986026721] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: connection ends > proxy/vmess/outbound: failed to read header > proxy/vmess/encoding: failed to read response header > EOF
2022/07/03 16:02:18 [Warning] [1011729691] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: connection ends > proxy/vmess/outbound: failed to read header > proxy/vmess/encoding: failed to read response header > EOF
2022/07/03 16:04:45 [Warning] [1529648546] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: connection ends > proxy/vmess/outbound: failed to read header > proxy/vmess/encoding: failed to read response header > EOF
2022/07/03 16:04:45 [Warning] [1529648546] proxy/http: failed to read response from www.gstatic.com > io: read/write on closed pipe
请附上访问日志
// 在这里附上服务器端日志
日志为空
其它相关的配置文件(如 Nginx)和相关日志
之前一直在用这个软件,上个月20几号出了问题,更新了一下https证书。还是连接不上。 然后更新软件info: V2Ray v4.45.2 is installed.
服务器是centos,尝试抓包,发现https端口的数据被haproxy 转发到 vmess 端口上。 但是仍旧无法代理客户端上网。
如果 V2Ray 无法启动,请附上 --test 命令的输出
systemctl start v2ray 启动,可以运行。
如果 V2Ray 服务运行异常,请附上 journal 日志
运行正常
服务器上,无日志。但是有两个access.log error.log文件
服务器配置里的 "alterId": 64 不写这行吧,要写就写值是0
同样客户端配置里 "alterId": 0 要写成0。
v2fly强行启用了这个认证了。你再把客户端服务器端升级到4.X最新版本测试下
如果服务器上的access.log error.log两个文件内容都是空的,说明客户端v2ray的连接流量根本没有达到服务器的v2ray。 建议检查haproxy的配置。 如果haproxy确实转发了,那么error.log一定会有记录。
服务器配置里的 "alterId": 64 不写这行吧,要写就写值是0
同样客户端配置里 "alterId": 0 要写成0。
v2fly强行启用了这个认证了。你再把客户端服务器端升级到4.X最新版本测试下
在 v4.28.1 版本后,客户端 AlterID 设置为 0 代表启用 VMessAEAD ;服务端为自动适配,可同时兼容启用和未开启 VMessAEAD 的客户端。
对于 VMess MD5 认证信息的兼容可以被关闭。(v4.35.0+)
你说得很对,原来19天以前你就回复我了。我得GitHub没有提示,早知道来看看了。
服务器配置里的 "alterId": 64 不写这行吧,要写就写值是0 同样客户端配置里 "alterId": 0 要写成0。 v2fly强行启用了这个认证了。你再把客户端服务器端升级到4.X最新版本测试下
在 v4.28.1 版本后,客户端 AlterID 设置为 0 代表启用 VMessAEAD ;服务端为自动适配,可同时兼容启用和未开启 VMessAEAD 的客户端。
对于 VMess MD5 认证信息的兼容可以被关闭。(v4.35.0+)
你说得很对,原来19天以前你就回复我了。我得GitHub没有提示,早知道来看看了。
不客气。你也可去xray或v2fly的TG群问网友。有空给我主页的点个赞3Q
服务器配置里的 "alterId": 64 不写这行吧,要写就写值是0
同样客户端配置里 "alterId": 0 要写成0。
v2fly强行启用了这个认证了。你再把客户端服务器端升级到4.X最新版本测试下
非常感谢,用你的办法解决问题了
大佬 我客户端改了alterid为0还是报如下错误。 2023/05/05 15:14:07 [Warning] v2ray.com/core: V2Ray 4.15.1 started 2023/05/05 15:15:08 [Info] [2885879536] v2ray.com/core/proxy/http: request to Method [CONNECT] Host [www.google.com:443] with URL [//www.google.com:443] 2023/05/05 15:15:08 [Info] [2885879536] v2ray.com/core/app/dispatcher: taking detour [aws] for [tcp:www.google.com:443] 2023/05/05 15:15:08 [Info] [2885879536] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:3.144.162.86:11011 2023/05/05 15:15:09 [Info] [2885879536] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:www.google.com:443 via tcp:3.144.162.86:11011 2023/05/05 15:15:09 [Info] [2885879536] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > v2ray.com/core/proxy/vmess/outbound: failed to read header > v2ray.com/core/proxy/vmess/encoding: unexpected response header. Expecting 135 but actually 210 2023/05/05 15:15:09 [Info] [2885879536] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: connection ends > io: read/write on closed pipe 2023/05/05 15:15:09 [Info] [1805294360] v2ray.com/core/proxy/http: request to Method [CONNECT] Host [www.google.com:443] with URL [//www.google.com:443] 2023/05/05 15:15:09 [Info] [1805294360] v2ray.com/core/app/dispatcher: taking detour [aws] for [tcp:www.google.com:443] 2023/05/05 15:15:09 [Info] [1805294360] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:3.144.162.86:11011 2023/05/05 15:15:09 [Info] [1805294360] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:www.google.com:443 via tcp:3.144.162.86:11011 2023/05/05 15:15:10 [Info] [1805294360] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > v2ray.com/core/proxy/vmess/outbound: failed to read header > v2ray.com/core/proxy/vmess/encoding: unexpected response header. Expecting 75 but actually 122 2023/05/05 15:15:10 [Info] [1805294360] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: connection ends > io: read/write on closed pipe
@spiker9
Mayhap upgrade your v2ray to the latest version? v4.15.1 can be deemed as somewhat antiquated.
@spiker9
Mayhap upgrade your v2ray to the latest version? v4.15.1 can be deemed as somewhat antiquated.
I'm using v2rayX as client on macos, not sure if it can load the lastest v2ray-core as the lastest v2ray-core is written by Go.
@spiker9
Mayhap upgrade your v2ray to the latest version? v4.15.1 can be deemed as somewhat antiquated.
I upgraded to 4.27.0. Still getting the same error. 2023/05/06 15:10:37 [Warning] v2ray.com/core: V2Ray 4.27.0 started 2023/05/06 15:13:12 [Info] [11046042] v2ray.com/core/proxy/http: request to Method [CONNECT] Host [www.googleapis.com:443] with URL [//www.googleapis.com:443] 2023/05/06 15:13:12 [Info] [11046042] v2ray.com/core/app/dispatcher: taking detour [aws] for [tcp:www.googleapis.com:443] 2023/05/06 15:13:12 [Info] [11046042] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:3.144.162.86:11011 2023/05/06 15:13:13 [Info] [11046042] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:www.googleapis.com:443 via tcp:3.144.162.86:11011 2023/05/06 15:13:13 [Info] [11046042] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > v2ray.com/core/proxy/vmess/outbound: failed to read header > v2ray.com/core/proxy/vmess/encoding: unexpected response header. Expecting 221 but actually 160 2023/05/06 15:13:13 [Info] [11046042] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: connection ends > io: read/write on closed pipe 2023/05/06 15:13:13 [Info] [3442048178] v2ray.com/core/proxy/http: request to Method [CONNECT] Host [www.googleapis.com:443] with URL [//www.googleapis.com:443] 2023/05/06 15:13:13 [Info] [3442048178] v2ray.com/core/app/dispatcher: taking detour [aws] for [tcp:www.googleapis.com:443] 2023/05/06 15:13:13 [Info] [3442048178] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:3.144.162.86:11011 2023/05/06 15:13:13 [Info] [3442048178] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:www.googleapis.com:443 via tcp:3.144.162.86:11011 2023/05/06 15:13:14 [Info] [3442048178] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > v2ray.com/core/proxy/vmess/outbound: failed to read header > v2ray.com/core/proxy/vmess/encoding: unexpected response header. Expecting 182 but actually 47 2023/05/06 15:13:14 [Info] [3442048178] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/http: connection ends > io: read/write on closed pipe
I run into the same problem with v2ray-core v5.18.0, the UTC time is the same at the server and client, and I tried set v2ray.vmess.aead.forced to true and false at the server side and client side, BUt all tries failed. I am confused, How the error is triggered?
From reading the source code, I know it is caused by the client parsing the response header.
if _, err := buffer.ReadFullFrom(c.responseReader, 4); err != nil {
return nil, newError("failed to read response header").Base(err).AtWarning()
}
It seems client try to read header from server response, But got EOF error.
However I did not see error logs on server side. How to solve this problem?
Then I guess the bug is on the server side. Server can not generate the right Response to the client, SO I change the log level to 'Debug' for the server and try again, I got the following error:
app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: connection ends > context canceled
This is confusing. context canceled may be by many reasons.
I checked the 'ulimit -n', max open file numbers, No effect!
time is the same, v2ray.vmess.aead.forced is also set. max open files number adjusted. Which else?