Documentation ¶
Index ¶
- Constants
- type ClientConn
- type TunUDPManager
- type UDP
- func (b UDP) CalculateChecksum() uint16
- func (b UDP) Checksum() uint16
- func (b UDP) DestinationPort() uint16
- func (b UDP) Encode(fields *udpFields)
- func (b UDP) Length() uint16
- func (b UDP) Payload() []byte
- func (b UDP) SetChecksum(checksum uint16)
- func (b UDP) SetDestinationPort(port uint16)
- func (b UDP) SetSourcePort(port uint16)
- func (b UDP) SourcePort() uint16
Constants ¶
View Source
const (
ProtocolNumber int = 17
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConn ¶
func NewClientConn ¶
func NewClientConn(interceptAddr string, dev io.ReadWriter) (*ClientConn, error)
type TunUDPManager ¶
type TunUDPManager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(dev io.ReadWriter) *TunUDPManager
func (*TunUDPManager) CreateEvent ¶
func (*TunUDPManager) RegisterService ¶
func (manager *TunUDPManager) RegisterService(service *entities.Service, interceptIP net.IP)
func (*TunUDPManager) UnregisterService ¶
func (manager *TunUDPManager) UnregisterService(service string)
type UDP ¶
type UDP []byte
func (UDP) CalculateChecksum ¶
func (UDP) DestinationPort ¶
DestinationPort returns the "destination port" field of the udp header.
func (UDP) Encode ¶
func (b UDP) Encode(fields *udpFields)
Encode encodes all the fields of the udp header.
func (UDP) SetChecksum ¶
SetChecksum sets the checksum field of the tcp header.
func (UDP) SetDestinationPort ¶
SetDestinationPort sets the "destination port" field of the tcp header.
func (UDP) SetSourcePort ¶
SetSourcePort sets the "source port" field of the tcp header.
func (UDP) SourcePort ¶
SourcePort returns the "source port" field of the udp header.
Click to show internal directories.
Click to hide internal directories.