server

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2018 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(cnf *configure.Server, debug bool) (e error)

Init 初始化 配置

Types

type Basic

type Basic struct {
}

Basic 提供了 通用的 一些 功能

func (Basic) Verify

func (s Basic) Verify(ctx context.Context) (e error)

Verify 驗證 擁有 權限

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 向服務器 發送一個 數據包 並等待服務器 返回原包 用來測試 延遲

Jump to

Keyboard shortcuts

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