[FEAT] Add geodata loader mode switch

This commit is contained in:
Clash-Mini
2022-02-05 00:51:06 +08:00
parent 2bf34c766e
commit c28f42d823
5 changed files with 31 additions and 17 deletions

View File

@ -35,12 +35,12 @@ import (
type General struct {
Inbound
Controller
Mode T.TunnelMode `json:"mode"`
UnifiedDelay bool
LogLevel log.LogLevel `json:"log-level"`
IPv6 bool `json:"ipv6"`
Interface string `json:"-"`
Geodataload string `json:"geodataload"`
Mode T.TunnelMode `json:"mode"`
UnifiedDelay bool
LogLevel log.LogLevel `json:"log-level"`
IPv6 bool `json:"ipv6"`
Interface string `json:"-"`
GeodataLoader string `json:"geodata-loader"`
}
// Inbound
@ -170,7 +170,7 @@ type RawConfig struct {
ExternalUI string `yaml:"external-ui"`
Secret string `yaml:"secret"`
Interface string `yaml:"interface-name"`
Geodataloader string `yaml:"geodata-loader"`
GeodataLoader string `yaml:"geodata-loader"`
ProxyProvider map[string]map[string]interface{} `yaml:"proxy-providers"`
RuleProvider map[string]map[string]interface{} `yaml:"rule-providers"`
@ -201,7 +201,7 @@ func UnmarshalRawConfig(buf []byte) (*RawConfig, error) {
AllowLan: false,
BindAddress: "*",
Mode: T.Rule,
Geodataloader: "standard",
GeodataLoader: "memconservative",
UnifiedDelay: false,
Authentication: []string{},
LogLevel: log.INFO,