clashcli

package
v0.0.0-...-a7b6e9a Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CmdGetConfigs      = "GetConfigs"
	CmdGetProxies      = "GetProxies"
	CmdGetProxiesNamed = "GetProxiesNamed"
	CmdSelectProxy     = "SelectProxy"
	CmdGetProxyDelay   = "GetProxyDelay"
)

Variables

View Source
var (
	Commands = []string{
		CmdGetConfigs,
		CmdGetProxies,
		CmdGetProxiesNamed,
		CmdSelectProxy,
		CmdGetProxyDelay,
	}

	Host       = flag.String("host", "http://localhost:9090", "clash host address")
	Command    = flag.String("command", "", fmt.Sprintf("clash command: %v", Commands))
	ProxyGroup = flag.String("proxy-group", "Proxy", "proxy group")
	Proxy      = flag.String("proxy-name", "", "proxy name")
)

Functions

func GetConfigs

func GetConfigs(rail miso.Rail, host string) (string, error)

func GetDelayAll

func GetDelayAll(rail miso.Rail, host string, name string)

func GetProxies

func GetProxies(rail miso.Rail, host string) (string, error)

func GetProxiesNamed

func GetProxiesNamed(rail miso.Rail, host string, name string) (string, error)

func GetProxyDelay

func GetProxyDelay(rail miso.Rail, host string, name string) (string, error)

func Run

func Run()

func SelectProxy

func SelectProxy(rail miso.Rail, host string, proxyGroup string, name string) (string, error)

Types

type ProxiesNamed

type ProxiesNamed struct {
	All  []string
	Name string
	Now  string
}

Jump to

Keyboard shortcuts

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