优化连接管理和日志记录

This commit is contained in:
2025-02-27 23:11:36 +08:00
parent 38d5341e84
commit 037c2c53c6
11 changed files with 436 additions and 403 deletions

View File

@@ -101,7 +101,7 @@ func data(tagLen byte, tagBuf []byte) error {
// 发送 tag
slog.Info("准备代理流量")
writeBuf := make([]byte, 1+len(tagBuf))
writeBuf := make([]byte, 1+tagLen)
writeBuf[0] = tagLen
copy(writeBuf[1:], tagBuf)
_, err = src.Write(writeBuf)