mirror of
https://github.com/MetaCubeX/subconverter.git
synced 2025-11-04 18:19:42 +08:00
parent
a7e441a2fe
commit
0ba0cdd18e
@ -759,6 +759,15 @@ void explodeTrojan(std::string trojan, Proxy &node)
|
||||
path = getUrlArg(addition, "wspath");
|
||||
network = "ws";
|
||||
}
|
||||
// support the trojan link format used by v2ryaN and X-ui.
|
||||
// format: trojan://{password}@{server}:{port}?type=ws&security=tls&path={path (urlencoded)}&sni={host}#{name}
|
||||
else if(getUrlArg(addition, "type") == "ws")
|
||||
{
|
||||
path = getUrlArg(addition, "path");
|
||||
if(path.substr(0, 3) == "%2F")
|
||||
path = urlDecode(path);
|
||||
network = "ws";
|
||||
}
|
||||
|
||||
if(remark.empty())
|
||||
remark = server + ":" + port;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user