Documentation ¶
Index ¶
- func Init(cnf *configure.Server, debug bool) (e error)
- type Basic
- 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) 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 ¶
Types ¶
type Socks5 ¶
type Socks5 struct {
Basic
}
Socks5 代理服務器
func (Socks5) Connect ¶
func (s Socks5) Connect(stream grpc_socks5.Socks5_ConnectServer) (e error)
Connect 執行 Connect
客戶端 實現 發送 ConnectRequest.Addr 到服務器 服務器 將 返回 socks5 的 REP
如果 REP 爲 0x00 則 開始 socks5 數據轉發
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.