Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseClashConfig ¶
func ParseClashConfig(data []byte) (*sub.DecodeResult, error)
func ParseProxies ¶
func ParseProxies(proxies []any) ([]*configs.OutboundHandlerConfig, []string, error)
ParseProxies converts a "proxies" array from a clash/mihomo config to vx-core OutboundHandlerConfigs
func ParseProxy ¶
func ParseProxy(mapping map[string]any) (*configs.OutboundHandlerConfig, error)
ParseProxy converts a single mihomo proxy mapping to vx-core OutboundHandlerConfig
Types ¶
type ClashConfig ¶
type ClashConfig struct {
Port int `yaml:"port"`
SocksPort int `yaml:"socks-port"`
AllowLan bool `yaml:"allow-lan"`
Mode string `yaml:"mode"`
LogLevel string `yaml:"log-level"`
ExternalController string `yaml:"external-controller"`
DNS *DNSConfig `yaml:"dns"`
Proxies []any `yaml:"proxies"`
ProxyGroups []any `yaml:"proxy-groups"`
Rules []string `yaml:"rules"`
}
ClashConfig represents the structure of a Clash/Mihomo configuration file
Click to show internal directories.
Click to hide internal directories.