fix: typo

This commit is contained in:
metacubex 2023-01-15 23:34:08 +08:00
parent 78c27ede2f
commit d0ef44a48c
3 changed files with 11 additions and 9 deletions

View File

@ -219,9 +219,9 @@ proxyToClash(std::vector<Proxy> &nodes, YAML::Node &yamlnode, const ProxyGroupCo
tribool scv = ext.skip_cert_verify;
tribool tfo = ext.tfo;
udp.define(x.UDP);
xudp.define(x.XUDP)
xudp.define(x.XUDP);
scv.define(x.AllowInsecure);
tfo.define(x.TCPFastOpen)
tfo.define(x.TCPFastOpen);
singleproxy["name"] = remark;
singleproxy["server"] = x.Hostname;
@ -262,7 +262,7 @@ proxyToClash(std::vector<Proxy> &nodes, YAML::Node &yamlnode, const ProxyGroupCo
singleproxy["alterId"] = x.AlterId;
singleproxy["cipher"] = x.EncryptMethod;
singleproxy["tls"] = x.TLSSecure;
if (xudp) && (udp)
if (xudp && udp)
singleproxy["xudp"] = true;
if (!scv.is_undef())
singleproxy["skip-cert-verify"] = scv.get();
@ -332,11 +332,11 @@ proxyToClash(std::vector<Proxy> &nodes, YAML::Node &yamlnode, const ProxyGroupCo
if (!x.OBFSParam.empty())
singleproxy["obfs"] = x.OBFSParam;
break;
case ProxyType::Vless:
case ProxyType::VLESS:
singleproxy["type"] = "vless";
singleproxy["uuid"] = x.UserId;
singleproxy["tls"] = x.TLSSecure;
if (xudp) && (udp)
if (xudp && udp)
singleproxy["xudp"] = true;
if (!x.Host.empty())
singleproxy["servername"] = x.Host;

View File

@ -13,7 +13,7 @@ enum ProxyType
Shadowsocks,
ShadowsocksR,
VMess,
Vless,
VLESS,
Hysteria,
Trojan,
Snell,
@ -32,8 +32,10 @@ inline String getProxyTypeName(int type)
return "SSR";
case ProxyType::VMess:
return "VMess";
case ProxyType::Vless:
return "Vless";
case ProxyType::VLESS:
return "VLESS";
case ProxyType::Hysteria:
return "Hysteria";
case ProxyType::Trojan:
return "Trojan";
case ProxyType::Snell:

View File

@ -81,7 +81,7 @@ void hysteriaConstruct(Proxy &node, const std::string &group, const std::string
void vlessConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &add, const std::string &port, const std::string &type, const std::string &id, const std::string &aid, const std::string &net, const std::string &cipher, const std::string &flow, const std::string &mode, const std::string &path, const std::string &host, const std::string &edge, const std::string &tls, tribool udp, tribool tfo, tribool scv, tribool tls13)
{
commonConstruct(node, ProxyType::Vless, group, remarks, add, port, udp, tfo, scv, tls13);
commonConstruct(node, ProxyType::VLESS, group, remarks, add, port, udp, tfo, scv, tls13);
node.UserId = id.empty() ? "00000000-0000-0000-0000-000000000000" : id;
node.AlterId = to_int(aid);
node.EncryptMethod = cipher;