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.
Click to show internal directories.
Click to hide internal directories.