cmd

package
v0.0.0-...-80348db Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package cmd is the entry point of the tool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main()

Main is the entry point for the command-line tool.

Types

type Options

type Options struct {
	// ServerMode controls whether the tool works in the server mode.
	// By default, the tool will work in the client mode.
	ServerMode bool `` /* 159-byte string literal not displayed */

	// ListenAddr is the address the tool will be listening to. If it's in the
	// pipe mode, it will listen to tcp://, if it's in the client mode, it
	// will listen to udp://.
	ListenAddr string `` /* 140-byte string literal not displayed */

	// DestinationAddr is the address the tool will connect to. Depending on the
	// mode (pipe or client) this address has different semantics. In the
	// client mode this is the address of the udptlspipe pipe. In the pipe
	// mode this is the address where the received traffic will be passed.
	DestinationAddr string `` /* 145-byte string literal not displayed */

	// Password is used to detect if the client is actually allowed to use
	// udptlspipe. If it's not allowed, the server returns a stub web page.
	Password string `` /* 143-byte string literal not displayed */

	// ProxyURL is the proxy address that should be used when connecting to the
	// destination address.
	ProxyURL string `` /* 182-byte string literal not displayed */

	// VerifyCertificate enables server certificate verification in client mode.
	// If enabled, the client will verify the server certificate using the
	// system root certs store.
	VerifyCertificate bool `` /* 149-byte string literal not displayed */

	// TLSServerName configures the server name to send in TLS ClientHello when
	// operating in client mode and the server name that will be used when
	// generating a stub certificate. If not set, the default domain name will
	// be used for these purposes.
	TLSServerName string `` /* 290-byte string literal not displayed */

	// TLSCertPath is a path to the TLS certificate file. Allows to use a custom
	// certificate in server mode. If not set, the server will generate a
	// self-signed stub certificate.
	TLSCertPath string `` /* 251-byte string literal not displayed */

	// TLSCertKey is a path to the file with the private key to the TLS
	// certificate specified by TLSCertPath.
	TLSCertKey string `` /* 147-byte string literal not displayed */

	// ProbeReverseProxyURL is the URL that will be used by the reverse HTTP
	// proxy to respond to unauthorized or proxy requests. If not specified,
	// it will respond with a stub page 403 Forbidden.
	ProbeReverseProxyURL string `` /* 156-byte string literal not displayed */

	// Verbose defines whether we should write the DEBUG-level log or not.
	Verbose bool `yaml:"verbose" short:"v" long:"verbose" description:"Verbose output (optional)." optional:"yes" optional-value:"true"`
}

Options represents command-line arguments.

func (*Options) String

func (o *Options) String() (str string)

String implements the fmt.Stringer interface for *Options.

Jump to

Keyboard shortcuts

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