2023-06-19 11:08:42 +00:00
|
|
|
|
#pragma once
|
|
|
|
|
#include <spdlog/spdlog.h>
|
|
|
|
|
|
2023-06-20 09:25:14 +00:00
|
|
|
|
/**
|
|
|
|
|
* @brief WireGuard 配置项
|
|
|
|
|
*/
|
|
|
|
|
typedef struct {
|
|
|
|
|
TCHAR wireguardPath[MAX_PATH]; ///< wireguard.exe 路径
|
|
|
|
|
BOOL wireguardExists; ///< wireguard.exe 是否存在
|
|
|
|
|
TCHAR wgPath[MAX_PATH]; ///< wg.exe 路径
|
|
|
|
|
BOOL wgExists; ///< wg.exe 是否存在
|
2023-06-19 11:08:42 +00:00
|
|
|
|
} WIREGUARD_CFG, *PWIREGUARD_CFG;
|
|
|
|
|
|
2023-06-20 09:25:14 +00:00
|
|
|
|
/**
|
|
|
|
|
* @brief SDK 全局配置项
|
|
|
|
|
*/
|
|
|
|
|
typedef struct {
|
|
|
|
|
TCHAR workDirectory[MAX_PATH]; ///< SDK 当前工作目录
|
|
|
|
|
PROTO_CRYPTO_TYPE proCryptoType; ///< 协议加密类型
|
|
|
|
|
TCHAR proKeyBuf[256]; ///< 协议加密秘钥
|
|
|
|
|
BOOL enableLog; ///< 是否启用日志
|
|
|
|
|
spdlog::level::level_enum logLevel; ///< 日志等级
|
|
|
|
|
TCHAR cfgPath[MAX_PATH]; ///< 配置文件路径
|
|
|
|
|
WIREGUARD_CFG wireguardCfg; ///< wireguard 配置项 @see WIREGUARD_CFG
|
2023-06-19 11:08:42 +00:00
|
|
|
|
} SDK_CONFIG, *PSDK_CONFIG;
|
|
|
|
|
|
2023-06-20 09:25:14 +00:00
|
|
|
|
#ifdef __cplusplus // If used by C++ code,
|
|
|
|
|
extern "C" {
|
|
|
|
|
// we need to export the C interface
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-06-19 11:08:42 +00:00
|
|
|
|
PSDK_CONFIG GetGlobalCfgInfo();
|
2023-06-20 09:25:14 +00:00
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|