tcp

package
v6.8.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2017 License: GPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyPipe

func CopyPipe(a, b net.Conn) error

CopyPipe -- Copies in case splice is not possible

func NewProxy

func NewProxy(listen string, forward bool, encrypt bool, tp tokenaccessor.TokenAccessor, c collector.EventCollector, contextTracker cache.DataStore, mutualAuthorization bool) policyenforcer.Enforcer

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

func Pipe

func Pipe(in *net.TCPConn, out int) error

Pipe proxies data bi-directionally between in and out.

Types

type Proxy

type Proxy struct {
	// Listen Port to listen on
	Listen string
	// Backend address of the backend
	Backend string

	// Forward Should We forward connection
	Forward bool
	// Encrypt Is this connection encrypted
	Encrypt bool

	// List of local IP's
	IPList []string
	// contains filtered or unexported fields
}

Proxy maintains state for proxies connections from listen to backend.

func (*Proxy) CompleteEndPointAuthorization

func (p *Proxy) CompleteEndPointAuthorization(backendip string, backendport uint16, upConn net.Conn, downConn int, contextID string) error

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

func (*Proxy) Enforce

func (p *Proxy) Enforce(contextID string, puInfo *policy.PUInfo) error

Enforce implements policyenforcer.Enforcer interface

func (*Proxy) GetFilterQueue

func (p *Proxy) GetFilterQueue() *fqconfig.FilterQueue

GetFilterQueue is a stub for TCP proxy

func (*Proxy) GetPortSetInstance

func (p *Proxy) GetPortSetInstance() portset.PortSet

GetPortSetInstance returns nil for the proxy

func (*Proxy) Start

func (p *Proxy) Start() error

Start is a stub for TCP proxy

func (*Proxy) StartClientAuthStateMachine

func (p *Proxy) StartClientAuthStateMachine(backendip string, backendport uint16, upConn net.Conn, downConn int, contextID string) error

StartClientAuthStateMachine -- Starts the aporeto handshake for client application

func (*Proxy) StartListener

func (p *Proxy) StartListener(contextID string, reterr chan error, port string)

StartListener implements policyenforcer.Enforcer interface

func (*Proxy) StartServerAuthStateMachine

func (p *Proxy) StartServerAuthStateMachine(backendip string, backendport uint16, upConn io.ReadWriter, downConn int, contextID string) error

StartServerAuthStateMachine -- Start the aporeto handshake for a server application

func (*Proxy) Stop

func (p *Proxy) Stop() error

Stop stops and waits proxy to stop.

func (*Proxy) Unenforce

func (p *Proxy) Unenforce(contextID string) error

Unenforce implements policyenforcer.Enforcer interface

func (*Proxy) UpdateSecrets

func (p *Proxy) UpdateSecrets(secrets secrets.Secrets) error

UpdateSecrets updates the secrets of running enforcers managed by trireme. Remote enforcers will get the secret updates with the next policy push

Jump to

Keyboard shortcuts

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