session

package
v5.55.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 4 Imported by: 3 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsRoutingContext

func AsRoutingContext(ctx context.Context) routing.Context

AsRoutingContext creates a context from context.context with session info.

Types

type Context

type Context struct {
	Inbound  *session.Inbound
	Outbound *session.Outbound
	Content  *session.Content
}

Context is an implementation of routing.Context, which is a wrapper of context.context with session info.

func (*Context) GetAttributes

func (ctx *Context) GetAttributes() map[string]string

GetAttributes implements routing.Context.

func (*Context) GetInboundTag

func (ctx *Context) GetInboundTag() string

GetInboundTag implements routing.Context.

func (*Context) GetNetwork

func (ctx *Context) GetNetwork() net.Network

GetNetwork implements routing.Context.

func (*Context) GetProtocol

func (ctx *Context) GetProtocol() string

GetProtocol implements routing.Context.

func (*Context) GetSkipDNSResolve

func (ctx *Context) GetSkipDNSResolve() bool

GetSkipDNSResolve implements routing.Context.

func (*Context) GetSourceIPs

func (ctx *Context) GetSourceIPs() []net.IP

GetSourceIPs implements routing.Context.

func (*Context) GetSourcePort

func (ctx *Context) GetSourcePort() net.Port

GetSourcePort implements routing.Context.

func (*Context) GetTargetDomain

func (ctx *Context) GetTargetDomain() string

GetTargetDomain implements routing.Context.

func (*Context) GetTargetIPs

func (ctx *Context) GetTargetIPs() []net.IP

GetTargetIPs implements routing.Context.

func (*Context) GetTargetPort

func (ctx *Context) GetTargetPort() net.Port

GetTargetPort implements routing.Context.

func (*Context) GetUser

func (ctx *Context) GetUser() string

GetUser implements routing.Context.

Jump to

Keyboard shortcuts

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