Documentation
¶
Index ¶
Constants ¶
View Source
const ( AtypIPv4 = 1 AtypDomainName = 3 AtypIPv6 = 4 TCP NetWork = iota UDP HTTP SourceType = iota SOCKS REDIR )
Socks addr type
View Source
const Name = "clash"
Variables ¶
View Source
var ( Version = "unknown version" BuildTime = "unknown time" )
View Source
var Path *path
Path is used to get the configuration path
Functions ¶
func SetHomeDir ¶ added in v0.13.0
func SetHomeDir(root string)
SetHomeDir is used to set the configuration path
Types ¶
type AdapterType ¶ added in v0.5.0
type AdapterType int
AdapterType is enum of adapter type
const ( Direct AdapterType = iota Fallback Reject Selector Shadowsocks Socks5 Http URLTest Vmess LoadBalance )
Adapter Type
func (AdapterType) String ¶ added in v0.5.0
func (at AdapterType) String() string
type DelayHistory ¶ added in v0.13.0
type Metadata ¶ added in v0.13.0
type Metadata struct { NetWork NetWork Source SourceType SourceIP *net.IP AddrType int Host string IP *net.IP Port string }
Metadata is used to store connection address
type Proxy ¶
type Proxy interface { ProxyAdapter Alive() bool DelayHistory() []DelayHistory LastDelay() uint16 URLTest(url string) (uint16, error) }
type ProxyAdapter ¶
type ServerAdapter ¶
type ServerAdapter interface { Metadata() *Metadata Close() }
type SourceType ¶ added in v0.6.0
type SourceType int
type Traffic ¶ added in v0.4.0
type Traffic struct {
// contains filtered or unexported fields
}
func NewTraffic ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.