mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-04 10:42:04 +00:00
Bug fixes
Fix incorrect parameters for simple interface. Fix group generation support for Surge. Change default skip_cert_verify flag to false. Optimize codes.
This commit is contained in:
3 files changed
+24
-7
No files matched your search
+1
-1
@@ -93,7 +93,7 @@ rename_node=\(?((x|X)?(\d+)(\.?\d+)?)((\s?倍率?)|(x|X))\)?@$1x
|
|||||||
udp_flag=false
|
udp_flag=false
|
||||||
tcp_fast_open_flag=false
|
tcp_fast_open_flag=false
|
||||||
sort_flag=false
|
sort_flag=false
|
||||||
skip_cert_verify_flag=true
|
skip_cert_verify_flag=false
|
||||||
|
|
||||||
[managed_config]
|
[managed_config]
|
||||||
;Append a '#!MANAGED-CONFIG' info to Surge configurations
|
;Append a '#!MANAGED-CONFIG' info to Surge configurations
|
||||||
|
|||||||
+1
-1
@@ -590,7 +590,7 @@ std::string simpleToClashR(RESPONSE_CALLBACK_ARGS)
|
|||||||
refreshRulesets(rulesets, ruleset_content_array);
|
refreshRulesets(rulesets, ruleset_content_array);
|
||||||
rca = ruleset_content_array;
|
rca = ruleset_content_array;
|
||||||
|
|
||||||
extra_settings ext = {add_emoji, remove_old_emoji, append_proxy_type, udp_flag, tfo_flag, false, do_sort, ""};
|
extra_settings ext = {add_emoji, remove_old_emoji, append_proxy_type, udp_flag, tfo_flag, false, do_sort, scv_flag, ""};
|
||||||
|
|
||||||
std::string proxy;
|
std::string proxy;
|
||||||
if(proxy_subscription == "SYSTEM")
|
if(proxy_subscription == "SYSTEM")
|
||||||
|
|||||||
+22
-5
@@ -716,11 +716,15 @@ std::string netchToSurge(std::vector<nodeInfo> &nodes, std::string &base_conf, s
|
|||||||
std::string plugin, pluginopts;
|
std::string plugin, pluginopts;
|
||||||
std::string protocol, protoparam, obfs, obfsparam;
|
std::string protocol, protoparam, obfs, obfsparam;
|
||||||
std::string id, aid, transproto, faketype, host, path, quicsecure, quicsecret;
|
std::string id, aid, transproto, faketype, host, path, quicsecure, quicsecret;
|
||||||
std::string url;
|
|
||||||
std::string output_nodelist;
|
std::string output_nodelist;
|
||||||
std::vector<nodeInfo> nodelist;
|
std::vector<nodeInfo> nodelist;
|
||||||
unsigned short local_port = 1080;
|
unsigned short local_port = 1080;
|
||||||
bool tlssecure;
|
bool tlssecure;
|
||||||
|
//group pref
|
||||||
|
std::string url;
|
||||||
|
int interval = 0;
|
||||||
|
std::string ssid_default;
|
||||||
|
|
||||||
string_array vArray, remarks_list, filtered_nodelist;
|
string_array vArray, remarks_list, filtered_nodelist;
|
||||||
|
|
||||||
ini.store_any_line = true;
|
ini.store_any_line = true;
|
||||||
@@ -877,12 +881,25 @@ std::string netchToSurge(std::vector<nodeInfo> &nodes, std::string &base_conf, s
|
|||||||
{
|
{
|
||||||
rules_upper_bound = vArray.size();
|
rules_upper_bound = vArray.size();
|
||||||
}
|
}
|
||||||
else if(vArray[1] == "url-test" || vArray[1] == "fallback" || vArray[1] == "load-balance")
|
else if(vArray[1] == "url-test" || vArray[1] == "fallback")
|
||||||
{
|
{
|
||||||
if(vArray.size() < 5)
|
if(vArray.size() < 5)
|
||||||
continue;
|
continue;
|
||||||
rules_upper_bound = vArray.size() - 2;
|
rules_upper_bound = vArray.size() - 2;
|
||||||
url = vArray[vArray.size() - 2];
|
url = vArray[vArray.size() - 2];
|
||||||
|
interval = to_int(vArray[vArray.size() - 1]);
|
||||||
|
}
|
||||||
|
else if(vArray[1] == "ssid")
|
||||||
|
{
|
||||||
|
if(vArray.size() < 4)
|
||||||
|
continue;
|
||||||
|
proxy = vArray[1] + ",default=" + vArray[2];
|
||||||
|
proxy += std::accumulate(vArray.begin() + 3, vArray.end(), vArray[3], [](std::string a, std::string b)
|
||||||
|
{
|
||||||
|
return std::move(a) + "," + std::move(b);
|
||||||
|
});
|
||||||
|
ini.Set("{NONAME}", vArray[0] + " = " + proxy); //insert order
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
@@ -902,8 +919,8 @@ std::string netchToSurge(std::vector<nodeInfo> &nodes, std::string &base_conf, s
|
|||||||
{
|
{
|
||||||
return std::move(a) + "," + std::move(b);
|
return std::move(a) + "," + std::move(b);
|
||||||
});
|
});
|
||||||
if(vArray[1] == "url-test" || vArray[1] == "fallback" || vArray[1] == "load-balance")
|
if(vArray[1] == "url-test" || vArray[1] == "fallback")
|
||||||
proxy += ",url=" + url;
|
proxy += ",url=" + url + ",interval=" + std::__cxx11::to_string(interval);
|
||||||
|
|
||||||
ini.Set("{NONAME}", vArray[0] + " = " + proxy); //insert order
|
ini.Set("{NONAME}", vArray[0] + " = " + proxy); //insert order
|
||||||
}
|
}
|
||||||
@@ -1321,7 +1338,7 @@ std::string netchToSSD(std::vector<nodeInfo> &nodes, std::string &group, extra_s
|
|||||||
{
|
{
|
||||||
json.Parse(x.proxyStr.data());
|
json.Parse(x.proxyStr.data());
|
||||||
|
|
||||||
remark = "\"" + replace_all_distinct(UTF8ToCodePoint(x.remarks), "\\u1f1", "\\ud83c\\udd") + "\"";
|
remark = "\"" + replace_all_distinct(UTF8ToCodePoint(x.remarks), "\\u1f1", "\\ud83c\\udd") + "\""; //convert UTF-8 characters to code points
|
||||||
hostname = GetMember(json, "Hostname");
|
hostname = GetMember(json, "Hostname");
|
||||||
port = (unsigned short)stoi(GetMember(json, "Port"));
|
port = (unsigned short)stoi(GetMember(json, "Port"));
|
||||||
password = GetMember(json, "Password");
|
password = GetMember(json, "Password");
|
||||||
|
|||||||
Reference in new issue
Block a user