p4gefau1t / trojan-go

Go实现的Trojan代理,支持多路复用/路由功能/CDN中转/Shadowsocks混淆插件,多平台,无依赖。A Trojan proxy written in Go. An unidentifiable mechanism that helps you bypass GFW. https://p4gefau1t.github.io/trojan-go/
GNU General Public License v3.0
7.65k stars 1.66k forks source link

[BUG]Qv2ray无法连接,服务器端和客户端都报错 #397

Open cnp2nx opened 2 years ago

cnp2nx commented 2 years ago

我们建议您按照下方模板填写 Bug Report,以便我们收集更多的有效信息

翻不了

如何复现这个 Bug

翻不了

服务器和客户端环境信息

服务器是Debian10 64,客户端win10的qv2rav-2.7

服务端和客户端日志

服务器端的日志 [INFO] 2021/10/28 11:40:48 Websocket enabled [INFO] 2021/10/28 11:40:49 Trojan-Go server is listening on 0.0.0.0:443 [INFO] 2021/10/28 11:41:37 Conn accepted from 172.68.132.90:64846 [ERROR] 2021/10/28 11:41:38 github.com/p4gefau1t/trojan-go/protocol/trojan.NewInboundWebsocket:websocket.go:318 Failed to obtain websocket scapegoat | bad status [ERROR] 2021/10/28 11:41:38 github.com/p4gefau1t/trojan-go/proxy/server.(Server).handleConn:server.go:76 Failed to start inbound session, remote:172.68.132.90:64846 | Invalid websocket request | Invalid double TLS handshake from 172.68.132.90:64846 | tls: first record does not look like a TLS handshake [INFO] 2021/10/28 11:41:39 Conn accepted from 172.68.132.90:14596 [ERROR] 2021/10/28 11:41:40 github.com/p4gefau1t/trojan-go/protocol/trojan.NewInboundWebsocket:websocket.go:318 Failed to obtain websocket scapegoat | bad status [ERROR] 2021/10/28 11:41:40 github.com/p4gefau1t/trojan-go/proxy/server.(Server).handleConn:server.go:76 Failed to start inbound session, remote:172.68.132.90:14596 | Invalid websocket request | Invalid double TLS handshake from 172.68.132.90:14596 | tls: first record does not look like a TLS handshake [INFO] 2021/10/28 11:41:43 Conn accepted from 172.68.132.90:23270 [ERROR] 2021/10/28 11:41:43 github.com/p4gefau1t/trojan-go/protocol/trojan.NewInboundWebsocket:websocket.go:318 Failed to obtain websocket scapegoat | bad status [ERROR] 2021/10/28 11:41:43 github.com/p4gefau1t/trojan-go/proxy/server.(Server).handleConn:server.go:76 Failed to start inbound session, remote:172.68.132.90:23270 | Invalid websocket request | Invalid double TLS handshake from 172.68.132.90:23270 | tls: first record does not look like a TLS handshake [INFO] 2021/10/28 11:41:45 Conn accepted from 172.68.132.90:29988 [INFO] 2021/10/28 11:41:48 Conn accepted from 172.68.132.90:41018 [ERROR] 2021/10/28 11:41:49 github.com/p4gefau1t/trojan-go/protocol/trojan.NewInboundWebsocket:websocket.go:318 Failed to obtain websocket scapegoat | bad status [ERROR] 2021/10/28 11:41:49 github.com/p4gefau1t/trojan-go/proxy/server.(Server).handleConn:server.go:76 Failed to start inbound session, remote:172.68.132.90:41018 | Invalid websocket request | Invalid double TLS handshake from 172.68.132.90:41018 | tls: first record does not look like a TLS handshake [ERROR] 2021/10/28 11:41:53 github.com/p4gefau1t/trojan-go/protocol/trojan.NewInboundWebsocket:websocket.go:318 Failed to obtain websocket scapegoat | bad status [ERROR] 2021/10/28 11:41:53 github.com/p4gefau1t/trojan-go/proxy/server.(Server).handleConn:server.go:76 Failed to start inbound session, remote:172.68.132.90:29988 | Invalid websocket request | Invalid double TLS handshake from 172.68.132.90:29988 | read tcp 64.27.7.102:443->172.68.132.90:29988: i/o timeout [INFO] 2021/10/28 11:41:56 Conn accepted from 172.68.132.90:64000 [ERROR] 2021/10/28 11:41:56 github.com/p4gefau1t/trojan-go/protocol/trojan.NewInboundWebsocket:websocket.go:318 Failed to obtain websocket scapegoat | bad status [ERROR] 2021/10/28 11:41:56 github.com/p4gefau1t/trojan-go/proxy/server.(Server).handleConn:server.go:76 Failed to start inbound session, remote:172.68.132.90:64000 | Invalid websocket request | Invalid double TLS handshake from 172.68.132.90:64000 | tls: first record does not look like a TLS handshake [INFO] 2021/10/28 11:42:05 Conn accepted from 172.68.132.90:36922 [ERROR] 2021/10/28 11:42:06 github.com/p4gefau1t/trojan-go/protocol/trojan.NewInboundWebsocket:websocket.go:318 Failed to obtain websocket scapegoat | bad status [ERROR] 2021/10/28 11:42:06 github.com/p4gefau1t/trojan-go/proxy/server.(Server).handleConn:server.go:76 Failed to start inbound session, remote:172.68.132.90:36922 | Invalid websocket request | Invalid double TLS handshake from 172.68.132.90:36922 | tls: first record does not look like a TLS handshake [INFO] 2021/10/28 11:42:09 Conn accepted from 172.68.132.90:49128 [ERROR] 2021/10/28 11:42:11 github.com/p4gefau1t/trojan-go/protocol/trojan.NewInboundWebsocket:websocket.go:318 Failed to obtain websocket scapegoat | bad status [ERROR] 2021/10/28 11:42:11 github.com/p4gefau1t/trojan-go/proxy/server.(Server).handleConn:server.go:76 Failed to start inbound session, remote:172.68.132.90:49128 | Invalid websocket request | Invalid double TLS handshake from 172.68.132.90:49128 | tls: first record does not look like a TLS handshake [INFO] 2021/10/28 11:42:13 Conn accepted from 172.68.132.90:60650 [ERROR] 2021/10/28 11:42:13 github.com/p4gefau1t/trojan-go/protocol/trojan.NewInboundWebsocket:websocket.go:318 Failed to obtain websocket scapegoat | bad status [ERROR] 2021/10/28 11:42:13 github.com/p4gefau1t/trojan-go/proxy/server.(Server).handleConn:server.go:76 Failed to start inbound session, remote:172.68.132.90:60650 | Invalid websocket request | Invalid double TLS handshake from 172.68.132.90:60650 | tls: first record does not look like a TLS handshake [INFO] 2021/10/28 11:42:25 Conn accepted from 172.68.132.90:37672 [ERROR] 2021/10/28 11:42:26 github.com/p4gefau1t/trojan-go/protocol/trojan.NewInboundWebsocket:websocket.go:318 Failed to obtain websocket scapegoat | bad status [ERROR] 2021/10/28 11:42:26 github.com/p4gefau1t/trojan-go/proxy/server.(Server).handleConn:server.go:76 Failed to start inbound session, remote:172.68.132.90:37672 | Invalid websocket request | Invalid double TLS handshake from 172.68.132.90:37672 | tls: first record does not look like a TLS handshake [INFO] 2021/10/28 11:42:28 Conn accepted from 172.68.132.90:44346 [ERROR] 2021/10/28 11:42:28 github.com/p4gefau1t/trojan-go/protocol/trojan.NewInboundWebsocket:websocket.go:318 Failed to obtain websocket scapegoat | bad status [ERROR] 2021/10/28 11:42:28 github.com/p4gefau1t/trojan-go/proxy/server.(Server).handleConn:server.go:76 Failed to start inbound session, remote:172.68.132.90:44346 | Invalid websocket request | Invalid double TLS handshake from 172.68.132.90:44346 | tls: first record does not look like a TLS handshake [INFO] 2021/10/28 11:42:30 Conn accepted from 172.68.132.90:52348 [ERROR] 2021/10/28 11:42:31 github.com/p4gefau1t/trojan-go/protocol/trojan.NewInboundWebsocket:websocket.go:318 Failed to obtain websocket scapegoat | bad status [ERROR] 2021/10/28 11:42:31 github.com/p4gefau1t/trojan-go/proxy/server.(Server).handleConn:server.go:76 Failed to start inbound session, remote:172.68.132.90:52348 | Invalid websocket request | Invalid double TLS handshake from 172.68.132.90:52348 | tls: first record does not look like a TLS handshake [INFO] 2021/10/28 11:42:32 Conn accepted from 172.68.132.90:57552 [INFO] 2021/10/28 11:42:33 Conn accepted from 172.68.132.90:60072 [ERROR] 2021/10/28 11:42:33 github.com/p4gefau1t/trojan-go/protocol/trojan.NewInboundWebsocket:websocket.go:318 Failed to obtain websocket scapegoat | bad status [ERROR] 2021/10/28 11:42:33 github.com/p4gefau1t/trojan-go/proxy/server.(Server).handleConn:server.go:76 Failed to start inbound session, remote:172.68.132.90:57552 | Invalid websocket request | Invalid double TLS handshake from 172.68.132.90:57552 | tls: first record does not look like a TLS handshake [ERROR] 2021/10/28 11:42:33 github.com/p4gefau1t/trojan-go/protocol/trojan.NewInboundWebsocket:websocket.go:318 Failed to obtain websocket scapegoat | bad status [ERROR] 2021/10/28 11:42:33 github.com/p4gefau1t/trojan-go/proxy/server.(Server).handleConn:server.go:76 Failed to start inbound session, remote:172.68.132.90:60072 | Invalid websocket request | Invalid double TLS handshake from 172.68.132.90:60072 | tls: first record does not look like a TLS handshake [INFO] 2021/10/28 11:42:41 Conn accepted from 172.68.132.90:26010 [ERROR] 2021/10/28 11:42:41 github.com/p4gefau1t/trojan-go/protocol/trojan.NewInboundWebsocket:websocket.go:318 Failed to obtain websocket scapegoat | bad status [ERROR] 2021/10/28 11:42:41 github.com/p4gefau1t/trojan-go/proxy/server.(*Server).handleConn:server.go:76 Failed to start inbound session, remote:172.68.132.90:26010 | Invalid websocket request | Invalid double TLS handshake from 172.68.132.90:26010 | EOF

客户端的日志文件 只把报错的贴出来如下 [TrojanGo] [ERROR] 2021/10/29 00:18:55 github.com/p4gefau1t/trojan-go/proxy.(*Proxy).relayConnLoop.func1.1:proxy.go:66 proxy failed to dial connection | websocket failed to handshake with server | unexpected EOF

服务端和客户端配置文件

服务器的配置文件 { "run_type": "server", "local_addr": "0.0.0.0", "local_port": 443, "remote_addr": "127.0.0.1", "remote_port": 80, "log_level": 1, "log_file": "/etc/trojan-go/test.log", "password": [ "eegh7325" ], "buffer_size": 32, "dns": [], "ssl": { "verify": true, "verify_hostname": true, "cert": "/etc/trojan-go/server.crt", "key": "/etc/trojan-go/server.key", "key_password": "", "cipher": "", "cipher_tls13": "", "curves": "", "prefer_server_cipher": false, "sni": "exsample.com", "alpn": [ "http/1.1" ], "session_ticket": true, "reuse_session": true, "plain_http_response": "", "fallback_port": 1234, "fingerprint": "firefox", "serve_plain_text": false }, "tcp": { "no_delay": true, "keep_alive": true, "reuse_port": false, "prefer_ipv4": false, "fast_open": false, "fast_open_qlen": 20 }, "mux": { "enabled": false, "concurrency": 8, "idle_timeout": 60 }, "router": { "enabled": false, "bypass": [], "proxy": [], "block": [], "default_policy": "proxy", "domain_strategy": "as_is", "geoip": "/etc/trojan-go/geoip.dat", "geosite": "/etc/trojan-go/geosite.dat" }, "websocket": { "enabled": true, "path": "/parhpath", "hostname": "exsample.com", "obfuscation_password": "", "double_tls": true, "ssl": { "verify": true, "verify_hostname": true, "cert": "/etc/trojan-go/server.crt", "key": "/etc/trojan-go/server.key", "key_password": "", "prefer_server_cipher": false, "sni": "exsample.com", "session_ticket": true, "reuse_session": true, "plain_http_response": "" } } } 客户端的配置 { "outbounds": [ { "_QV2RAY_USE_GLOBAL_FORWARDPROXY": false, "mux": { "concurrency": 1, "enabled": false }, "protocol": "trojan-go", "sendThrough": "0.0.0.0", "settings": { "encryption": "", "host": "exsample.com", "mux": false, "password": "eegh7325", "path": "/parhpath", "plugin": "", "port": 443, "server": "exsample.com", "sni": "exsample.com", "type": 1 }, "streamSettings": { }, "tag": "" } ] }

服务端和客户端版本信息

请执行./trojan-go -version并将输出完整粘贴在此处 Trojan-Go v0.5.1
Qv2ray 2.7.0:7000

其他信息

你认为对我们修复bug有帮助的任何信息都可以在这里写出来

zairoo commented 2 years ago

运营商重置连接,只能中转