server

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	Runtime() *grpc_socks5.InfoResponse
}

Service .

type Socks5

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

Socks5 代理服務器

func NewSocks5

func NewSocks5(s Service,
	info *grpc_socks5.ServerInfo,
	requestTimeout, bridgeTimeout time.Duration,
	bufferLen int,
) *Socks5

NewSocks5 .

func (*Socks5) Connect

func (s *Socks5) Connect(stream grpc_socks5.Socks5_ConnectServer) (e error)

Connect 執行 Connect 建立網橋

func (*Socks5) DNS

func (s *Socks5) DNS(ctx context.Context, request *grpc_socks5.DNSRequest) (response *grpc_socks5.DNSResponse, e error)

DNS 轉發 dns 請求

func (*Socks5) GetInfo

func (s *Socks5) GetInfo() *grpc_socks5.ServerInfo

GetInfo .

func (*Socks5) Info

func (s *Socks5) Info(ctx context.Context, request *grpc_socks5.InfoRequest) (response *grpc_socks5.InfoResponse, e error)

Info 返回 服務器 運行 信息

func (*Socks5) Ping added in v0.3.0

func (s *Socks5) Ping(ctx context.Context, request *grpc_socks5.PingRequest) (response *grpc_socks5.PingResponse, e error)

Ping 向服務器 發送一個 數據包 並等待服務器 返回原包 用來測試 延遲

Jump to

Keyboard shortcuts

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