Comments (6)
你好,看错误信息表现为两个问题
- 服务器端和客户端中的common.yaml里的secret配置不一致导致握手失败
- common.yaml中的log相关配置被设置为0导致日志无法被滚动生成
from natpass.
哦哦,不好意思,看到#include common.yaml 是注释状态,私以为可以无需配置
解除注释,并修改格式后变为 include: common.yaml
重启3端后。连接被控端报错:
2022/07/11 12:26:54 [INFO]add link a975db41d3f34cec
panic: runtime error: index out of range [0] with length 0
goroutine 34 [running]:
github.com/lwch/logging.(*rotateSizeLogger).rotate(0x1400009e000)
/root/go/pkg/mod/github.com/lwch/[email protected]/rotate_size.go:99 +0x7f8
github.com/lwch/logging.(*Logger).Error(0x101c6de60, {0x10125ca7c, 0xe}, {0x14000068160, 0x1, 0x1})
/root/go/pkg/mod/github.com/lwch/[email protected]/log.go:90 +0x7c
github.com/lwch/logging.Error(...)
/root/go/pkg/mod/github.com/lwch/[email protected]/log.go:30
github.com/lwch/natpass/code/network.(*Conn).loopWrite(0x140000ac040)
/build/code/network/network.go:127 +0x1cc
created by github.com/lwch/natpass/code/network.NewConn
/build/code/network/network.go:42 +0x148
from natpass.
可以检查一下common.yaml中的log.size和log.rotate配置这两个目前不支持设置为0哦
from natpass.
common都是保持的原有设置,未曾修改
common
secret: 0123456789 # 预共享密钥,否则握手失败
link:
read_timeout: 1s # 读取数据包超时时间
write_timeout: 1s # 发送数据包超时时间
log:
dir: ./logs # 路径,相对于可执行文件所在目录的相对路径
size: 50M # 单个文件大小
rotate: 7 # 保留数量
local
id: local # 客户端ID
server: XXXXXX:9876 # 服务器地址
ssl: false # 是否使用tls加密连接
dashboard: # web面板
enabled: true # 是否开放dashboard
listen: 0.0.0.0 # 监听地址
port: 8080 # 监听端口号
include: common.yaml
rules: # rule列表
#include rule.d/*.yaml
remote
id: remote # 客户端ID
server: xxxxx:9876 # 服务器地址
ssl: false # 是否使用tls加密连接
dashboard: # web面板
enabled: false # 是否开放dashboard
include: common.yaml
rules: # rule列表
server
listen: 9876 # 监听端口号
include: common.yaml
#tls:
# key: /dir/to/tls/key/file # tls密钥
# crt: /dir/to/tls/crt/file # tls证书
from natpass.
#include前面有个井号哦
from natpass.
可以了,我还以为 #include是被注释了
from natpass.
Related Issues (20)
- 配合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
- 锁屏时被控服务崩溃
- 在云上的服务器部署服务端时监听了IPV6端口而不是IPV4端口,导致客户端无法连接 HOT 1
- 相比较于常用的ToDesk有什么区别 HOT 1
- 是否可以连接Android设备 HOT 3
- windows注册服务后无法启动 & 启动远程后客户端会弹出一个终端窗口 HOT 3
- 服务端是否支持websocket的协议 HOT 1
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.