When adding Surge as a target, support for hysteria2.(#6)

This commit is contained in:
asdlokj1qpi23
2024-01-24 14:45:17 +08:00
parent c842defea8
commit 5a4049af89

View File

@@ -887,6 +887,13 @@ std::string proxyToSurge(std::vector<Proxy> &nodes, const std::string &base_conf
if (x.SnellVersion != 0)
proxy += ", version=" + std::to_string(x.SnellVersion);
break;
case ProxyType::Hysteria2:
if (surge_ver < 4 && surge_ver != -3)
continue;
proxy = "hysteria2, " + hostname + ", " + port + ", password=" + password;
if (!scv.is_undef())
proxy += ", skip-cert-verify=" + scv.get_str();
break;
case ProxyType::WireGuard:
if (surge_ver < 4 && surge_ver != -3)
continue;