cmd

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GenerateCmd = &cobra.Command{
	Use:   "generate",
	Short: "Generates and prints the WireGuard configuration",
	Long:  `This command generates and prints the WireGuard configuration based on your WARP identity. The output can be redirected to a file to create a WireGuard configuration file.`,
	Run:   generate,
}
View Source
var RunCmd = &cobra.Command{
	Use:   "run",
	Short: "Run the Cloudflare WARP proxy",
	Long: `Run the Cloudflare WARP proxy.
This command starts the proxy server and establishes a connection to the Cloudflare network.
You can configure the proxy to use Socks5 or HTTP, specify WARP endpoints, and enable features like WARP+ connections.`,
	Run: run,
}
View Source
var ScannerCmd = &cobra.Command{
	Use:   "scanner",
	Short: "Scan for the best Cloudflare WARP IP",
	Long: `Scans for the best Cloudflare WARP IP addresses by testing a list of known CIDRs.
It measures the Round-Trip Time (RTT) and displays a list of the fastest available endpoints.
This is useful for finding optimal endpoints to use with the 'run' command for better performance.`,
	Run: runScanner,
}
View Source
var StatusCmd = &cobra.Command{
	Use:   "status",
	Short: statusShortMsg,
	Long:  FormatMessage(statusShortMsg, ``),
	Run: func(cmd *cobra.Command, args []string) {
		if err := status(); err != nil {
			log.Fatal(err)
		}
	},
}
View Source
var UpdateCmd = &cobra.Command{
	Use:   "update",
	Short: updateShortMsg,
	Long:  FormatMessage(updateShortMsg, `Updates device name and/or license key.`),
	Run: func(cmd *cobra.Command, args []string) {
		if err := runUpdate(); err != nil {
			fmt.Println(err)
		}
	},
}

Functions

func Execute

func Execute()

func F32ToHumanReadable

func F32ToHumanReadable(number float32) string

func FormatMessage

func FormatMessage(shortMessage string, longMessage string) string

func PrintDeviceData

func PrintDeviceData(thisDevice *model.Identity, boundDevice *model.IdentityDevice)

Types

This section is empty.

Jump to

Keyboard shortcuts

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