testing

package
v0.0.0-...-3d086f3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SSHKey1 = `` /* 227-byte string literal not displayed */

SSHKey1 generated with `ssh-keygen -b 256 -C test-only -t ecdsa -f test-key`

View Source
var SSHKey2 = `` /* 399-byte string literal not displayed */

SSHKey2 generated with `ssh-keygen -b 256 -C test-only -t ed25519 -f test-key`

View Source
var SSHPub1 = "" /* 170-byte string literal not displayed */
View Source
var SSHPub2 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA2TeJHVWtOwR8jJANeStlqO04jCYoF3P6EA33RVd3E5 test-only"

Functions

func CreateSSHServer

func CreateSSHServer(c *gc.C, privateKeys ...string) (string, chan struct{})

CreateSSHServer launches an SSH server that will use the described private key to allow SSH connections. Note that it explicitly doesn't actually support any Auth mechanisms, so nobody can complete connections, but it will do Key exchange to set up the encrypted conversation. We return the address where the SSH service is listening, and a channel callers must close when they want the service to stop.

func CreateTCPServer

func CreateTCPServer(c *gc.C, callback func(net.Conn)) (string, chan struct{})

CreateTCPServer launches a TCP server that just Accepts connections and triggers the callback function. The callback assumes responsibility for closing the connection. We return the address+port of the TCP server, and a channel that can be closed when you want the TCP server to stop.

Types

This section is empty.

Jump to

Keyboard shortcuts

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