proxyproxy

package module
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: MIT Imports: 10 Imported by: 1

README

proxyproxy

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventText added in v0.0.9

func EventText(t ProxyEventType) string

EventText returns text for event type

Types

type EventSeverity added in v0.0.11

type EventSeverity int

EventSeverity defines an event's severity

const (
	TraceEvent EventSeverity = iota
	DebugEvent
	InfoEvent
	WarnEvent
	ErrorEvent
	FatalEvent
)

Defined severity levels

type NtlmAuhtHandler added in v0.0.9

type NtlmAuhtHandler interface {
	GetContext() (SecurityContext, error)
	Close() error
}

NtlmAuhtHandler - Interface for implementations which handle NTLM authentication

type ProxyCommunication

type ProxyCommunication struct {
	// contains filtered or unexported fields
}

ProxyCommunication contains all data for a proxy communication

func NewProxyCommunication

func NewProxyCommunication(clientConn net.Conn, proxyConn net.Conn, authHandler NtlmAuhtHandler, eventListener ProxyEventListener) (*ProxyCommunication, error)

NewProxyCommunication creates a new ProxyCommunication

func (*ProxyCommunication) GetClientAddr added in v0.0.9

func (pc *ProxyCommunication) GetClientAddr() net.Addr

GetClientAddr returns the address of the original client

func (*ProxyCommunication) GetCurrentRequest added in v0.0.10

func (pc *ProxyCommunication) GetCurrentRequest() *http.Request

GetCurrentRequest return currently processed request

func (*ProxyCommunication) GetID added in v0.0.9

func (pc *ProxyCommunication) GetID() int

GetID returns the communication's id

func (*ProxyCommunication) GetProxyServerAddr added in v0.0.9

func (pc *ProxyCommunication) GetProxyServerAddr() net.Addr

GetProxyServerAddr returns the address of the original proxy server

func (*ProxyCommunication) HandleConnection added in v0.0.9

func (pc *ProxyCommunication) HandleConnection() error

HandleConnection handels Connection to proxy server

type ProxyEvent added in v0.0.11

type ProxyEvent struct {
	EventType     ProxyEventType
	ID            int
	ClientHost    net.Addr
	ProxyHost     net.Addr
	Method        string
	RequestURI    string
	Communication *ProxyCommunication
}

ProxyEvent contains data for an event emittet by proxyproxy

type ProxyEventListener added in v0.0.9

type ProxyEventListener interface {
	OnProxyEvent(event *ProxyEvent)
}

A ProxyEventListener will be notified in the case of an event

type ProxyEventType added in v0.0.9

type ProxyEventType int

ProxyEventType ist used to represent the type of an event

const (
	EventCreatingConnection ProxyEventType = iota
	EventProcessingRequest
	EventNtlmAuthRequestDetected
	EventRecievedAuthToken
	EventSendingAuthToken
	EventSendingRequest
	EventPeekedResponse
	EventRecievedResponse
	EventConnectionEstablished
	EventConnectionClosed
)

Defined event types

type SecurityContext added in v0.0.9

type SecurityContext interface {
	GetNegotiate() []byte
	GetAuthenticateFromChallenge(challange []byte) ([]byte, error)
	Close() error
}

SecurityContext - Interface for accessing security context for authentication1

Jump to

Keyboard shortcuts

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