1) 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明)
version 3.35,客户端服务器版本一致
2) 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。
通过Chromium浏览互联网。v2ray代理形式为SOCKS,监听于127.0.0.1:1080。
3) 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等)
老是出现网页随机卡住,打不开。具体出现的情况有:
Chromium回报ERR_CONNECTION_CLOSED
Chromium回报SSL Interference
Chromium处于长时间的“正在载入缓存”或“等待domain.com的响应”
v2ray客户端日志中出现大量Proxy|VMess|Outbound: connection ends > context canceled
v2ray客户端日志出现failed to transport all TCP response > io: read/write on closed pipe
开启Mux会使问题更加严重
VPS的时延越长越容易出现卡住,越短则越容易稳定运行。香港VPS有时出现随机网页打不开,而罗马尼亚VPS则响应都成问题,几乎无法使用。
已经确认不是VPS网络或本机网络的问题,因为另一个代理软件trojan非常流畅。
4) 你期待看到的正确表现是怎样的?
流畅浏览互联网,不出现卡顿的情况。
5) 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。
服务器端配置:
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "none"
},
"dns": {
"servers": [
"9.9.9.9",
"149.112.112.112"
]
},
"inbound": {
"port": 443,
"listen": "0.0.0.0",
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "3025a742-05bb-4222-a19c-dbb3100767ac",
"level": 1,
"alterId": 64
}
]
},
"streamSettings": {
"network": "tcp",
"security": "tls",
"tlsSettings": {
"alpn": ["http/1.1"],
"allowInsecureCiphers": false,
"certificates": [
{
"certificateFile": "/root/.acme.sh/example.com/fullchain.cer",
"keyFile": "/root/.acme.sh/example.com/example.com.key"
}
]
},
"tcpSettings": {
"header": {"type": "none"}
}
}
},
"outbound": {
"sendThrough": "0.0.0.0",
"protocol": "freedom",
"settings": {
"domainStrategy": "UseIP",
"timeout": 300
},
"tag": "direct"
},
"outboundDetour": [
{
"protocol": "blackhole",
"sendThrough": "0.0.0.0",
"settings": {
"response": {
"type": "none"
}
},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"domainStrategy": "IPOnDemand",
"rules": [
{
"type": "field",
"ip": ["geoip:private"],
"outboundTag": "direct"
}
]
}
}
}
客户端配置:
{
"log": {
"loglevel": "info"
},
"dns": {
"servers": [
"localhost"
]
},
"inbound": {
"listen": "127.0.0.1",
"port": 1080,
"protocol": "socks",
"settings": {
"auth": "noauth",
"timeout": 300
},
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls"]
}
},
"outbound": {
"protocol": "vmess",
"mux": {
"enabled": false,
"concurrency": 8
},
"settings": {
"vnext": [
{
"address": "example.com",
"port": 443,
"users": [
{
"id": "3025a742-05bb-4222-a19c-dbb3100767ac",
"level": 1,
"alterId": 64,
"security": "none"
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"security": "tls",
"tlsSettings": {
"alpn": ["http/1.1"],
"serverName": "example.com",
"allowInsecure": false,
"allowInsecureCiphers": false
},
"tcpSettings": {
"header": {"type": "none"}
}
},
"tag": "vmess"
},
"outboundDetour": [
{
"protocol": "freedom",
"settings": {
"domainStrategy": "UseIP",
"timeout": 300
},
"tag": "direct"
}
],
"routing": {
"strategy": "rules",
"settings": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"domain": [
"www.google-analytics.com",
"geosite:speedtest"
],
"outboundTag": "vmess"
},
{
"type": "field",
"domain": [
"gc.kis.scr.kaspersky-labs.com",
"geosite:cn"
],
"outboundTag": "direct"
},
{
"type": "field",
"ip": [
"geoip:private",
"geoip:cn"
],
"outboundTag": "direct"
}
]
}
}
}
6) 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。
服务器端错误日志:
未见明显异常,无错误
客户端错误日志:
大量“App|Proxyman|Outbound: failed to process outbound traffic > Proxy|VMess|Outbound: connection ends > context canceled”
7) 请附上访问日志。在 Linux 中,日志通常在 /var/log/v2ray/access.log 文件中。
8) 其它相关的配置文件(如 Nginx)和相关日志。
未和其他软件合用
9) 如果 V2Ray 无法启动,请附上 --test 输出。
正常启动
10) 如果 V2Ray 服务运行不正常,请附上 journal 日志。
运行正常
现在如何在heroku上部署呢?可有高手指导一下。
Trojan 用的是 TLS 1.3? 有评论说 TLS 1.2 会受到干扰而 1.3 不会。你可以试一下裸VMess。
另外 ALPN = http1.1的话,最好套一下 websocket,否则容易被主动探测。
@VictoriaRaymond 根据 trojan 的 wiki:https://github.com/trojan-gfw/trojan/wiki/Adaptation-to-New-Specifications-(TLS-1.3-and-HTTP-2) 使用 TLS1.3 需要通过升级 OpenSSL 之后编译。不清楚 @testcaoy7 是否使用了新版本的 OpenSSL,希望其能提供更多信息以便分析。
@VictoriaRaymond 裸VMess (TCP,AES-128-GCM)一样有这个问题
@TanNang 我的trojan用的应该是TLS 1.2,因为根据trojan wiki,需要OpenSSL 1.1.1来开启TLS 1.3,而我的OpenSSL版本为1.1.0g
此外,根据v2ray的在线文档,传输配置中,TLS的“allowInsecureCiphers”参数我已经设置为false,根据在线文档的描述,这里v2ray应该用的TLS 1.3才对
可能是卡在域名解析了,在把服务器的log level设置为info后出现:
2018/08/14 11:01:36 [Info] [2965345027] Proxy|VMess|Inbound: received request for tcp:www.google.com:443
2018/08/14 11:01:36 [Info] App|Router: looking for IP for domain: www.google.com
2018/08/14 11:01:36 [Info] Transport|Internet|UDP: establishing new connection for udp:9.9.9.9:53
2018/08/14 11:01:36 [Info] App|Dispatcher: default route for udp:9.9.9.9:53
2018/08/14 11:01:36 [Info] Proxy|Freedom: opening connection to udp:9.9.9.9:53
2018/08/14 11:01:36 [Info] App|Proxyman|Outbound: failed to process outbound traffic > Proxy|Freedom: connection ends > Proxy|Freedom: failed to process response > read udp 188.213.49.107:46423->9.9.9.9:53: read: connection refused
2018/08/14 11:01:40 [Info] Transport|Internet|UDP: failed to handle UDP input > io: read/write on closed pipe
2018/08/14 11:01:40 [Info] Transport|Internet|UDP: establishing new connection for udp:149.112.112.112:53
2018/08/14 11:01:40 [Info] App|Dispatcher: default route for udp:149.112.112.112:53
2018/08/14 11:01:40 [Info] Proxy|Freedom: opening connection to udp:149.112.112.112:53
2018/08/14 11:01:44 [Info] App|Router: failed to get IP address > App|DNS: returning nil for domain www.google.com > context deadline exceeded
allowInsecureCiphers 只是用了 TLS 1.3的加密套件,协议框架还是 1.2 的。
看log像是你的VPS访问不到DNS服务器,可以试一下其它的比如 8.8.8.8 ?
已证实罗马尼亚VPS出现的确实是DNS服务器访问不到的问题,谢谢提醒,已经修复
目前还存在的问题有二:
偶发的Chromium回报ERR_CONNECTION_CLOSED、Chromium回报SSL Interference
在香港VPS上观测到此现象,而且打不开的网页是随机的,有可能突然谷歌打不开,但这时YTB是好的
你的Chrome是运行在Linux上的?可能的原因:https://stackoverflow.com/questions/49962714/err-ssl-version-interference-on-chrome
我的Chromium是运行在Windows 10上的。ERR_CONNECTION_CLOSED和SSL Interference的现象我会做进一步观察和日志收集,有了更多信息时再来讨论。谢谢!
我的 V2Ray Server 是用 Nginx 做 TLS 卸载的(Nginx 反代到 V2Ray 的 WebSocket 传入)。最近在 Chromium / Google Chrome (Arch Linux) 里也经常遇到 ERR_CONNECTION_CLOSED 和 ERR_SSL_VERSION_INTERFERENCE 错误。顺着错误信息搜到了这里。
看楼上有建议说尝试 TLS 1.3。我感觉不应该是 V2Ray 所用 TLS 版本的问题(因为 V2Ray Client 以透明代理形式跑在另一台 Arch Linux 网关上),不过我还是尝试了一下。升级 Nginx 与 OpenSSL 之后用 openssl s_client -connect example.org:443 -tls1_3 确认的确是 TLS 1.3 了,但是这两个错误依然存在。
遇到过,降低 alterId 到 4 或更小后顺利解决。