mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-12-13 13:19:48 +04:00
Chore: Remove ctlcmd and leftover envvar (#5392)
https://github.com/v2fly/v2ray-core/issues/360
This commit is contained in:
committed by
GitHub
parent
bd7503d506
commit
aea123842b
@@ -8,10 +8,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
PluginLocation = "xray.location.plugin"
|
||||
ConfigLocation = "xray.location.config"
|
||||
ConfdirLocation = "xray.location.confdir"
|
||||
ToolLocation = "xray.location.tool"
|
||||
AssetLocation = "xray.location.asset"
|
||||
CertLocation = "xray.location.cert"
|
||||
|
||||
@@ -79,17 +77,6 @@ func getExecutableDir() string {
|
||||
return filepath.Dir(exec)
|
||||
}
|
||||
|
||||
func getExecutableSubDir(dir string) func() string {
|
||||
return func() string {
|
||||
return filepath.Join(getExecutableDir(), dir)
|
||||
}
|
||||
}
|
||||
|
||||
func GetPluginDirectory() string {
|
||||
pluginDir := NewEnvFlag(PluginLocation).GetValue(getExecutableSubDir("plugins"))
|
||||
return pluginDir
|
||||
}
|
||||
|
||||
func GetConfigurationPath() string {
|
||||
configPath := NewEnvFlag(ConfigLocation).GetValue(getExecutableDir)
|
||||
return filepath.Join(configPath, "config.json")
|
||||
|
||||
Reference in New Issue
Block a user