cmd

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProxyCmd = &cobra.Command{
	Use:   "ws-tcp-proxy <address:port>",
	Short: "Simple websocket tcp proxy.",
	Long:  `Simple websocket tcp proxy.`,
	Run: func(cmd *cobra.Command, args []string) {
		err := performCommand(cmd, args)
		if err != nil {
			bail(err)
		}
	},
}

ProxyCmd is the main command for Cobra.

Functions

This section is empty.

Types

type Config

type Config struct {
	Cert           string `json:"cert"`
	DisplayVersion bool   `json:"-"`
	Key            string `json:"key"`
	Port           int    `json:"port,string"`
	TextMode       bool   `json:"textMode,string"`
	TCPTLS         bool   `json:"tcpTLS,string"`
	TCPTLSCert     string `json:"tcpTLSCert"`
	TCPTLSKey      string `json:"tcpTLSKey"`
	TCPTLSRootCA   string `json:"tcpTLSRootCA"`
	AutoCert       string `json:"autoCert"`
}

Config stores all the application configuration.

func (*Config) Load

func (c *Config) Load() error

Load reads the configuration from ~/.config/ws-tcp-proxy/config and loads it into the Config struct. The config is in UCL format.

Jump to

Keyboard shortcuts

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