sub

package
v0.100.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "frpc",
	Short: "frpc is the client of frp (https://github.com/hi-cheems/frp)",
	RunE: func(cmd *cobra.Command, args []string) error {
		return StartFunc(cfgFile, cfgDir, showVersion)
	},
}
View Source
var StartFunc = func(cfgFile, cfgDir string, showVersion bool) error {
	if showVersion {
		fmt.Println(version.Full())
		return nil
	}

	if cfgDir != "" {
		_ = runMultipleClients(cfgDir)
		return nil
	}

	err := runClient(cfgFile)
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
	return nil
}

Functions

func Execute

func Execute()

func NewAdminCommand added in v0.100.0

func NewAdminCommand(name, short string, handler func(*v1.ClientCommonConfig) error) *cobra.Command

func NewProxyCommand added in v0.100.0

func NewProxyCommand(name string, c v1.ProxyConfigurer, clientCfg *v1.ClientCommonConfig) *cobra.Command

func NewVisitorCommand added in v0.100.0

func NewVisitorCommand(name string, c v1.VisitorConfigurer, clientCfg *v1.ClientCommonConfig) *cobra.Command

func ReloadHandler added in v0.100.0

func ReloadHandler(clientCfg *v1.ClientCommonConfig) error

func StatusHandler added in v0.100.0

func StatusHandler(clientCfg *v1.ClientCommonConfig) error

func StopHandler added in v0.100.0

func StopHandler(clientCfg *v1.ClientCommonConfig) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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