连接器客户端

This commit is contained in:
tianmo
2026-09-05 23:35:45 +08:00
parent d10807d877
commit 41151b7f8b
28 changed files with 2195 additions and 12 deletions
+21
View File
@@ -0,0 +1,21 @@
#pragma once
#include <filesystem>
#include <string>
#include <vector>
namespace connector {
struct ConnectorConfig {
std::vector<std::string> allowed_origins;
std::string spine_executable;
};
std::filesystem::path config_path();
ConnectorConfig load_config();
void save_config(const ConnectorConfig& config);
bool origin_allowed(const std::string& origin);
void allow_origin(const std::string& origin);
bool valid_web_origin(const std::string& origin);
} // namespace connector