socks5test

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package socks5test 提供仅供测试使用的最小 SOCKS5 CONNECT server。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server 是无认证 SOCKS5 CONNECT 测试服务。它只实现本项目代理契约需要的 CONNECT,收到其他命令会明确拒绝,避免测试 helper 意外成为通用代理实现。

func New

func New() (*Server, error)

New 启动监听在 loopback 随机端口上的测试服务。

func (*Server) Close

func (s *Server) Close() error

Close 等待已开始的转发协程退出。调用方应先取消请求或等其返回。

func (*Server) URL

func (s *Server) URL(scheme string) string

URL 返回可传给 HTTP transport 的 socks5 或 socks5h URI。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL