Crate mihomo_rs

Crate mihomo_rs 

Source
Expand description

§Mihomo RS SDK

一个用于管理和控制 mihomo 代理服务的 Rust SDK。 提供配置管理、代理控制、规则引擎和监控功能。

Re-exports§

pub use client::MihomoClient;
pub use config::Config;
pub use config::ProxyConfig;
pub use config::RuleConfig;
pub use error::ErrorCategory;
pub use error::ErrorContext;
pub use error::ErrorInfo;
pub use error::MihomoError;
pub use error::Result;
pub use retry::retry_async;
pub use retry::retry_sync;
pub use retry::RetryExecutor;
pub use retry::RetryPolicy;
pub use service::ServiceConfig;
pub use service::ServiceManager;
pub use service::ServiceStatus;
pub use service::VersionInfo;
pub use types::ApiResponse;
pub use types::Connection;
pub use types::ConnectionMetadata;
pub use types::ConnectionsResponse;
pub use types::DelayHistory;
pub use types::DnsQuery;
pub use types::EmptyResponse;
pub use types::GcStats;
pub use types::HealthCheckResult;
pub use types::LogEntry;
pub use types::LogLevel;
pub use types::Memory;
pub use types::MemoryUsage;
pub use types::Provider;
pub use types::ProviderHealthResponse;
pub use types::ProxyGroup;
pub use types::ProxyGroupType;
pub use types::ProxyItem;
pub use types::ProxyNode;
pub use types::ProxyType;
pub use types::Rule;
pub use types::RuleProvider;
pub use types::RuleStats;
pub use types::RuleType;
pub use types::RuntimeInfo;
pub use types::ServiceConfigInfo;
pub use types::ServiceConfigUpdate;
pub use types::ServiceStats;
pub use types::SubscriptionInfo;
pub use types::SystemInfo;
pub use types::Traffic;
pub use types::Version;

Modules§

client
客户端模块
config
配置管理模块
error
错误处理模块
logger
统一日志记录模块
monitor
监控模块
proxy
代理核心功能模块
retry
重试机制模块
rules
规则引擎模块
service
服务管理模块
types
类型定义模块
utils
工具函数模块

Macros§

log_debug
便捷宏定义
log_error
log_info
log_warn

Constants§

VERSION
SDK 版本信息

Functions§

create_client
创建一个新的 Mihomo 客户端实例
init_default_logger
使用默认配置初始化日志系统(向后兼容)
init_logger
初始化日志系统