config: add ip:port part history save.

This commit is contained in:
2025-06-27 22:13:52 +08:00
parent 08855f3c60
commit b17f275758
58 changed files with 25578 additions and 30 deletions

31
Gui/GuiUtil/Config.h Normal file
View File

@@ -0,0 +1,31 @@
#ifndef CONFIG_H
#define CONFIG_H
#include <QString>
#include <Util.h>
#include <nlohmann/json.hpp>
#include <vector>
using json = nlohmann::json;
struct CgConnection {
std::string ip;
NLOHMANN_DEFINE_TYPE_INTRUSIVE(CgConnection, ip);
};
using CgConVec = std::vector<CgConnection>;
class FrelayConfig
{
public:
FrelayConfig();
~FrelayConfig();
public:
bool SaveIpPort(const QString& ipPort);
std::vector<QString> GetIpPort();
private:
bool existFile(const std::string& path);
};
#endif // CONFIG_H