Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶
type ClientConfig struct {
Server string `yaml:"server"`
UUID string `yaml:"uuid"`
Domains []string `yaml:"domains"`
Settings ClientSettings `yaml:"settings"`
Transport string `yaml:"transport"` // "mtp" (default) or "tcp"
LocalPort int `yaml:"local_port"` // Deprecated: SOCKS5 proxy port (default 1080). Use Proxies instead.
Proxies []ProxyConfig `yaml:"proxies"` // List of local proxies to start (e.g. socks5, http)
DNS string `yaml:"dns"` // Custom DNS resolver (e.g. 1.1.1.1:53)
Routing RoutingConfig `yaml:"routing"` // Routing rules
}
ClientConfig defines the configuration for the Mimic Client
func LoadClientConfig ¶
func LoadClientConfig(path string) (*ClientConfig, error)
LoadClientConfig reads and parses the client configuration file
type ClientSettings ¶
type ProxyConfig ¶
type ProxyConfig struct {
Type string `yaml:"type"` // "socks5", "http"
Port int `yaml:"port"` // Listen port
}
ProxyConfig defines a local proxy endpoint
type RoutingConfig ¶
type RoutingConfig struct {
DefaultPolicy string `yaml:"default_policy"` // "proxy" (default) or "direct" or "block"
Rules []RoutingRule `yaml:"rules"`
}
RoutingConfig defines routing engine rules for the client
type RoutingRule ¶
type RoutingRule struct {
Type string `yaml:"type"` // "domain_suffix", "domain_keyword", "ip_cidr"
Value string `yaml:"value"` // e.g. "google.com" or "192.168.0.0/16"
Policy string `yaml:"policy"` // "proxy", "direct", "block"
}
RoutingRule defines a single rule
type ServerConfig ¶
type ServerConfig struct {
Port int `yaml:"port"`
UUID string `yaml:"uuid"`
DomainList []string `yaml:"domain_list"`
DomainsFile string `yaml:"domains_file"`
PresetsDir string `yaml:"presets_dir"`
MaxClients int `yaml:"max_clients"`
RateLimit int `yaml:"rate_limit"`
Transport string `yaml:"transport"` // "mtp" (default) or "tcp"
DNS string `yaml:"dns"` // Custom DNS resolver (e.g. 1.1.1.1:53)
}
ServerConfig defines the configuration for the Mimic Server
func LoadServerConfig ¶
func LoadServerConfig(path string) (*ServerConfig, error)
LoadServerConfig reads and parses the server configuration file
Click to show internal directories.
Click to hide internal directories.