Socks: `AssociatePacketConn.WriteTo` returns `n` with header length
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 30/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- go
- 领域
- networking
调研方向
检查 protocol/socks/packet.go 第 59-73 行,追踪 AssociatePacketConn.WriteTo 如何构建其缓冲区并计算 n。将该行为与链接的 SOCKS 实现进行比较,然后确定 n 应表示 payload,还是应表示包含 header 的缓冲区,并记录已确认的设计或所需的更改。
由索引模型根据 Issue 内容生成。
描述
My observation is that because the buffer passed to WriteTo includes the header, the returned n (number of bytes written) reflects the total length, including this header.
I have referred to other popular SOCKS implementations, and it seems they do not include the header length in the returned n for similar operations.
https://github.com/wzshiming/socks5/blob/c06aae6747c6d36ee8c5994675d7b223cdcf6540/udp.go#L53-L71
Their n are all payload's length.
This difference in behavior leads me to wonder if this is an intended feature of the SagerNet/sing implementation, or if there's another reason for this design choice.
Could you please clarify if this behavior is by design and, if so, the rationale behind it?
- 主要语言
- Go
- 星标
- 131
- 派生
- 111
- 平均合并
- 1 小时 42 分钟
- 30 天内合并 PR
- 1
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
SagerNet/sing 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 3/5 1-2 天 新手友好度 68/100
-
addr 相关的几个问题未关闭
难度 4/5 3-5 天 新手友好度 42/100
-
难度 3/5 1-2 天 新手友好度 25/100
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 92/100
open-telemetry/opentelemetry-go-compile-instrumentation#1417 ·
维护者通常 2 天内回复
-
agent-research-finding agent-research-recommend chore ready-for-agent
难度 2/5 1-3 小时 新手友好度 85/100
jordansmall/spindrift#4068 · 1 条评论 ·
维护者通常 1 天内回复
-
Type/Task
难度 2/5 1-3 小时 新手友好度 74/100
OpenNSW/nsw-srilanka#537 ·
维护者通常 1 天内回复
-
security
难度 2/5 1-2 天 新手友好度 62/100
-
难度 2/5 1-3 小时 新手友好度 90/100
维护者通常 1 天内回复