mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 02:02:24 +00:00
Enhancements
Fix a bug that Clash may interpret pure number password as float64 type (Issue [#58](https://github.com/tindy2013/subconverter/issues/58)). Fix support for parsing some non-standard Clash configurations. Add generator-only mode to save configurations to files or upload to Gists. Optimize codes. Fix typo.
This commit is contained in:
7 files changed
+151
-53
No files matched your search
@@ -655,6 +655,8 @@ void netchToClash(std::vector<nodeInfo> &nodes, YAML::Node &yamlnode, string_arr
|
||||
singleproxy["type"] = "ss";
|
||||
singleproxy["cipher"] = method;
|
||||
singleproxy["password"] = password;
|
||||
if(std::all_of(password.begin(), password.end(), ::isdigit))
|
||||
singleproxy["password"].SetTag("str");
|
||||
if(plugin == "simple-obfs" || plugin == "obfs-local")
|
||||
{
|
||||
singleproxy["plugin"] = "obfs";
|
||||
@@ -724,6 +726,8 @@ void netchToClash(std::vector<nodeInfo> &nodes, YAML::Node &yamlnode, string_arr
|
||||
singleproxy["type"] = "ssr";
|
||||
singleproxy["cipher"] = method;
|
||||
singleproxy["password"] = password;
|
||||
if(std::all_of(password.begin(), password.end(), ::isdigit))
|
||||
singleproxy["password"].SetTag("str");
|
||||
singleproxy["protocol"] = protocol;
|
||||
singleproxy["protocolparam"] = protoparam;
|
||||
singleproxy["obfs"] = obfs;
|
||||
@@ -733,6 +737,8 @@ void netchToClash(std::vector<nodeInfo> &nodes, YAML::Node &yamlnode, string_arr
|
||||
singleproxy["type"] = "socks5";
|
||||
singleproxy["username"] = username;
|
||||
singleproxy["password"] = password;
|
||||
if(std::all_of(password.begin(), password.end(), ::isdigit))
|
||||
singleproxy["password"].SetTag("str");
|
||||
if(ext.skip_cert_verify)
|
||||
singleproxy["skip-cert-verify"] = true;
|
||||
break;
|
||||
@@ -740,6 +746,8 @@ void netchToClash(std::vector<nodeInfo> &nodes, YAML::Node &yamlnode, string_arr
|
||||
singleproxy["type"] = "http";
|
||||
singleproxy["username"] = username;
|
||||
singleproxy["password"] = password;
|
||||
if(std::all_of(password.begin(), password.end(), ::isdigit))
|
||||
singleproxy["password"].SetTag("str");
|
||||
singleproxy["tls"] = type == "HTTPS";
|
||||
if(ext.skip_cert_verify)
|
||||
singleproxy["skip-cert-verify"] = true;
|
||||
|
||||
Reference in new issue
Block a user