#pragma once #include "ProxyEntity.hpp" #include "sys/ExternalProcess.hpp" namespace NekoGui { class BuildConfigResult { public: QString error; QJsonObject coreConfig; QList> outboundStats; // all, but not including "bypass" "block" std::shared_ptr outboundStat; // main QStringList ignoreConnTag; std::list> extRs; }; class BuildTestConfigResult { public: QString error; QMap fullConfigs; QMap tag2entID; QJsonObject coreConfig; QStringList outboundTags; }; class BuildConfigStatus { public: std::shared_ptr result; std::shared_ptr ent; int chainID = 0; bool forTest; bool forExport; // xxList is V2Ray format string list QStringList domainListDNSDirect; // config format QJsonArray routingRules; QJsonArray inbounds; QJsonArray outbounds; }; std::shared_ptr BuildTestConfig(QList> profiles); std::shared_ptr BuildConfig(const std::shared_ptr &ent, bool forTest, bool forExport, int chainID = 0); void BuildConfigSingBox(const std::shared_ptr &status); QString BuildChain(int chainId, const std::shared_ptr &status); QString BuildChainInternal(int chainId, const QList> &ents, const std::shared_ptr &status); void BuildOutbound(const std::shared_ptr &ent, const std::shared_ptr &status, QJsonObject& outbound, const QString& tag); } // namespace NekoGui