Documentation ¶
Index ¶
Constants ¶
View Source
const ( AtypIPv4 = 1 AtypDomainName = 3 AtypIPv6 = 4 TCP NetWork = iota UDP HTTP Type = 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 ¶
Types ¶
type AdapterType ¶
type AdapterType int
AdapterType is enum of adapter type
const ( Direct AdapterType = iota Fallback Reject Selector Shadowsocks ShadowsocksR Snell Socks5 Http URLTest Vmess LoadBalance )
Adapter Type
func (AdapterType) String ¶
func (at AdapterType) String() string
type Conn ¶
type Conn interface { net.Conn Connection }
type Connection ¶
type Connection interface { Chains() Chain AppendToChains(adapter ProxyAdapter) }
type DelayHistory ¶
type Metadata ¶
type Metadata struct { NetWork NetWork Type Type SrcIP *net.IP DstIP *net.IP SrcPort string DstPort string AddrType int Host string }
Metadata is used to store connection address
func (*Metadata) RemoteAddress ¶
type PacketConn ¶
type PacketConn interface { net.PacketConn Connection }
type ProxyAdapter ¶
type RuleType ¶
type RuleType int
type ServerAdapter ¶
Click to show internal directories.
Click to hide internal directories.