-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TUN模式下不定期每隔几小时程序报错退出 #60
Labels
bug
Something isn't working
Comments
初步判断和 syncthing 有关 |
又抓到报错了,现在syncthing都是没开的
另外明天想回校了,应该后面也不会开VPN了 |
看起来还是存在稳定性问题,不知道是和服务端有关还是 zju-connect 本身的问题 |
zju-connect/stack/tun/stack_windows.go Lines 31 to 39 in 384f1dc
看起来像是这里写了一个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好了 |
cxz66666
added a commit
that referenced
this issue
Aug 19, 2024
Due to wintun-go module use error slice address, we extra check slice length before send to endpoint
给wintun-go的作者发了邮件,也在zju-connect中加上了额外的check。先暂时关闭该issue,后续有问题再打开 🗾 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
软件版本
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```
重现方法
也许多跑一会就会出错?
预期行为
稳定运行
日志
配置文件或启动参数 (请去除敏感信息)
The text was updated successfully, but these errors were encountered: