tcp

package
v2.11.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2017 License: GPL-2.0 Imports: 20 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 tokenprocessor.TokenProcessor, 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) 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

Jump to

Keyboard shortcuts

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