nat

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IP6T_SO_ORIGINAL_DST = 80
	SO_ORIGINAL_DST      = 80
)

Variables

This section is empty.

Functions

func NewInboundConnSession

func NewInboundConnSession(conn net.Conn) (protocol.ConnSession, error)

func NewInboundPacketSession

func NewInboundPacketSession(config *conf.GlobalConfig) (protocol.PacketSession, error)

Types

type NATInboundConnSession

type NATInboundConnSession struct {
	protocol.ConnSession
	// contains filtered or unexported fields
}

func (*NATInboundConnSession) Close

func (i *NATInboundConnSession) Close() error

func (*NATInboundConnSession) GetRequest

func (i *NATInboundConnSession) GetRequest() *protocol.Request

func (*NATInboundConnSession) Read

func (i *NATInboundConnSession) Read(p []byte) (int, error)

func (*NATInboundConnSession) Write

func (i *NATInboundConnSession) Write(p []byte) (int, error)

type NATInboundPacketSession

type NATInboundPacketSession struct {
	protocol.PacketSession
	// contains filtered or unexported fields
}

func (*NATInboundPacketSession) Close

func (i *NATInboundPacketSession) Close() error

func (*NATInboundPacketSession) ReadPacket

func (i *NATInboundPacketSession) ReadPacket() (*protocol.Request, []byte, error)

func (*NATInboundPacketSession) WritePacket

func (i *NATInboundPacketSession) WritePacket(req *protocol.Request, packet []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL