gg_net_tunnel

package
v0.2.27 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	Host string `json:"host"`
	Port int    `json:"port"`
	User string `json:"user"`
}

func NewEndpoint

func NewEndpoint(s string) (*Endpoint, error)

NewEndpoint creates an Endpoint from a string that contains a user, host and port. Both User and Port are optional (depending on context). The host can be a domain name, IPv4 address or IPv6 address. If it's an IPv6, it must be enclosed in square brackets

func (*Endpoint) GoString

func (instance *Endpoint) GoString() string

func (*Endpoint) String

func (instance *Endpoint) String() string

type Tunnel

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

Tunnel is a type that represents a tunnel in a network. A tunnel is a virtual connection that enables secure communication between two endpoints over an untrusted network. This tunnel creates a NIO connection to the server and forward traffic In the direction of a local service or server

func NewTunnel

func NewTunnel(args ...interface{}) (instance *Tunnel)

func (*Tunnel) Close

func (instance *Tunnel) Close() (err error)

func (*Tunnel) Open

func (instance *Tunnel) Open() (err error)

type TunnelConfiguration

type TunnelConfiguration struct {
	MaxConnectionAttempts int       `json:"max-connection-attempts"`
	Server                *Endpoint `json:"server"`
	Tunnel                *Endpoint `json:"tunnel"` // tunnel door
}

func NewTunnelConfiguration

func NewTunnelConfiguration() (instance *TunnelConfiguration, err error)

func (*TunnelConfiguration) GoString

func (instance *TunnelConfiguration) GoString() string

func (*TunnelConfiguration) String

func (instance *TunnelConfiguration) String() string

type TunnelServer

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

func NewTunnelServer

func NewTunnelServer(args ...interface{}) (instance *TunnelServer, err error)

func (*TunnelServer) Addr

func (instance *TunnelServer) Addr() *net.TCPAddr

func (*TunnelServer) CountServices

func (instance *TunnelServer) CountServices() int

func (*TunnelServer) Join

func (instance *TunnelServer) Join()

func (*TunnelServer) NetIP

func (instance *TunnelServer) NetIP() net.IP

func (*TunnelServer) Port

func (instance *TunnelServer) Port() int

func (*TunnelServer) Services

func (instance *TunnelServer) Services() []*nio_server.NioConnectionDescriptor

func (*TunnelServer) Start

func (instance *TunnelServer) Start() (err error)

func (*TunnelServer) Stop

func (instance *TunnelServer) Stop() (err error)

func (*TunnelServer) String

func (instance *TunnelServer) String() string

Jump to

Keyboard shortcuts

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