session

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Sess = &Session{}
)

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 *proto.Payload `json:"-"`
	PayloadOutTLS  chan *proto.Payload `json:"-"`
	PayloadOutDTLS chan *proto.Payload `json:"-"`

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

	ResetTLSReadDead  *atomic.Bool `json:"-"`
	ResetDTLSReadDead *atomic.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{} // Notifies all UIs that the ConnSession has closed.
	CSess       *ConnSession
}

func (*Session) NewConnSession

func (sess *Session) NewConnSession(header *http.Header) *ConnSession

Jump to

Keyboard shortcuts

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