Documentation ¶
Index ¶
- Variables
- func GetProxies() (map[string]Proxy, error)
- func HandleCommonCommand(args []string)
- func HandleMiscCommand(args []string)
- func HandleModeCommand(args []string)
- func HandleProxyCommand(args []string)
- func HandleServerCommand(args []string)
- func ProxySetResolver(params []string) (int, []common.Node)
- func UseServerResolver(params []string) (int, []common.Node)
- type Proxy
- type ProxyList
- type SelectorTable
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ModeGlobal = "global" ModeRule = "rule" ModeDirect = "direct" )
View Source
var ( ProxyTypeSelector = "Selector" ProxyTypeDirect = "Direct" ProxyTypeReject = "Reject" ProxyNameGlobal = "GLOBAL" )
common proxy values
View Source
var (
ErrSelectorNotInitialized = errors.New("the selector table is not initialized")
)
Functions ¶
func GetProxies ¶
func HandleCommonCommand ¶
func HandleCommonCommand(args []string)
func HandleMiscCommand ¶
func HandleMiscCommand(args []string)
func HandleModeCommand ¶
func HandleModeCommand(args []string)
func HandleProxyCommand ¶
func HandleProxyCommand(args []string)
func HandleServerCommand ¶
func HandleServerCommand(args []string)
Types ¶
type Proxy ¶
type Proxy struct { Name string `json:"name"` Type string `json:"type"` Now string `json:"now"` All []string `json:"all"` History []struct { Delay int `json:"delay"` } `json:"history"` }
func GetProxyGroup ¶
func (Proxy) LastestDelay ¶
LastestDelay returns the last delay recorded in history, 0 means the delay is unknown, should be failed to connect.
func (Proxy) NameEncoded ¶
type SelectorTable ¶
func GetSelectorTable ¶
func GetSelectorTable() (*SelectorTable, error)
func (SelectorTable) BenchMark ¶
func (s SelectorTable) BenchMark()
Click to show internal directories.
Click to hide internal directories.