Add cache system for configs, rulesets and subscriptions

Add proxy_config option for downloading external config files.
Optimize codes.
This commit is contained in:
Tindy X committed 2020-02-19 22:14:18 +08:00
1 parent 8bbc163d08
commit 19742630f5
8 files changed
+143 -36

No files matched your search

+2 -1
View File
@@ -756,7 +756,8 @@ std::string fileGetMD5(const std::string &filepath)
int fileWrite(const std::string &path, const std::string &content, bool overwrite)
{
std::fstream outfile;
std::ios::openmode mode = overwrite ? std::ios::out : std::ios::app;
std::ios_base::openmode mode = overwrite ? std::ios_base::out : std::ios_base::app;
mode |= std::ios_base::binary;
outfile.open(path, mode);
outfile << content << std::endl;
outfile.close();