session

package
v5.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 4 Imported by: 2

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