[BUG]使用一段时间之后就无法连接,重启之后恢复正常
Author: ghostCreated Feb 25, 2022Updated May 5, 2025
- 我确定我已经尝试多次复现此次问题,并且将会提供涉及此问题的系统和网络环境,软件及其版本。
简单描述这个 Bug
用几天之后,就连不上了,无法上网,本以为是443端口被封,然后分别在国内、国外服务器上telnet 443端口,发现都不通,但443端口仍有不少连接(据观察连接情况不怎么变化,一直是那些IP,对应的连接数也不变化),trojan-go重启之后恢复正常。
如何复现这个 Bug
约10人以上连接使用几天就出现这个情况,已多次出现这个问题
服务器和客户端环境信息
Ubuntu 16.04 Shadowrocket
服务端和客户端日志
最后一行ERROR日志:
[ERROR] 2022/02/25 08:26:59 github.com/p4gefau1t/trojan-go/tunnel/tls.(*Server).acceptLoop.func1:server.go:140 tls handshake failed | read tcp 31.xxx.118.216:443->183.125.xx.174:47122: read: connection timed out服务端和客户端配置文件
{
"run_type": "server",
"local_addr": "0.0.0.0",
"local_port": 443,
"remote_addr": "www.example.com,
"remote_port": 80,
"password": null,
"log_level": 1,
"log_file": "/usr/local/trojan/trojan.log",
"ssl": {
"cert": "xxx",
"key": "xxx",
"key_password": "",
"cipher": ".........",
"cipher_tls13": ".........",
"prefer_server_cipher": true,
"alpn": ["http/1.1"],
"alpn_port_override": {
"h2": 81
},
"reuse_session": true,
"session_ticket": false,
"session_timeout": 600,
"plain_http_response": "",
"curves": "",
"dhparam": "",
"sni": "www.example.com",
"fallback_addr": "www.example.com",
"fallback_port": 443
},
"tcp": {
"prefer_ipv4": false,
"no_delay": true,
"keep_alive": true,
"reuse_port": false,
"fast_open": false,
"fast_open_qlen": 20
},
"mysql": {
"enabled": true,
"server_addr": "xxx",
"server_port": xxx,
"database": "xxx",
"username": "xxx",
"password": "xxx",
"cafile": ""
}
}服务端和客户端版本信息
Trojan-Go v0.10.6 Go Version: go1.17.1 OS/Arch: linux/amd64 Git Commit: 2dc60f52e79ff8b910e78e444f1e80678e936450
Developed by PageFault (p4gefau1t) Licensed under GNU General Public License version 3 GitHub Repository: https://github.com/p4gefau1t/trojan-go Trojan-Go Documents: https://p4gefau1t.github.io/trojan-go/
Source: p4gefau1t/trojan-go