proxy

package
v0.9.1-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

README

Proxy Package Documentation

This package includes modules that the hooks package utilizes to redirect the outgoing calls of the user API. This redirection is done with the aim to record or stub the outputs of dependency calls.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Emoji = "\U0001F430" + " Keploy:"

Functions

This section is empty.

Types

type Conn

type Conn struct {
	net.Conn
	// contains filtered or unexported fields
}

func (*Conn) Read

func (c *Conn) Read(b []byte) (n int, err error)

type CustomConn

type CustomConn struct {
	net.Conn
	// contains filtered or unexported fields
}

func (*CustomConn) Read

func (c *CustomConn) Read(p []byte) (int, error)

type Option

type Option struct {
	Port uint32
}

Option provides a means to initiate the proxy based on user input.

type ProxySet

type ProxySet struct {
	IP4  uint32
	IP6  [4]uint32
	Port uint32

	FilterPid        bool
	Listener         net.Listener
	DnsServer        *dns.Server
	DnsServerTimeout time.Duration
	// contains filtered or unexported fields
}

func BootProxies

func BootProxies(logger *zap.Logger, opt Option, appCmd, appContainer string) *ProxySet

BootProxies starts proxy servers on the idle local port, Default:16789

func (*ProxySet) ServeDNS

func (ps *ProxySet) ServeDNS(w dns.ResponseWriter, r *dns.Msg)

func (*ProxySet) SetHook

func (ps *ProxySet) SetHook(hook *hooks.Hook)

func (*ProxySet) StopProxyServer

func (ps *ProxySet) StopProxyServer()

Directories

Path Synopsis
integrations

Jump to

Keyboard shortcuts

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