cmd

package
v0.2.18 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: AGPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UnableToConnectErr = fmt.Errorf("unable to connect to the proxy node")
View Source
var (
	Version = "unknown"
)

Functions

func ConfigHome added in v0.2.12

func ConfigHome() string

func Execute

func Execute() error

Execute executes the root command.

func GetDialer

func GetDialer(log *logrus.Logger) (d *dialer.Dialer, err error)

func GetDialerFromInput

func GetDialerFromInput(opt *dialer.GlobalOption, testNode bool, testURL string) (d *dialer.Dialer, err error)
func GetDialerFromLink(nodeLink string, opt *dialer.GlobalOption, testNode bool, testURL string) (d *dialer.Dialer, err error)

func GetDialerFromSubscription

func GetDialerFromSubscription(log *logrus.Logger, opt *dialer.GlobalOption, testNode bool, testURL string) (d *dialer.Dialer, err error)

func GetDialerFromSubscriptionLastNodeCache

func GetDialerFromSubscriptionLastNodeCache(opt *dialer.GlobalOption, testNode bool, testURL string) (d *dialer.Dialer)

func NewLogger added in v0.2.16

func NewLogger(verbose int) *logrus.Logger

func WriteConfig

func WriteConfig(settings map[string]interface{}, configPath string) error

Types

type ClashConfig

type ClashConfig struct {
	Proxy []yaml.Node `yaml:"proxies"`
}

type DialerWithLatency

type DialerWithLatency struct {
	Dialer  *dialer.Dialer
	Latency int
}

type SIP008

type SIP008 struct {
	Version        int            `json:"version"`
	Servers        []SIP008Server `json:"servers"`
	BytesUsed      int64          `json:"bytes_used"`
	BytesRemaining int64          `json:"bytes_remaining"`
}

type SIP008Server

type SIP008Server struct {
	Id         string `json:"id"`
	Remarks    string `json:"remarks"`
	Server     string `json:"server"`
	ServerPort int    `json:"server_port"`
	Password   string `json:"password"`
	Method     string `json:"method"`
	Plugin     string `json:"plugin"`
	PluginOpts string `json:"plugin_opts"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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