proxy

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig added in v0.3.0

type AuthConfig struct {
	User            string
	Password        string
	KeyFile         string
	ServerAddr      string
	InteractiveAuth bool
}

type HTTPOverSSH

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

HTTPOverSSH 表示基于SSH的HTTP代理

func NewHTTPOverSSH

func NewHTTPOverSSH(cfg *config.Config, log *logger.Logger, sshClient *SSHClient, r *router.Router) (*HTTPOverSSH, error)

NewHTTPOverSSH 创建HTTP代理

func (*HTTPOverSSH) Close

func (p *HTTPOverSSH) Close() error

Close 关闭代理服务

func (*HTTPOverSSH) Start

func (p *HTTPOverSSH) Start() error

Start 启动HTTP代理服务

type SOCKS5OverSSH added in v0.7.0

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

func NewSOCKS5OverSSH added in v0.7.0

func NewSOCKS5OverSSH(cfg *config.Config, log *logger.Logger, sshClient *SSHClient, r *router.Router) (*SOCKS5OverSSH, error)

NewSOCKS5OverSSH 创建 SOCKS5 代理实例

func (*SOCKS5OverSSH) Close added in v0.7.0

func (s *SOCKS5OverSSH) Close() error

Close 优雅关闭服务

func (*SOCKS5OverSSH) Start added in v0.7.0

func (s *SOCKS5OverSSH) Start() error

Start 启动 SOCKS5 监听循环

type SSHClient

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

SSHClient 管理SSH连接

func NewSSHClient

func NewSSHClient(cfg *config.Config, log *logger.Logger) (*SSHClient, error)

func (*SSHClient) Close

func (s *SSHClient) Close() error

Close 关闭所有连接(逆序关闭跳板机)

func (*SSHClient) Dial

func (s *SSHClient) Dial(network, addr string) (net.Conn, error)

增加Dial方法的实现,使其满足常见的 Dialer 接口

Jump to

Keyboard shortcuts

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