Closed sssxks closed 2 months ago
初步判断和 syncthing 有关
又抓到报错了,现在syncthing都是没开的
2024/08/16 20:59:46 KeepAlive: OK
2024/08/16 21:00:45 dns.msftncsi.com -> 131.107.255.255
2024/08/16 21:00:46 KeepAlive: OK
2024/08/16 21:01:46 KeepAlive: OK
2024/08/16 21:01:55 update100.sangfor.com.cn -> 121.46.26.71
2024/08/16 21:02:00 dns.msftncsi.com -> 131.107.255.255
2024/08/16 21:02:46 KeepAlive: OK
2024/08/16 21:03:25 mobile.events.data.microsoft.com -> 20.189.173.14
2024/08/16 21:03:47 KeepAlive: OK
2024/08/16 21:04:00 dns.msftncsi.com -> 131.107.255.255
2024/08/16 21:04:30 dns.msftncsi.com -> 131.107.255.255
2024/08/16 21:04:47 KeepAlive: OK
2024/08/16 21:05:47 KeepAlive: OK
2024/08/16 21:06:21 configuration-server-lb-1105093370.us-east-1.elb.amazonaws.com -> 3.85.66.101
2024/08/16 21:06:45 dns.msftncsi.com -> 131.107.255.255
2024/08/16 21:06:47 KeepAlive: OK
2024/08/16 21:07:47 KeepAlive: OK
2024/08/16 21:07:57 ecs.office.com -> 52.113.194.132
2024/08/16 21:07:57 ecs.office.com -> 52.113.194.132
2024/08/16 21:08:47 KeepAlive: OK
2024/08/16 21:09:45 dns.msftncsi.com -> 131.107.255.255
2024/08/16 21:09:47 KeepAlive: OK
2024/08/16 21:10:45 dns.msftncsi.com -> 131.107.255.255
2024/08/16 21:10:47 KeepAlive: OK
2024/08/16 21:11:47 KeepAlive: OK
2024/08/16 21:12:47 KeepAlive: OK
2024/08/16 21:13:47 KeepAlive: OK
2024/08/16 21:14:47 KeepAlive: OK
2024/08/16 21:15:47 KeepAlive: OK
2024/08/16 21:16:08 default.exp-tas.com -> 13.107.5.93
2024/08/16 22:13:35 Error occurred while receiving, retrying: read tcp 192.168.0.102:11701->218.108.88.254:443: wsarecv: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
2024/08/16 22:13:35 Error occurred while sending, retrying: write tcp 192.168.0.102:11698->218.108.88.254:443: wsasend: An existing connection was forcibly closed by the remote host.
2024/08/16 22:13:36 Socket: connected to: 218.108.88.254:443
2024/08/16 22:13:36 Socket: connected to: 218.108.88.254:443
2024/08/16 22:13:36 TLS: connected to: 218.108.88.254:443
2024/08/16 22:13:36 TLS: connected to: 218.108.88.254:443
panic: runtime error: index out of range [0] with length 0
goroutine 89 [running]:
golang.zx2c4.com/wintun.Session.SendPacket({0xc00009b420?}, {0x21d5943a774?, 0x0?, 0x0?})
golang.zx2c4.com/wintun@v0.0.0-20230126152724-0fa3db229ce2/session.go:91 +0x72
golang.zx2c4.com/wireguard/tun.(*NativeTun).Write(0xc00009b400, {0xc0000a4ea0, 0x1, 0x0?}, 0x0)
golang.zx2c4.com/wireguard@v0.0.0-20231022001213-2e0774f246fb/tun/tun_windows.go:201 +0x2c5
github.com/mythologyli/zju-connect/stack/tun.(*Endpoint).Write(0xc00035be40, {0xc000039600, 0x0, 0x578})
github.com/mythologyli/zju-connect/stack/tun/stack_windows.go:35 +0x103
github.com/mythologyli/zju-connect/stack/tun.(*Stack).Run.func1()
github.com/mythologyli/zju-connect/stack/tun/stack.go:48 +0xe5
created by github.com/mythologyli/zju-connect/stack/tun.(*Stack).Run in goroutine 54
github.com/mythologyli/zju-connect/stack/tun/stack.go:38 +0x99
另外明天想回校了,应该后面也不会开VPN了
看起来还是存在稳定性问题,不知道是和服务端有关还是 zju-connect 本身的问题
看起来像是这里写了一个size=0的包,然后使用的wintun这里用了错误的方法获取包地址
func (session Session) SendPacket(packet []byte) {
syscall.Syscall(procWintunSendPacket.Addr(), 2, session.handle, uintptr(unsafe.Pointer(&packet[0])), 0)
}
改成reflect.ValueOf(s).Pointer()即可,我先在zju-connect中加一个长度为0的check好了
给wintun-go的作者发了邮件,也在zju-connect中加上了额外的check。先暂时关闭该issue,后续有问题再打开 🗾
软件版本 v0.6.0
使用环境 Windows 11 还设置了一个xray系统代理
服务端地址 rvpn.zju.edu.cn:443
故障描述 (建议结合图片说明) 不定期每隔几小时程序报错退出 panic: runtime error: index out of range [0] with length 0
goroutine 107 [running]: golang.zx2c4.com/wintun.Session.SendPacket({0xc000242520?}, {0x2d9c7f33d08?, 0x0?, 0x0?}) golang.zx2c4.com/wintun@v0.0.0-20230126152724-0fa3db229ce2/session.go:91 +0x72 golang.zx2c4.com/wireguard/tun.(NativeTun).Write(0xc000242500, {0xc000009908, 0x1, 0x0?}, 0x0) golang.zx2c4.com/wireguard@v0.0.0-20231022001213-2e0774f246fb/tun/tun_windows.go:201 +0x2c5 github.com/mythologyli/zju-connect/stack/tun.(Endpoint).Write(0xc000482040, {0xc00038c000, 0x0, 0x578}) github.com/mythologyli/zju-connect/stack/tun/stack_windows.go:35 +0x103 github.com/mythologyli/zju-connect/stack/tun.(Stack).Run.func1() github.com/mythologyli/zju-connect/stack/tun/stack.go:48 +0xe5 created by github.com/mythologyli/zju-connect/stack/tun.(Stack).Run in goroutine 98 github.com/mythologyli/zju-connect/stack/tun/stack.go:38 +0x99```
重现方法 也许多跑一会就会出错?
预期行为 稳定运行
日志
配置文件或启动参数 (请去除敏感信息)