session

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnSession

type ConnSession struct {
	Sess *Session `json:"-"`

	ServerAddress string
	LocalAddress  string
	Hostname      string
	TunName       string
	VPNAddress    string // The IPv4 address of the client
	VPNMask       string // IPv4 netmask
	DNS           []string
	MTU           int
	SplitInclude  []string
	SplitExclude  []string

	DynamicSplitTunneling       bool
	DynamicSplitIncludeDomains  []string
	DynamicSplitIncludeResolved sync.Map // https://github.com/golang/go/issues/31136
	DynamicSplitExcludeDomains  []string
	DynamicSplitExcludeResolved sync.Map

	TLSCipherSuite    string
	TLSDpdTime        int // https://datatracker.ietf.org/doc/html/rfc3706
	TLSKeepaliveTime  int
	DTLSPort          string
	DTLSDpdTime       int
	DTLSKeepaliveTime int
	DTLSId            string `json:"-"` // used by the server to associate the DTLS channel with the CSTP channel
	DTLSCipherSuite   string
	Stat              *stat

	CloseChan      chan struct{}          `json:"-"`
	PayloadIn      chan *protocol.Payload `json:"-"`
	PayloadOutTLS  chan *protocol.Payload `json:"-"`
	PayloadOutDTLS chan *protocol.Payload `json:"-"`

	DtlsConnected *uatomic.Bool
	DtlsSetupChan chan struct{} `json:"-"`
	DSess         *DtlsSession  `json:"-"`

	ResetTLSReadDead  *uatomic.Bool `json:"-"`
	ResetDTLSReadDead *uatomic.Bool `json:"-"`
	// contains filtered or unexported fields
}

ConnSession used for both TLS and DTLS

func (*ConnSession) Close

func (cSess *ConnSession) Close()

func (*ConnSession) DPDTimer

func (cSess *ConnSession) DPDTimer()

func (*ConnSession) ReadDeadTimer

func (cSess *ConnSession) ReadDeadTimer()

type DtlsSession

type DtlsSession struct {
	CloseChan chan struct{}
	// contains filtered or unexported fields
}

func (*DtlsSession) Close

func (dSess *DtlsSession) Close()

type Session

type Session struct {
	SessionToken    string
	PreMasterSecret []byte

	ActiveClose bool

	CloseChan chan struct{}
	CSess     *ConnSession
	// contains filtered or unexported fields
}

func (*Session) NewConnSession

func (sess *Session) NewConnSession(header *http.Header, localAddress string, noDTLS bool) *ConnSession

Jump to

Keyboard shortcuts

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