2020-04-02 15:48:20 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <util/fs.hpp>
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
namespace llarp
|
|
|
|
{
|
|
|
|
constexpr auto our_rc_filename = "self.signed";
|
|
|
|
constexpr auto our_identity_filename = "identity.key";
|
|
|
|
constexpr auto our_enc_key_filename = "encryption.key";
|
|
|
|
constexpr auto our_transport_key_filename = "transport.key";
|
|
|
|
|
2020-04-02 18:11:49 +00:00
|
|
|
constexpr auto nodedb_dirname = "nodedb";
|
|
|
|
|
2020-04-07 20:41:11 +00:00
|
|
|
inline fs::path
|
2020-04-02 15:48:20 +00:00
|
|
|
GetDefaultDataDir()
|
|
|
|
{
|
|
|
|
#ifdef _WIN32
|
|
|
|
const fs::path homedir = getenv("APPDATA");
|
|
|
|
#else
|
|
|
|
const fs::path homedir = getenv("HOME");
|
|
|
|
#endif
|
|
|
|
return homedir / ".lokinet/";
|
|
|
|
}
|
|
|
|
|
2020-04-07 20:41:11 +00:00
|
|
|
inline fs::path
|
2020-04-02 15:48:20 +00:00
|
|
|
GetDefaultConfigFilename()
|
|
|
|
{
|
|
|
|
return "lokinet.ini";
|
|
|
|
}
|
|
|
|
|
2020-04-07 20:41:11 +00:00
|
|
|
inline fs::path
|
2020-04-02 15:48:20 +00:00
|
|
|
GetDefaultConfigPath()
|
|
|
|
{
|
|
|
|
return GetDefaultDataDir() / GetDefaultConfigFilename();
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace llarp
|