Comments (6)
贴点日志
server
2021/11/23 13:27:41 [INFO]listen on 6154
panic: runtime error: index out of range [0] with length 0
goroutine 20 [running]:
github.com/lwch/logging.(*rotateSizeLogger).rotate(0xc00009c000)
/Users/alex.liu/Golang/pkg/mod/github.com/lwch/[email protected]/rotate_size.go:95 +0xcdd
github.com/lwch/logging.Logger.Error(0x139eb90, 0xc00009c000, 0x134d899, 0x27, 0xc0000134d0, 0x3, 0x3)
/Users/alex.liu/Golang/pkg/mod/github.com/lwch/[email protected]/log.go:63 +0x35
github.com/lwch/logging.Error(...)
/Users/alex.liu/Golang/pkg/mod/github.com/lwch/[email protected]/log.go:30
natpass/code/server/handler.(*Handler).Handle(0xc0000ae000, 0x13a1358, 0xc000094020)
/Users/alex.liu/Golang/src/github.com/lwch/natpass/code/server/handler/handler.go:68 +0x11e
created by main.run
/Users/alex.liu/Golang/src/github.com/lwch/natpass/code/server/main.go:116 +0xce
exit status 2
from natpass.
+ (/root/go/pkg/mod/github.com/lwch/[email protected]/log.go:30) github.com/lwch/logging.Error
+ (/build/code/server/handler/handler.go:68) natpass/code/server/handler.(*Handler).Handle
2021/11/23 13:26:39 [ERROR]read handshake from 172.16.19.245:51606 8 times, err=read tcp 172.26.21.214:6154->172.16.19.245:51606: read: connection reset by peer
+ (/root/go/pkg/mod/github.com/lwch/[email protected]/log.go:30) github.com/lwch/logging.Error
+ (/build/code/server/handler/handler.go:68) natpass/code/server/handler.(*Handler).Handle
2021/11/23 13:26:39 [ERROR]read handshake from 172.16.19.245:51606 9 times, err=read tcp 172.26.21.214:6154->172.16.19.245:51606: read: connection reset by peer
+ (/root/go/pkg/mod/github.com/lwch/[email protected]/log.go:30) github.com/lwch/logging.Error
+ (/build/code/server/handler/handler.go:68) natpass/code/server/handler.(*Handler).Handle
2021/11/23 13:26:39 [ERROR]read handshake from 172.16.19.245:51606 10 times, err=read tcp 172.26.21.214:6154->172.16.19.245:51606: read: connection reset by peer
+ (/root/go/pkg/mod/github.com/lwch/[email protected]/log.go:30) github.com/lwch/logging.Error
+ (/build/code/server/handler/handler.go:68) natpass/code/server/handler.(*Handler).Handle
from natpass.
windows
from natpass.
上面这个错误可能是因为配置了错误的log.rotate数值造成的,该数值必须大于0,下一版本中会加入配置文件的参数规范性检查。
- golang本身的代码组织目录结构比较松散,且建议单个文件或方法不宜过长,我这边目前做了一些约定
- 以
h_
开头的文件表示API接口,供前端调用 - 以
send_
开头的文件表示数据包拼装,用于网络通信 - 跨平台编译文件遵从golang的规范,使用build tag或文件名后缀
- 以
- 对于panic的说法,在natpass中原则上只要影响程序正常启动的,直接panic不进行捕获,在运行时产生的错误会有error log记录
- tls是为了保证通信安全,目前let's encrypt项目推进了这么多年就是为了提高网络通信的安全性的,因此在natpass项目中将不会提供不安全的明文传输
最后,感谢您的建议,natpass距离1.0.0正式版release还有很多功能没有完成,因此开发文档较少,我会在开发过程中尽量补齐的。
from natpass.
上面这个问题终于找到原因了,在golang中path在拼绝对路径时会将其转换到一个相对路径,导致最终引用的配置文件没能正确被include进来,该问题将在v0.7.2版本中进行修复
from natpass.
v0.8.0版本已支持非tls加密连接
from natpass.
Related Issues (20)
- vnc界面是空的,帧率和传输数据都是0 HOT 5
- 请问反向shell的规则要怎么配置 HOT 3
- 关于预共享密钥 HOT 9
- 编译报错
- 2022/11/27 15:53:22 [ERROR]invalid handshake from 172.16.17.136:50278 + (/github/home/go/pkg/mod/github.com/lwch/[email protected]/log.go:30) github.com/lwch/logging.Error + (/github/workspace/code/server/handler/handler.go:64) github.com/lwch/natpass/code/server/handler.(*Handler).Handle HOT 5
- 配合noVNC 使用 HOT 1
- [ERROR]invalid handshake from X.X.X.X:XXXXX + (/github/home/go/pkg/mod/github.com/lwch/[email protected]/log.go:30) github.com/lwch/logging.Error + (/github/workspace/code/server/handler/handler.go:64) github.com/lwch/natpass/code/server/handler.(*Handler).Handle HOT 2
- natpass 被用于黑客攻击,如何侦测 ? HOT 3
- 功能特性支持 HOT 1
- 建议把不同的链接方式区分一下 同时反馈几个问题 HOT 5
- 如何使用API的方式进行web远程桌面控制嵌入到别的web页面上 HOT 1
- natpass_0.12.2_linux_amd64解压后在linux系统中启动报错 HOT 2
- 关于windows多用户问题 HOT 3
- 客户端开发计划 HOT 1
- 在rule.d/shell.yaml的local_port能不指定,然后随机使用一个没被占用的端口吗? HOT 2
- 增加port转发的规则 HOT 1
- docker版本能增加下参数说明吗 HOT 1
- web vnc 无法支持键盘鼠标操作 HOT 2
- 请教一下,window下开启服务端,报这个错 HOT 3
- 锁屏时被控服务崩溃
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from natpass.