Documentation
¶
Index ¶
- type Command
- type CommandExecutor
- type OnProxyChange
- type State
- func (s *State) ActiveNodeName() string
- func (s *State) ActiveProxy() string
- func (s *State) Clear()
- func (s *State) IsAutoMode() bool
- func (s *State) LoadSubscription(sub *clash.Subscription, subscribeURL string)
- func (s *State) Nodes() []clash.ProxyNode
- func (s *State) OriginalProxy() string
- func (s *State) SetAutoDial(clashURL string, dial proxyclient.Dial)
- func (s *State) Switch(nameOrIndex string) error
- func (s *State) TestNode(ctx context.Context, node *clash.ProxyNode) (time.Duration, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
func (*Command) SetCommandExecutor ¶
func (c *Command) SetCommandExecutor(fn CommandExecutor)
func (*Command) SetOnProxyChange ¶
func (c *Command) SetOnProxyChange(fn OnProxyChange)
type CommandExecutor ¶
CommandExecutor executes a named command with args. Matches CommandRegistry.ExecuteArgs.
type OnProxyChange ¶
type OnProxyChange func(newProxyURL string)
type State ¶
type State struct {
// contains filtered or unexported fields
}
func (*State) ActiveNodeName ¶
func (*State) ActiveProxy ¶
func (*State) IsAutoMode ¶
func (*State) LoadSubscription ¶
func (s *State) LoadSubscription(sub *clash.Subscription, subscribeURL string)
func (*State) OriginalProxy ¶
func (*State) SetAutoDial ¶
func (s *State) SetAutoDial(clashURL string, dial proxyclient.Dial)
Click to show internal directories.
Click to hide internal directories.