tcp

package
v8.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2018 License: Apache-2.0 Imports: 26 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 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 specifies port to listen on.
	Listen string
	// Backend address of the backend
	Backend string

	// Forward specifies if we should forward this connection.
	Forward bool
	// Encrypt specifies if 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 NewProxy

func NewProxy(listen string, forward bool, encrypt bool, tp tokenaccessor.TokenAccessor, c collector.EventCollector, puFromContextID cache.DataStore, mutualAuthorization bool, secret secrets.Secrets) *Proxy

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

func (*Proxy) CompleteEndPointAuthorization

func (p *Proxy) CompleteEndPointAuthorization(backendip string, backendport uint16, upConn net.Conn, downConn int, contextID string) (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) Enforce

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

Enforce implements enforcer.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) Run

func (p *Proxy) Run(ctx context.Context) error

Run is a stub for TCP proxy

func (*Proxy) StartClientAuthStateMachine

func (p *Proxy) StartClientAuthStateMachine(backendip string, backendport uint16, upConn net.Conn, downConn int, contextID string) (bool, 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 enforcer.Enforcer interface

func (*Proxy) StartServerAuthStateMachine

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

StartServerAuthStateMachine -- Start the aporeto handshake for a server application

func (*Proxy) Unenforce

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

Unenforce implements enforcer.Enforcer interface

func (*Proxy) UpdateSecrets

func (p *Proxy) UpdateSecrets(secret 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