Documentation ¶
Index ¶
- Constants
- func ParsePort(addr net.Addr) (int, error)
- func WriteAddress(w io.Writer, request *Request) error
- type AddressType
- type Command
- type ConnSession
- type HasHash
- type HasRequest
- type NeedAuth
- type NeedConfig
- type NeedMeter
- type NeedRespond
- type PacketReadWriter
- type PacketReader
- type PacketSession
- type PacketWriter
- type Request
Constants ¶
View Source
const ( MaxUDPPacketSize = 1024 * 4 UDPTimeout = time.Second * 6 TCPTimeout = time.Second * 6 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddressType ¶
type AddressType byte
const ( IPv4 AddressType = 1 DomainName AddressType = 3 IPv6 AddressType = 4 )
type ConnSession ¶
type ConnSession interface { io.ReadWriteCloser HasRequest }
type HasRequest ¶
type HasRequest interface {
GetRequest() *Request
}
type NeedAuth ¶ added in v0.0.3
type NeedAuth interface {
SetAuth(auth stat.Authenticator)
}
type NeedConfig ¶
type NeedConfig interface {
SetConfig(config *conf.GlobalConfig)
}
type NeedMeter ¶ added in v0.0.3
type NeedMeter interface {
SetMeter(meter stat.TrafficMeter)
}
type NeedRespond ¶
type PacketReadWriter ¶
type PacketReadWriter interface { PacketReader PacketWriter }
type PacketReader ¶
type PacketSession ¶
type PacketSession interface { PacketReadWriter io.Closer }
type PacketWriter ¶
Click to show internal directories.
Click to hide internal directories.