From 782caaf082fbdcef8d587fa65328e33c6d758175 Mon Sep 17 00:00:00 2001 From: Tindy X <49061470+tindy2013@users.noreply.github.com> Date: Sun, 23 Feb 2020 21:26:28 +0800 Subject: [PATCH] Bugs fix Fix some Shadowsocks nodes are missing in Loon configurations. Fix Quantumult X nodes not handling duplicated remarks. Force expand all local rules instead of generating /getruleset urls for generator mode. --- src/interfaces.cpp | 6 ++++-- src/subexport.cpp | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/interfaces.cpp b/src/interfaces.cpp index 32ae3af..6b96418 100644 --- a/src/interfaces.cpp +++ b/src/interfaces.cpp @@ -1571,7 +1571,7 @@ std::string surgeConfToClash(RESPONSE_CALLBACK_ARGS) std::string getProfile(RESPONSE_CALLBACK_ARGS) { - std::string name = UrlDecode(getUrlArg(argument, "name")), token = UrlDecode(getUrlArg(argument, "token")); + std::string name = UrlDecode(getUrlArg(argument, "name")), token = UrlDecode(getUrlArg(argument, "token")), expand = getUrlArg(argument, "expand"); if(token != access_token) { *status_code = 403; @@ -1600,6 +1600,7 @@ std::string getProfile(RESPONSE_CALLBACK_ARGS) return "Broken profile!"; } contents.emplace("token", token); + contents.emplace("expand", expand); std::string query; for(auto &x : contents) { @@ -1732,11 +1733,12 @@ void simpleGenerator() if(ini.ItemExist("profile")) { profile = ini.Get("profile"); - content = getProfile("name=" + UrlEncode(profile) + "&token=" + access_token, dummy_str, &ret_code, dummy_map); + content = getProfile("name=" + UrlEncode(profile) + "&token=" + access_token + "&expand=true", dummy_str, &ret_code, dummy_map); } else { ini.GetItems(allItems); + allItems.emplace("expand", "true"); for(auto &y : allItems) { if(y.first == "path") diff --git a/src/subexport.cpp b/src/subexport.cpp index 05e7fa6..4613de0 100644 --- a/src/subexport.cpp +++ b/src/subexport.cpp @@ -1702,6 +1702,7 @@ void netchToQuanX(std::vector &nodes, INIReader &ini, std::vector &nodes, std::string &base_conf, st if(pluginopts.size()) proxy += "," + replace_all_distinct(replace_all_distinct(pluginopts, ";obfs-host=", ","), "obfs=", ""); } - else + else if(plugin.size()) continue; break; case SPEEDTEST_MESSAGE_FOUNDVMESS: