intercept

package
v0.19.22 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInterceptAddress

func NewInterceptAddress(service *entities.Service, protocol string, resolver dns.Resolver) (*interceptAddress, error)

func SetDnsInterceptIpRange added in v0.16.45

func SetDnsInterceptIpRange(cidr string) error

Types

type InterceptedService

type InterceptedService struct {
	Name string
	Addr interceptAddress
	Data interface{} // interceptor-specific data attached to this intercept. intent is to provide context needed in Interceptor.StopIntercepting
}

type Interceptor

type Interceptor interface {
	Start(provider tunnel.FabricProvider)
	Stop()
	Intercept(service *entities.Service, resolver dns.Resolver) error
	StopIntercepting(serviceName string, removeRoute bool) error
}

type LUT

type LUT map[interceptAddress]InterceptedService

func NewLUT

func NewLUT() LUT

func (LUT) GetByAddress

func (m LUT) GetByAddress(addr net.Addr) (*InterceptedService, error)

Return the service that is being intercepted at the given address, if any.

func (LUT) GetByName

func (m LUT) GetByName(serviceName string) []InterceptedService

func (LUT) Put

func (m LUT) Put(addr interceptAddress, serviceName string, data interface{}) error

func (LUT) Remove

func (m LUT) Remove(interceptAddr interceptAddress)

type Protocol

type Protocol int
const (
	TCP Protocol = 2
	UDP Protocol = 17
)

type ServiceListener added in v0.17.54

type ServiceListener struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewServiceListener added in v0.17.54

func NewServiceListener(interceptor Interceptor, resolver dns.Resolver) *ServiceListener

func (*ServiceListener) HandleProviderReady added in v0.19.10

func (self *ServiceListener) HandleProviderReady(provider tunnel.FabricProvider)

func (*ServiceListener) HandleServicesChange added in v0.17.54

func (self *ServiceListener) HandleServicesChange(eventType ziti.ServiceEventType, service *edge.Service)

func (*ServiceListener) WaitForShutdown added in v0.17.54

func (self *ServiceListener) WaitForShutdown()

Directories

Path Synopsis
ip
tcp
udp

Jump to

Keyboard shortcuts

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