socat

package
v1.5.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveAll

func RemoveAll(namespace string) error

RemoveAll remove all port forwrards that were created in this namespace.

func RemovePortForward

func RemovePortForward(namespace string, host string, dest int) error

RemovePortForward removes a single port forward

func Resolve added in v1.5.0

func Resolve(address string) string

Resolve resolves an address of the form <ip>:<port> to a direct address to the endpoint IF - the ip address is a local address of this machine - port has a forwarding rule ELSE - return address unchanged

func ResolveURL added in v1.5.0

func ResolveURL(raw string) (string, error)

ResolveURL rewrites a url to a direct address to the end point. Return original url if no forwarding rule configured that matches the given address note, the url host part must be an ip, can't use host names

func SetPortForward

func SetPortForward(namespace string, ip string, host string, dest int) error

SetPortForward create a single port forward from host(port), to ip(addr) and dest(port) in this namespace The namespace is used to group port forward rules so they all can get terminated with one call later.

func ValidHost added in v1.2.2

func ValidHost(host string) bool

ValidHost checks if the host string is valid Valid hosts is (port, ip:port, or device:port)

Types

This section is empty.

Jump to

Keyboard shortcuts

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