Documentation ¶
Index ¶
- Constants
- Variables
- func CreateAESEncryptedConnection(rootConn net.Conn, asyncEncryptedConn unet.EncodeConn) (aesEncryptedConn unet.EncodeConn, e error)
- func CreateRSAEncryptedConnection(privateKey *rsa.PrivateKey, conn net.Conn) (econn *unet.GobEncoderReaderWriter, e error)
- func ExitOnError(e error, msgs ...string)
- func GetCurrentUserName() string
- func HandleUserAuthorization(conn net.EncodeConn, prompt Prompter) (e error)
- type Prompt
- type Prompter
Constants ¶
View Source
const ( ErrorCode = 1 SuccessCode = 0 )
Variables ¶
View Source
var ErrBadRequest = errors.New("Unexpected or invalid request")
View Source
var GenerateKeys bool
View Source
var Host string
Host ip address or host name of server
View Source
var Port int
Port port that ucp server is listening on defaults to 8978
View Source
var RemoteUser string
View Source
var ShowHelp bool
View Source
var UCPDirectory string
UCPDirectory path to keys and known_hosts file
Functions ¶
func CreateAESEncryptedConnection ¶
func CreateAESEncryptedConnection(rootConn net.Conn, asyncEncryptedConn unet.EncodeConn) (aesEncryptedConn unet.EncodeConn, e error)
CreateAESEncryptedConnection creates a connection that uses AES encryption. AES (Symmetric Key) encryption is much faster than RSA
func CreateRSAEncryptedConnection ¶
func CreateRSAEncryptedConnection(privateKey *rsa.PrivateKey, conn net.Conn) (econn *unet.GobEncoderReaderWriter, e error)
CreateRSAEncryptedConnection creates a network connection that will RSA encrypt bytes before sending them. Takes an RSA private key and a network connection as arguments.
func ExitOnError ¶
func GetCurrentUserName ¶
func GetCurrentUserName() string
func HandleUserAuthorization ¶
func HandleUserAuthorization(conn net.EncodeConn, prompt Prompter) (e error)
TODO: this needs a test
Types ¶
Click to show internal directories.
Click to hide internal directories.