lib

package
v0.0.0-...-9d62925 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllListeners = &MListeners{mutex: sync.RWMutex{}, list: map[string]*Listener{}}

AllListeners is a global variable that holds all the listeners

Functions

func ParseSocket

func ParseSocket(fname string, data interface{}, ws *websocket.Conn, userID string, username string)

ParseSocket takes in data from the websocket and does what it needs to with it

func ReInitListener

func ReInitListener(l Listener)

ReInitListener rebuilds the live listeners from the database

Types

type Listener

type Listener struct {
	LType        string      //Type of listener
	Name         string      //Listener name
	Host         string      //IP or FQDN of the server
	Port         string      //Port to listen on
	ListChan     chan bool   //Channel used to kill off the listeners
	Key          string      //Listener UUID4 name
	PrivKey      []byte      //RSA private key
	PubKey       []byte      //RSA public key
	Advanced     interface{} //Advanced listener options held as JSON here
	AgentOptions listeners.AgentOptions
}

Listener struct holds data on all listeners

func StartNewListener

func StartNewListener(newListener listeners.ListOptions, userID string, editing bool, gooses []string, obfuscation bool, username string) (bool, *Listener)

StartNewListener will start up a new listener of the type and options that are expected

type MListeners

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

MListeners is the struct for a list of all listeners

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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