networkCmd

package
v1.2.14 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HTTPServerCmd = &cobra.Command{
	Use:   "http-server",
	Short: "Start a simple HTTP/HTTPS file server with optional file uploads",
	Run: func(cmd *cobra.Command, args []string) {
		options := &anbuNetwork.HTTPServerOptions{
			ListenAddress: httpServerFlags.listenAddress,
			EnableUpload:  httpServerFlags.enableUpload,
			EnableTLS:     httpServerFlags.enableTLS,
		}
		server := &anbuNetwork.HTTPServer{
			Options: options,
		}
		err := server.Start()
		if err != nil {
			log.Fatal().Err(err).Msg("Failed to start HTTP server")
		}
		defer server.Stop()
	},
}
View Source
var IPInfoCmd = &cobra.Command{
	Use:     "ip-info",
	Aliases: []string{"ip"},
	Short:   "Display local network interface and public IP information",
	Run: func(cmd *cobra.Command, args []string) {
		ipv6, _ := cmd.Flags().GetBool("ipv6")
		anbuNetwork.GetLocalIPInfo(ipv6)
	},
}
View Source
var TunnelCmd = &cobra.Command{
	Use:     "tunnel",
	Aliases: []string{},
	Short:   "Create TCP or SSH tunnels between local and remote endpoints",
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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