1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-06-19 17:29:54 -04:00

add env variable for config file

This commit is contained in:
Darien Raymond
2017-12-05 11:58:12 +01:00
parent 81c4f23691
commit 53b0f91873
2 changed files with 30 additions and 11 deletions

View File

@@ -70,3 +70,9 @@ func GetPluginDirectory() string {
pluginDir := EnvFlag{Name: name, AltName: NormalizeEnvName(name)}.GetValue(getExecuableSubDir("plugins"))
return pluginDir
}
func GetConfigurationPath() string {
const name = "v2ray.location.config"
configPath := EnvFlag{Name: name, AltName: NormalizeEnvName(name)}.GetValue(getExecutableDir)
return filepath.Join(configPath, "config.json")
}