config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLocalPort       uint16 = 8888
	DefaultDestinationPort uint16 = 443
)

Variables

This section is empty.

Functions

func SetDefaults

func SetDefaults(proxies []ProxyConfig)

Sets the default values, if not provided, for the proxy configuration.

Types

type Config

type Config struct {
	Proxies []ProxyConfig `mapstructure:"proxies"`
}

type ProxyConfig

type ProxyConfig struct {
	Hostname        string `mapstructure:"hostname"`
	DestinationPort uint16 `mapstructure:"destinationPort"`
	LocalPort       uint16 `mapstructure:"localPort"`
	SkipTLS         bool   `mapstructure:"skipTLS"`
}

func ParseEndpointString

func ParseEndpointString(endpoint string) (*ProxyConfig, error)

Parses a string representation of a proxy endpoint into a ProxyConfig struct. The format is [LOCAL_PORT:]HOSTNAME[:DEST_PORT].

func (*ProxyConfig) GetAddress

func (c *ProxyConfig) GetAddress() string

Returns the full address of the target application.

Jump to

Keyboard shortcuts

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