Enhancements

Fix not processing quotes in ws-headers in Surge VMess configurations.
Fix when default_url is set and insert_url is not set in YAML configuration and access /sub without url argument, the nodes in default_url will be added twice.
Add /version interface to compatible with some front-end.
This commit is contained in:
Tindy X committed 2020-03-11 23:54:08 +08:00
1 parent 550670006d
commit 5594070657
6 files changed
+39 -16

No files matched your search

+2 -2
View File
@@ -1021,9 +1021,9 @@ std::string netchToSurge(std::vector<nodeInfo> &nodes, std::string &base_conf, s
proxy = "vmess, " + hostname + ", " + port + ", username=" + id + ", tls=" + (tlssecure ? "true" : "false");
if(transproto == "ws")
{
proxy += ", ws=true, ws-path=" + path + ", ws-headers=Host:" + host;
proxy += ", ws=true, ws-path=" + path + ", ws-headers=Host:\"" + host + "\"";
if(edge.size())
proxy += "|Edge:" + edge;
proxy += "|Edge:\"" + edge + "\"";
}
if(ext.skip_cert_verify)
proxy += ", skip-cert-verify=1";