v2ray / v2ray-core

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

v2ray连接服务器失败 #890

Closed albertroger closed 6 years ago

albertroger commented 6 years ago

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

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

1) 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明) v3.10 2) 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。 使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频 3) 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等) failed to dial WebSocket > Transport|Internet|WebSocket: failed to dial to (wss://xx.xx.xx/): > x509: certificate signed by unknown authority] > Retry: all retry attempts failed

4) 你期待看到的正确表现是怎样的? 能够正常连接 5) 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

服务器端配置:
    // 在这里附上服务器端配置文件

{ "log": { "access": "", "error": "", "loglevel": "" }, "inbound": { "port": $port, "listen": null, "protocol": "vmess", "settings": { "auth": null, "udp": false, "ip": null, "clients": [ { "id": "xxxxxxxxxx", "alterId": 64, "security": null } ] }, "streamSettings": { "network": "ws", "security": "tls", "tcpSettings": null, "kcpSettings": null, "wsSettings": { "connectionReuse": true, "path": "", "headers": null } } }, "outbound": { "tag": null, "protocol": "freedom", "settings": null, "streamSettings": null, "mux": null }, "inboundDetour": null, "outboundDetour": [ { "protocol": "blackhole", "settings": null, "tag": "blocked" } ], "dns": null, "routing": { "strategy": "rules", "settings": { "domainStrategy": null, "rules": [ { "type": "field", "port": null, "outboundTag": "blocked", "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" ], "domain": null } ] } } } 客户端配置:

    // 在这里附上客户端配置

{ "log": { "access": "", "error": "", "loglevel": "" }, "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": "xx.xx.xx", "port": $port, "users": [ { "id": "5xxxxxxxxxxxxxxxxxxxxxx", "alterId": 64, "security": "aes-128-gcm" } ] } ] }, "streamSettings": { "network": "ws", "security": "tls", "tcpSettings": null, "kcpSettings": null, "wsSettings": { "connectionReuse": true, "path": "", "headers": null } }, "mux": { "enabled": true } }, "inboundDetour": null, "outboundDetour": [ { "protocol": "freedom", "settings": { "response": null }, "tag": "direct" }, { "protocol": "blackhole", "settings": { "response": { "type": "http" } }, "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" ], "domain": null }, { "type": "field", "port": null, "outboundTag": "direct", "ip": null, "domain": [ "dl.acm.org", "ieeexplore.ieee.org", "www.sciencedirect.com" ] }, { "type": "field", "port": null, "outboundTag": "direct", "ip": null, "domain": [ "geosite:cn" ] }, { "type": "field", "port": null, "outboundTag": "direct", "ip": [ "geoip:cn" ], "domain": null } ] } } } 6) 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。

服务器端错误日志:
    // 在这里附上服务器端日志
客户端错误日志:
    // 在这里附上客户端日志
``` [Warning] failed to handler mux client connection > Proxy|VMess|Outbound: failed to find an available destination > Retry: [Transport|Internet|WebSocket: failed to dial WebSocket > Transport|Internet|WebSocket: failed to dial to (wss://xx.xx.xx/):  > x509: certificate signed by unknown authority] > Retry: all retry attempts failed

7) 请附上访问日志。在 Linux 中,日志通常在 `/var/log/v2ray/access.log` 文件中。
// 在这里附上服务器端日志

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

补充一点:用的linux系统,所以没有客户端,一样的config.json在windows下的客户端上就很好
DarienRaymond commented 6 years ago

自签TLS证书的话要打开 allowInsecure 选项

albertroger commented 6 years ago

谢谢,就是这个原因!非常感谢@DarienRaymond