Fix when no custom ruleset is set in external config file, no rules will be generated.
Fix ws-path parsing for Quantumult X VMess subscription.
Add README for Docker.
Optimize codes.
This commit is contained in:
Tindy X committed 2020-01-16 21:50:27 +08:00
1 parent 2038533798
commit 66dde82c85
4 files changed
+30 -1

No files matched your search

+7 -1
View File
@@ -268,7 +268,7 @@ struct ExternalConfig
std::string surge_rule_base;
std::string surfboard_rule_base;
std::string mellow_rule_base;
bool overwrite_original_rules = true;
bool overwrite_original_rules = false;
bool enable_rule_generator = true;
};
@@ -408,6 +408,12 @@ std::string subconverter(RESPONSE_CALLBACK_ARGS)
extra_ruleset = extconf.surge_ruleset;
refreshRulesets(extra_ruleset, rca);
}
else
{
if(update_ruleset_on_request || cfw_child_process)
refreshRulesets(rulesets, ruleset_content_array);
rca = ruleset_content_array;
}
}
else
{
+2
View File
@@ -1366,6 +1366,8 @@ bool explodeSurge(std::string surge, std::string custom_port, int local_port, st
}
else if(itemName == "obfs-host")
host = itemVal;
else if(itemName == "obfs-uri")
path = itemVal;
else if(itemName == "over-tls")
tls = itemVal == "true" ? "tls" : "";
}
+2
View File
@@ -67,6 +67,8 @@ std::string vmessConstruct(std::string add, std::string port, std::string type,
path = "/";
if(!host.size())
host = add;
if(!id.size())
id = "00000000-0000-0000-0000-000000000000"; //fill this field for node with empty id
rapidjson::StringBuffer sb;
rapidjson::Writer<rapidjson::StringBuffer> writer(sb);
writer.StartObject();