Documentation
¶
Index ¶
- type CaptureResult
- type Command
- type CommandExecutor
- type Flow
- type FlowStore
- type MitmCommand
- type OnProxyChange
- type QueryOpts
- 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 CaptureResult ¶
type CaptureResult struct {
Command any `json:"command,omitempty"`
Flows []*mitmproxy.FlowRecord `json:"flows"`
}
CaptureResult is returned as tool-result details. FlowRecord is the canonical immutable traffic snapshot from utils/mitmproxy; callers should persist it directly instead of translating it through another flow DTO.
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 ¶
type FlowStore ¶
type FlowStore struct {
// contains filtered or unexported fields
}
func NewFlowStore ¶
type MitmCommand ¶
type MitmCommand struct {
// contains filtered or unexported fields
}
func NewMitmCommand ¶
func NewMitmCommand(reg *commands.CommandRegistry) *MitmCommand
func (*MitmCommand) Name ¶
func (c *MitmCommand) Name() string
func (*MitmCommand) SetCommandExecutor ¶
func (c *MitmCommand) SetCommandExecutor(fn CommandExecutor)
func (*MitmCommand) Usage ¶
func (c *MitmCommand) Usage() string
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.