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

View File

@ -13,7 +13,7 @@ enum ProxyType
Shadowsocks, Shadowsocks,
ShadowsocksR, ShadowsocksR,
VMess, VMess,
Vless, VLESS,
Hysteria, Hysteria,
Trojan, Trojan,
Snell, Snell,
@ -32,8 +32,10 @@ inline String getProxyTypeName(int type)
return "SSR"; return "SSR";
case ProxyType::VMess: case ProxyType::VMess:
return "VMess"; return "VMess";
case ProxyType::Vless: case ProxyType::VLESS:
return "Vless"; return "VLESS";
case ProxyType::Hysteria:
return "Hysteria";
case ProxyType::Trojan: case ProxyType::Trojan:
return "Trojan"; return "Trojan";
case ProxyType::Snell: 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) 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.UserId = id.empty() ? "00000000-0000-0000-0000-000000000000" : id;
node.AlterId = to_int(aid); node.AlterId = to_int(aid);
node.EncryptMethod = cipher; node.EncryptMethod = cipher;