services

package
v1.4.11 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandService

func CommandService(s *netceptor.Netceptor, service string, tlscfg *tls.Config, command string)

CommandService listens on the Receptor network and runs a local command.

func TCPProxyServiceInbound

func TCPProxyServiceInbound(s *netceptor.Netceptor, host string, port int, tlsServer *tls.Config,
	node string, rservice string, tlsClient *tls.Config,
) error

TCPProxyServiceInbound listens on a TCP port and forwards the connection over the Receptor network.

func TCPProxyServiceOutbound

func TCPProxyServiceOutbound(s *netceptor.Netceptor, service string, tlsServer *tls.Config,
	address string, tlsClient *tls.Config,
) error

TCPProxyServiceOutbound listens on the Receptor network and forwards the connection via TCP.

func UDPProxyServiceInbound

func UDPProxyServiceInbound(s *netceptor.Netceptor, host string, port int, node string, service string) error

UDPProxyServiceInbound listens on a UDP port and forwards packets to a remote Receptor service.

func UDPProxyServiceOutbound

func UDPProxyServiceOutbound(s *netceptor.Netceptor, service string, address string) error

UDPProxyServiceOutbound listens on the Receptor network and forwards packets via UDP.

func UnixProxyServiceInbound

func UnixProxyServiceInbound(s *netceptor.Netceptor, filename string, permissions os.FileMode,
	node string, rservice string, tlscfg *tls.Config,
) error

UnixProxyServiceInbound listens on a Unix socket and forwards connections over the Receptor network.

func UnixProxyServiceOutbound

func UnixProxyServiceOutbound(s *netceptor.Netceptor, service string, tlscfg *tls.Config, filename string) error

UnixProxyServiceOutbound listens on the Receptor network and forwards the connection via a Unix socket.

Types

type CommandSvcCfg added in v1.4.9

type CommandSvcCfg struct {
	Service string `required:"true" description:"Receptor service name to bind to"`
	Command string `required:"true" description:"Command to execute on a connection"`
	TLS     string `description:"Name of TLS server config"`
}

commandSvcCfg is the cmdline configuration object for a command service.

func (CommandSvcCfg) Run added in v1.4.9

func (cfg CommandSvcCfg) Run() error

Run runs the action.

type IPRouterCfg added in v1.4.9

type IPRouterCfg struct {
	NetworkName string `required:"true" description:"Name of this network and service."`
	Interface   string `description:"Name of the local tun interface"`
	LocalNet    string `required:"true" description:"Local /30 CIDR address"`
	Routes      string `description:"Comma separated list of CIDR subnets to advertise"`
}

ipRouterCfg is the cmdline configuration object for an IP router.

func (IPRouterCfg) Run added in v1.4.9

func (cfg IPRouterCfg) Run() error

Run runs the action.

type IPRouterService

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

IPRouterService is an IP router service.

func NewIPRouter

func NewIPRouter(nc *netceptor.Netceptor, networkName string, tunInterface string,
	localNet string, routes string,
) (*IPRouterService, error)

NewIPRouter creates a new IP router service.

type TCPProxyInboundCfg added in v1.4.9

type TCPProxyInboundCfg struct {
	Port          int    `required:"true" description:"Local TCP port to bind to"`
	BindAddr      string `description:"Address to bind TCP listener to" default:"0.0.0.0"`
	RemoteNode    string `required:"true" description:"Receptor node to connect to"`
	RemoteService string `required:"true" description:"Receptor service name to connect to"`
	TLSServer     string `description:"Name of TLS server config for the TCP listener"`
	TLSClient     string `description:"Name of TLS client config for the Receptor connection"`
}

tcpProxyInboundCfg is the cmdline configuration object for a TCP inbound proxy.

func (TCPProxyInboundCfg) Run added in v1.4.9

func (cfg TCPProxyInboundCfg) Run() error

Run runs the action.

type TCPProxyOutboundCfg added in v1.4.9

type TCPProxyOutboundCfg struct {
	Service   string `required:"true" description:"Receptor service name to bind to"`
	Address   string `required:"true" description:"Address for outbound TCP connection"`
	TLSServer string `description:"Name of TLS server config for the Receptor service"`
	TLSClient string `description:"Name of TLS client config for the TCP connection"`
}

tcpProxyOutboundCfg is the cmdline configuration object for a TCP outbound proxy.

func (TCPProxyOutboundCfg) Run added in v1.4.9

func (cfg TCPProxyOutboundCfg) Run() error

Run runs the action.

type UDPProxyInboundCfg added in v1.4.9

type UDPProxyInboundCfg struct {
	Port          int    `required:"true" description:"Local UDP port to bind to"`
	BindAddr      string `description:"Address to bind UDP listener to" default:"0.0.0.0"`
	RemoteNode    string `required:"true" description:"Receptor node to connect to"`
	RemoteService string `required:"true" description:"Receptor service name to connect to"`
}

udpProxyInboundCfg is the cmdline configuration object for a UDP inbound proxy.

func (UDPProxyInboundCfg) Run added in v1.4.9

func (cfg UDPProxyInboundCfg) Run() error

Run runs the action.

type UDPProxyOutboundCfg added in v1.4.9

type UDPProxyOutboundCfg struct {
	Service string `required:"true" description:"Receptor service name to bind to"`
	Address string `required:"true" description:"Address for outbound UDP connection"`
}

udpProxyOutboundCfg is the cmdline configuration object for a UDP outbound proxy.

func (UDPProxyOutboundCfg) Run added in v1.4.9

func (cfg UDPProxyOutboundCfg) Run() error

Run runs the action.

type UnixProxyInboundCfg added in v1.4.9

type UnixProxyInboundCfg struct {
	Filename      string `required:"true" description:"Socket filename, which will be overwritten"`
	Permissions   int    `description:"Socket file permissions" default:"0600"`
	RemoteNode    string `required:"true" description:"Receptor node to connect to"`
	RemoteService string `required:"true" description:"Receptor service name to connect to"`
	TLS           string `description:"Name of TLS client config for the Receptor connection"`
}

unixProxyInboundCfg is the cmdline configuration object for a Unix socket inbound proxy.

func (UnixProxyInboundCfg) Run added in v1.4.9

func (cfg UnixProxyInboundCfg) Run() error

Run runs the action.

type UnixProxyOutboundCfg added in v1.4.9

type UnixProxyOutboundCfg struct {
	Service  string `required:"true" description:"Receptor service name to bind to"`
	Filename string `required:"true" description:"Socket filename, which must already exist"`
	TLS      string `description:"Name of TLS server config for the Receptor connection"`
}

unixProxyOutboundCfg is the cmdline configuration object for a Unix socket outbound proxy.

func (UnixProxyOutboundCfg) Run added in v1.4.9

func (cfg UnixProxyOutboundCfg) Run() error

Run runs the action.

Jump to

Keyboard shortcuts

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