diff --git a/src/generator/config/subexport.cpp b/src/generator/config/subexport.cpp index 27c6404..8de4415 100644 --- a/src/generator/config/subexport.cpp +++ b/src/generator/config/subexport.cpp @@ -367,11 +367,18 @@ void proxyToClash(std::vector &nodes, YAML::Node &yamlnode, const ProxyGr break; case "ws"_hash: singleproxy["network"] = x.TransferProtocol; + /* singleproxy["ws-opts"]["path"] = x.Path; if(x.Host.size()) singleproxy["ws-opts"]["headers"]["Host"] = x.Host; if(x.Edge.size()) singleproxy["ws-opts"]["headers"]["Edge"] = x.Edge; + */ + singleproxy["ws-path"] = x.Path; + if(x.Host.size()) + singleproxy["ws-headers"]["Host"] = x.Host; + if(x.Edge.size()) + singleproxy["ws-headers"]["Edge"] = x.Edge; break; case "http"_hash: singleproxy["network"] = x.TransferProtocol; diff --git a/src/parser/subparser.cpp b/src/parser/subparser.cpp index d7cefad..3acf46e 100644 --- a/src/parser/subparser.cpp +++ b/src/parser/subparser.cpp @@ -44,20 +44,19 @@ void vmessConstruct(Proxy &node, const std::string &group, const std::string &re node.AlterId = to_int(aid); node.EncryptMethod = cipher; node.TransferProtocol = net.empty() ? "tcp" : net; - node.Host = host.empty() ? add.data() : trim(host); node.Edge = edge; - if(net == "ws" || net == "http") - node.Path = path.empty() ? "/" : trim(path); + if(net == "quic") + { + node.QUICSecure = host; + node.QUICSecret = path; + } else { - if(net == "quic") - { - node.QUICSecure = host; - node.QUICSecret = path; - } - node.FakeType = type; + node.Host = host.empty() ? add.data() : trim(host); + node.Path = path.empty() ? "/" : trim(path); } + node.FakeType = type; node.TLSSecure = tls == "tls"; }