mirror of
https://github.com/MetaCubeX/subconverter.git
synced 2025-11-04 18:19:42 +08:00
Optimize codes.
This commit is contained in:
parent
9b5e01acd3
commit
9419738959
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user