Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OnboardingAPI ¶ added in v0.9.4
type OnboardingAPI interface {
OnboardingStatus(context.Context) (onboarding.Snapshot, error)
UpdateOnboarding(context.Context, runtimeapi.Operation, onboarding.Update) (onboarding.Snapshot, error)
}
OnboardingAPI is the narrow daemon-owned setup surface, also available during port recovery.
type Options ¶
type Options struct {
Onboarding OnboardingAPI
Token string
Store *state.Store
Runtime RuntimeAPI
Now func() time.Time
SnapshotSource logging.MachineSnapshotSource
SnapshotID func() string
DiagnosticReporter diagnostics.Reporter
DiagnosticHistory *diagnostics.History
}
type RuntimeAPI ¶
type RuntimeAPI interface {
Capabilities() []string
Snapshot() state.Snapshot
Install(context.Context, runtimeapi.Operation) (core.InstallResult, error)
Restart(context.Context, runtimeapi.Operation) error
Proxies(context.Context) (mihomo.Proxies, error)
ProxyCatalog(context.Context) (mihomo.Proxies, []string, error)
SelectProxy(context.Context, runtimeapi.Operation, string, string) error
DelayGroup(context.Context, string, string, int) (mihomo.Delays, error)
DelayProxy(context.Context, string, string, int) (uint16, error)
Connections(context.Context) (mihomo.Connections, error)
CloseConnection(context.Context, runtimeapi.Operation, string) error
CloseAllConnections(context.Context, runtimeapi.Operation) error
Rules(context.Context) (mihomo.Rules, error)
RuleProviders(context.Context) (mihomo.RuleProviders, error)
UpdateRuleProvider(context.Context, runtimeapi.Operation, string) error
Stream(context.Context, mihomo.StreamKind, func(json.RawMessage) error) error
GeoIPStatus(context.Context) (geoip.Status, error)
LookupGeoIP(context.Context, []netip.Addr) ([]geoip.Record, error)
UpdateGeoIP(context.Context, runtimeapi.Operation) (geoip.Status, error)
SystemProxyStatus(context.Context) (protocol.SystemProxyStatus, error)
EnableSystemProxy(context.Context, runtimeapi.Operation, bool) (protocol.SystemProxyStatus, error)
DisableSystemProxy(context.Context, runtimeapi.Operation) (protocol.SystemProxyStatus, error)
TunStatus(context.Context) (protocol.TunStatus, error)
EnableTun(context.Context, runtimeapi.Operation, bool) (protocol.TunStatus, error)
DisableTun(context.Context, runtimeapi.Operation) (protocol.TunStatus, error)
}
Click to show internal directories.
Click to hide internal directories.