Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllHandlers = make(map[string]Handler)
AllHandlers 注册handler的标准位置
View Source
var ConfigPath string
ConfigPath 主配置文件的路径
View Source
var LocalUser *myuser.ValidUser
LocalUser 本地用户
View Source
var ProxyStatus int
ProxyStatus 代理的状态(全局/智能)
View Source
var Timeout time.Duration
Timeout 超时时间
View Source
var Users map[string]*myuser.ValidUser
Users 所有授权用户
Functions ¶
func SetProxyStatus ¶
SetProxyStatus 设置Proxy-Status,enable/smart
Types ¶
type Handler ¶
type Handler interface { Handle(e *mynet.Arg) error // 处理业务 Match(firstMsg []byte) bool // 判断业务请求是否符合该handler Name() string // Handler的名字 }
Handler 请求处理者
type Relay ¶
type Relay struct {
// contains filtered or unexported fields
}
Relay 网络入口,负责流量分发 必须使用CreateRelay方法进行构造
func (*Relay) AddHandler ¶
AddHandler 为Relayer增添可用的handler
Click to show internal directories.
Click to hide internal directories.