Documentation ¶
Index ¶
- type Service
- type Socks5
- func (s *Socks5) Connect(stream grpc_socks5.Socks5_ConnectServer) (e error)
- func (s *Socks5) DNS(ctx context.Context, request *grpc_socks5.DNSRequest) (response *grpc_socks5.DNSResponse, e error)
- func (s *Socks5) GetInfo() *grpc_socks5.ServerInfo
- func (s *Socks5) Info(ctx context.Context, request *grpc_socks5.InfoRequest) (response *grpc_socks5.InfoResponse, e error)
- func (s *Socks5) Ping(ctx context.Context, request *grpc_socks5.PingRequest) (response *grpc_socks5.PingResponse, e error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) 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 向服務器 發送一個 數據包 並等待服務器 返回原包 用來測試 延遲
Click to show internal directories.
Click to hide internal directories.