trojan-go
trojan-go copied to clipboard
[BUG]使用一段时间之后就无法连接,重启之后恢复正常
- [ ] 我确定我已经尝试多次复现此次问题,并且将会提供涉及此问题的系统和网络环境,软件及其版本。
简单描述这个 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/
同问题
同问题
问题根本没解决呀,我配置了https://github.com/p4gefau1t/trojan-go/issues/306 ,但没什么用,用一段时还是需要重启。这么严重的问题,社区没高手解决吗
同问题,不知道什么原因,现在只能 2 个小时重启一次
问题同样遇到过,开始以为是mux的问题,开关对比后发现问题依旧存在。后来设置shadowsocks为false,用了一个星期后此问题没再复现。大概是防火墙在主动探测
改个端口有用吗?我现在的Trojan-Go是随机的高端口,同时配置的Xray走的也是8443,试一段时间看看能不能复现这个问题。
我配置了https://github.com/p4gefau1t/trojan-go/issues/306 ,
我配置这个解决了,好几天都没有出问题
我也出现过
问题同样遇到过,开始以为是mux的问题,开关对比后发现问题依旧存在。后来设置shadowsocks为false,用了一个星期后此问题没再复现。大概是防火墙在主动探测
我的配置文件里根本就没配置这一段,默认应该是false的吧
同样的问题,连接人数一多,几分钟就连不上了,日志里都是connect reset by peer,环境是用centos7服务端,本地openwrt的openclash做代理client,内网设备通过openwrt走代理。 跑优化脚本改过连接数limit
cat /etc/sysctl.conf
net.core.default_qdisc=fq net.ipv4.tcp_congestion_control=bbr fs.file-max = 1000000 fs.inotify.max_user_instances = 8192 net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_fin_timeout = 30 net.ipv4.tcp_tw_reuse = 1 net.ipv4.ip_local_port_range = 1024 65000 net.ipv4.tcp_max_syn_backlog = 16384 net.ipv4.tcp_max_tw_buckets = 6000 net.ipv4.route.gc_timeout = 100 net.ipv4.tcp_syn_retries = 1 net.ipv4.tcp_synack_retries = 1 net.core.somaxconn = 32768 net.core.netdev_max_backlog = 32768 net.ipv4.tcp_timestamps = 0 net.ipv4.tcp_max_orphans = 32768 net.ipv4.ip_forward = 1
其实去年12月就出现过,改过以后适量减少了连接人数,一直用了几个月都正常了 昨天证书马上到期,换了下证书,因为改ssh端口和安全组配置,顺手重启了下vps,结果改完今早就反复又出这个问题了
我也是,修改了启动配置的LimitNOFILE = 51200 但是用一段时间后还是需要重启 客户端才能连接
同问题,不知道什么原因,现在只能 2 个小时重启一次 两个小时可行?我是10分钟设置自动重启,,不然恰一小时内无法连接,不得手动重启。。。。。
我碰到用了一段时间后也不行的情况,重启trojan-go客户端就好了,但服务端没重启。
客户端日志仅有这样的报错:
github.com/p4gefau1t/trojan-go/proxy.(*Proxy).relayConnLoop.func1.1:proxy.go:80 read tcp 127.0.0.1:1090->127.0.0.1:56920: read: connection reset by peer
我也是用段时间就不行了 打开网页一直出现reset和closed 重启服务马上就好 然后又不行了 不知道啥问题
俺也一样!