NetTunnelWindows/NetTunnelSDK/globalcfg.h

36 lines
1.2 KiB
C
Raw Normal View History

#pragma once
#include <spdlog/spdlog.h>
/**
* @brief WireGuard
*/
typedef struct {
TCHAR wireguardPath[MAX_PATH]; ///< wireguard.exe 路径
BOOL wireguardExists; ///< wireguard.exe 是否存在
TCHAR wgPath[MAX_PATH]; ///< wg.exe 路径
BOOL wgExists; ///< wg.exe 是否存在
} WIREGUARD_CFG, *PWIREGUARD_CFG;
/**
* @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
} SDK_CONFIG, *PSDK_CONFIG;
#ifdef __cplusplus // If used by C++ code,
extern "C" {
// we need to export the C interface
#endif
PSDK_CONFIG GetGlobalCfgInfo();
#ifdef __cplusplus
}
#endif