nodes

package
v0.0.0-...-620c023 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Listeners []Listener

Listeners is our listener array

View Source
var Nodes []Node

Nodes is our node array

Functions

func CloseListener

func CloseListener(ID string)

CloseListener closes the listener provided by ID, and cleans array of listeners

func CloseNode

func CloseNode(ID string)

CloseNode closes given node

func GenCerts

func GenCerts(ID, addr string) (keyname, certname string)

GenCerts is os aware and will either use wsl or native openssl to generate self signed certs output to certs dir.

func GenUID

func GenUID() (uid string)

GenUID creates pseudorandom 10 char ids

func InteractEncNode

func InteractEncNode(ID string)

InteractEncNode gets tls encrypted node by id for interaction

func InteractNode

func InteractNode(ID string)

InteractNode provides management for remote sessions

func SelectNode

func SelectNode(ID string)

SelectNode allows node selection by id with differentiation from console without specifying node type

func SetupTCPEncNode

func SetupTCPEncNode(opts NodeOpts)

SetupTCPEncNode takes options and sets up tls listener

func SetupTCPNode

func SetupTCPNode(opts NodeOpts)

SetupTCPNode initializes a listener and sends connections for handling

func TCPEncNode

func TCPEncNode(tcpconn net.Conn, opts NodeOpts)

TCPEncNode manages tls connections and adds to array

func TCPNode

func TCPNode(tcpconn net.Conn, opts NodeOpts)

TCPNode assigns ID to sessions, appends them to session list

Types

type Listener

type Listener struct {
	ID, ListenerType string
	Listener         net.Listener
}

Listener holds our listener info

func GetListener

func GetListener(ID string) Listener

type Node

type Node struct {
	Conn     net.Conn
	NodeOpts NodeOpts
}

Node holds a node object

type NodeOpts

type NodeOpts struct {
	NodeType, Addr, Port, ID string
}

NodeOpts contains options for nodes

Jump to

Keyboard shortcuts

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