fix; standalone issue and add secret
This commit is contained in:
@@ -73,7 +73,9 @@ func BuildConfig(opt ConfigOptions, input option.Options) (*option.Options, erro
|
||||
options.Experimental = &option.ExperimentalOptions{
|
||||
ClashAPI: &option.ClashAPIOptions{
|
||||
ExternalController: fmt.Sprintf("%s:%d", "127.0.0.1", opt.ClashApiPort),
|
||||
Secret: opt.ClashApiSecret,
|
||||
},
|
||||
|
||||
CacheFile: &option.CacheFileOptions{
|
||||
Enabled: true,
|
||||
Path: "clash.db",
|
||||
|
||||
@@ -9,6 +9,7 @@ type ConfigOptions struct {
|
||||
LogLevel string `json:"log-level"`
|
||||
EnableClashApi bool `json:"enable-clash-api"`
|
||||
ClashApiPort uint16 `json:"clash-api-port"`
|
||||
ClashApiSecret string `json:"clash-api-secret"`
|
||||
GeoIPPath string `json:"geoip-path"`
|
||||
GeoSitePath string `json:"geosite-path"`
|
||||
Rules []Rule `json:"rules"`
|
||||
@@ -117,9 +118,10 @@ func DefaultConfigOptions() *ConfigOptions {
|
||||
BypassLAN: false,
|
||||
AllowConnectionFromLAN: false,
|
||||
},
|
||||
LogLevel: "info",
|
||||
LogLevel: "warn",
|
||||
EnableClashApi: true,
|
||||
ClashApiPort: 6756,
|
||||
ClashApiSecret: "hiddify",
|
||||
GeoIPPath: "geoip.db",
|
||||
GeoSitePath: "geosite.db",
|
||||
Rules: []Rule{},
|
||||
|
||||
Reference in New Issue
Block a user