ttunnel

package module
v0.0.0-...-76deaf6 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2020 License: MIT Imports: 19 Imported by: 0

README

ttunnel

TLS tunneling software written in Golang.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddClient

func AddClient(
	name, hostAddr, connectAddr string, localPort int32) (err error)

AddClient creates the named client tunnel configuration.

func InitServer

func InitServer(host string, rsaBits int) error

InitializeServer creates the directories and files necessary to operate the server, including the key and certificate files.

func RunClient

func RunClient() error

func RunServer

func RunServer(listenAddr string) (err error)

Types

type ClientConfig

type ClientConfig struct {
	ConnectAddr string // Standard format: <address>:<port>
	Secret      string // Shared secret key.
}

A ClientConfig represents the configuration file for a tunnel client, stored on the server.

func (*ClientConfig) Load

func (cc *ClientConfig) Load(path string) error

Load loads client configuration from the given file.

func (ClientConfig) Save

func (cc ClientConfig) Save(path string) error

Save stores the client configuration into the given file.

type TunnelConfig

type TunnelConfig struct {
	Host   string // The host address: <address>:<port>
	Port   int32  // The local port to listen on.
	Pwd    string // The shared secret.
	CaCert []byte // The CA certificate.
}

A TunnelConfig represents the configuration of a tunnel from the client's perspective.

func (*TunnelConfig) Load

func (tc *TunnelConfig) Load(path string) error

Load loads the tunnel configuration from the given file.

func (TunnelConfig) Save

func (tc TunnelConfig) Save(path string) error

Save stores the tunnel configuration into the given file.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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