百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

socks5

> 编程语言
开源

Go 中的 SOCKS 协议版本 5 库。提供完整的 TCP/UDP 和 IPv4/IPv6 支持

786 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Go 中的 SOCKS 协议版本 5 库。提供完整的 TCP/UDP 和 IPv4/IPv6 支持

socks5 SOCKS协议版本5库。全面支持TCP/UDP和IPv4/IPv6。目标:简洁,少是多,小的API,代码就像原始协议一样。

  • 协商:
  • type NegotiationRequest struct
  • func NewNegotiationRequest(methods []byte), 在客户端
  • func (r *NegotiationRequest) WriteTo(w io.Writer), 客户端写入服务器
  • func NewNegotiationRequestFrom(r io.Reader), 服务器从客户端读取
  • type NegotiationReply struct
  • func NewNegotiationReply(method byte), 在服务器
  • func (r *NegotiationReply) WriteTo(w io.Writer), 服务器写入客户端
  • func NewNegotiationReplyFrom(r io.Reader), 客户端从服务器读取
  • 用户和密码协商:
  • type UserPassNegotiationRequest struct
  • func NewUserPassNegotiationRequest(username []byte, password []byte), 在客户端
  • func (r *UserPassNegotiationRequest) WriteTo(w io.Writer), 客户端写入服务器
  • func NewUserPassNegotiationRequestFrom(r io.Reader), 服务器从客户端读取
  • type UserPassNegotiationReply struct
  • func NewUserPassNegotiationReply(status byte), 在服务器
  • func (r *UserPassNegotiationReply) WriteTo(w io.Writer), 服务器写入客户端
  • func NewUserPassNegotiationReplyFrom(r io.Reader), 客户端从服务器读取
  • 请求:
  • type Request struct
  • func NewRequest(cmd byte, atyp byte, dstaddr []byte, dstport []byte), 在客户端
  • func (r *Request) WriteTo(w io.Writer), 客户端写入服务器
  • func NewRequestFrom(r io.Reader), 服务器从客户端读取
  • 服务器收到客户端的 *Request 后,进行处理...
  • 回复:
  • type Reply struct
  • func NewReply(rep byte, atyp byte, bndaddr []byte, bndport []byte), 在服务器
  • func (r *Reply) WriteTo(w io.Writer), 服务器写入客户端
  • func NewReplyFrom(r io.Reader), 客户端从服务器读取

中文 News Youtube

Issues· 8 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Goproxysockssocks-protocolsocks5

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言