Documentation
¶
Overview ¶
Package udprxlib is the driver for udprx
Package udprxlib is the driver for udprx ¶
Package udprxlib is the driver for udprx
Index ¶
- Variables
- func ConfigureRootCAs(caCertPathFlag *string) *x509.CertPool
- func CreateUDPSocket() error
- func EnableCPUProfiling(numPackets int, profileFilePath *string)
- func EnableNetProfiling(numPackets int)
- func ParseIps(srcipstr string, destipstr string) (net.IP, net.IP, error)
- func SendUDP(srcipstr string, destipstr string, srcprt uint, destprt uint, data []byte, ...) error
- func StopThreads()
- func TCPListener(listenAddrFlag *string, serverConf *tls.Config, done chan error)
- func UDPListener(listenAddrFlag *string, clientConf *tls.Config, done chan error)
- type ConfFile
- type Iphdr
- type Udphdr
Constants ¶
This section is empty.
Variables ¶
var ConnTimeoutVal float64 = 10
ConnTimeoutVal is a variable controlling how long to wait (in seconds) before a connection is considered by us to be 'timed out'
var ForwardMap map[string]int
ForwardMap should be set to not nil if debug is on
var RemoteTLSPort = ":55554"
RemoteTLSPort is the port of the remote TLS server (also the port of the local TLS server)
var TCPSocketListener net.Listener
TCPSocketListener is the tls socket listener
var UDPSocketListener *net.UDPConn
UDPSocketListener is the udp socket listener
Functions ¶
func ConfigureRootCAs ¶
ConfigureRootCAs creats a new systemcertpool and adds a cert from a pem encoded cert file to it
func CreateUDPSocket ¶
func CreateUDPSocket() error
CreateUDPSocket creates a UDP socket and returns the filedescriptor (int) or an error
func EnableCPUProfiling ¶
EnableCPUProfiling turns on cpu profiling
func EnableNetProfiling ¶
func EnableNetProfiling(numPackets int)
EnableNetProfiling turns on network profiling features
func SendUDP ¶
func SendUDP(srcipstr string, destipstr string, srcprt uint, destprt uint, data []byte, counter int) error
SendUDP takes in the associated data and puts a UDP packet on the wire
func StopThreads ¶
func StopThreads()
StopThreads stops the TCP and UDP listeners and closes all connections
func TCPListener ¶
TCPListener is the tcp socket loop for udprx inbound connections
Types ¶
type ConfFile ¶
type ConfFile struct { ListenAddr string `json:"listenAddr"` KeyPath string `json:"keyPath"` CertPath string `json:"certPath"` CaCertPath string `json:"caCertPath"` }
ConfFile represents the config file struct
func ParseConfig ¶
ParseConfig parses a ConfFile into it's struct