Back to godoc.org

Package tcp

v10.286.1+incompatible
Latest Go to latest

The latest major version is .

Published: Jul 8, 2020 | License: Apache-2.0 | Module: go.aporeto.io/trireme-lib

Index

type Proxy

type Proxy struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Proxy maintains state for proxies connections from listen to backend.

func NewTCPProxy

func NewTCPProxy(
	tp tokenaccessor.TokenAccessor,
	c collector.EventCollector,
	puContext string,
	registry *serviceregistry.Registry,
	certificate *tls.Certificate,
	caPool *x509.CertPool,
	s secrets.Secrets,
) *Proxy

NewTCPProxy creates a new instance of proxy reate a new instance of Proxy

func (*Proxy) CheckExternalNetwork

func (p *Proxy) CheckExternalNetwork(puContext *pucontext.PUContext, IP net.IP, Port int, flowproperties *proxyFlowProperties, network bool) (bool, error)

CheckExternalNetwork checks if external network access is allowed

func (*Proxy) CompleteEndPointAuthorization

func (p *Proxy) CompleteEndPointAuthorization(downIP net.IP, downPort int, upConn, downConn net.Conn) (bool, error)

CompleteEndPointAuthorization -- Aporeto Handshake on top of a completed connection We will define states here equivalent to SYN_SENT AND SYN_RECEIVED

func (*Proxy) RunNetworkServer

func (p *Proxy) RunNetworkServer(ctx context.Context, listener net.Listener, encrypted bool) error

RunNetworkServer implements enforcer.Enforcer interface

func (*Proxy) ShutDown

func (p *Proxy) ShutDown() error

ShutDown shuts down the server.

func (*Proxy) StartClientAuthStateMachine

func (p *Proxy) StartClientAuthStateMachine(downIP net.IP, downPort int, downConn net.Conn) (bool, error)

StartClientAuthStateMachine -- Starts the aporeto handshake for client application

func (*Proxy) StartServerAuthStateMachine

func (p *Proxy) StartServerAuthStateMachine(ip net.IP, backendport int, upConn net.Conn) (bool, error)

StartServerAuthStateMachine -- Start the aporeto handshake for a server application

func (*Proxy) UpdateSecrets

func (p *Proxy) UpdateSecrets(cert *tls.Certificate, caPool *x509.CertPool, s secrets.Secrets, certPEM, keyPEM string)

UpdateSecrets updates the secrets of the connections.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier