Complete refactor of project file structure

Fix incorrect handing of default node parameters in SSD subscription.
Fix unable to parse some Clash rule-providers (#289).
Fix not filtering inline comments in some Surge rulesets. (#285)
Add Cron task options.
Add clean context option for persisting a JS context across the whole request.
Replace JS engine with QuickJS.
This commit is contained in:
Tindy X committed 2021-03-23 18:09:00 +08:00
1 parent ba058e4e4b
commit 3d67406af6
88 files changed
+9404 -6356

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
#ifndef MULTITHREAD_H_INCLUDED
#define MULTITHREAD_H_INCLUDED
#include <mutex>
#include <future>
#include <yaml-cpp/yaml.h>
#include "../utils/ini_reader/ini_reader.h"
#include "../utils/string.h"
using guarded_mutex = std::lock_guard<std::mutex>;
string_array safe_get_emojis();
string_array safe_get_renames();
string_array safe_get_streams();
string_array safe_get_times();
YAML::Node safe_get_clash_base();
INIReader safe_get_mellow_base();
void safe_set_emojis(string_array &data);
void safe_set_renames(string_array &data);
void safe_set_streams(string_array &data);
void safe_set_times(string_array &data);
std::shared_future<std::string> fetchFileAsync(const std::string &path, const std::string &proxy, int cache_ttl, bool async = false);
std::string fetchFile(const std::string &path, const std::string &proxy, int cache_ttl);
#endif // MULTITHREAD_H_INCLUDED