mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-05 03:02:06 +00:00
Fix cache system not working properly
Clean up codes.
This commit is contained in:
18 files changed
+1661
-1667
No files matched your search
@@ -9,14 +9,12 @@
|
||||
|
||||
#include "../handler/multithread.h"
|
||||
#include "../handler/webget.h"
|
||||
#include "../handler/settings.h"
|
||||
#include "../parser/config/proxy.h"
|
||||
#include "../utils/map_extra.h"
|
||||
#include "../utils/system.h"
|
||||
#include "script_quickjs.h"
|
||||
|
||||
extern int gCacheConfig;
|
||||
extern std::string gProxyConfig;
|
||||
|
||||
std::string parseProxy(const std::string &source);
|
||||
|
||||
static const std::string qjs_require_module {R"(import * as std from 'std'
|
||||
@@ -381,7 +379,7 @@ static qjs_fetch_Response qjs_fetch(qjs_fetch_Request request)
|
||||
|
||||
std::string getGeoIP(const std::string &address, const std::string &proxy)
|
||||
{
|
||||
return fetchFile("https://api.ip.sb/geoip/" + address, parseProxy(proxy), gCacheConfig);
|
||||
return fetchFile("https://api.ip.sb/geoip/" + address, parseProxy(proxy), global.cacheConfig);
|
||||
}
|
||||
|
||||
void script_runtime_init(qjs::Runtime &runtime)
|
||||
|
||||
Reference in new issue
Block a user