mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-01 09:14:15 +00:00
Merge pull request #66 from ionull/master
Fix trojan and vmess convert on loon
This commit is contained in:
1 file changed
+14
@@ -2243,6 +2243,10 @@ proxyToLoon(std::vector<Proxy> &nodes, const std::string &base_conf,
|
||||
|
||||
proxy = "vmess," + hostname + "," + port + "," + method + ",\"" + id + "\",over-tls=" +
|
||||
(tlssecure ? "true" : "false");
|
||||
|
||||
if (!sni.empty())
|
||||
host = sni;
|
||||
|
||||
if (tlssecure)
|
||||
proxy += ",tls-name=" + host;
|
||||
switch (hash_(transproto)) {
|
||||
@@ -2306,6 +2310,16 @@ proxyToLoon(std::vector<Proxy> &nodes, const std::string &base_conf,
|
||||
proxy = "trojan," + hostname + "," + port + ",\"" + password + "\"";
|
||||
if (!host.empty())
|
||||
proxy += ",tls-name=" + host;
|
||||
switch (hash_(transproto)) {
|
||||
case "tcp"_hash:
|
||||
proxy += ",transport=tcp";
|
||||
break;
|
||||
case "ws"_hash:
|
||||
proxy += ",transport=ws,path=" + path + ",host=" + host;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
if (!scv.is_undef())
|
||||
proxy += ",skip-cert-verify=" + std::string(scv.get() ? "true" : "false");
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user