mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2025-10-28 04:12:49 +00:00
Optimize codes.
This commit is contained in:
@@ -423,6 +423,7 @@ void proxyToClash(std::vector<Proxy> &nodes, YAML::Node &yamlnode, const ProxyGr
|
||||
singleproxy["grpc-opts"]["grpc-service-name"] = x.Path;
|
||||
break;
|
||||
case "ws"_hash:
|
||||
singleproxy["network"] = x.TransferProtocol;
|
||||
singleproxy["ws-opts"]["path"] = x.Path;
|
||||
if(!x.Host.empty())
|
||||
singleproxy["ws-opts"]["headers"]["Host"] = x.Host;
|
||||
|
||||
@@ -1011,7 +1011,7 @@ void explodeClash(Node yamlnode, std::vector<Proxy> &nodes)
|
||||
switch(hash_(safe_as<std::string>(singleproxy["plugin"])))
|
||||
{
|
||||
case "obfs"_hash:
|
||||
plugin = "simple-obfs";
|
||||
plugin = "obfs-local";
|
||||
if(singleproxy["plugin-opts"].IsDefined())
|
||||
{
|
||||
singleproxy["plugin-opts"]["mode"] >>= pluginopts_mode;
|
||||
|
||||
Reference in New Issue
Block a user