Skip to content

Commit

Permalink
Update subexport.cpp add surge hy2
Browse files Browse the repository at this point in the history
  • Loading branch information
sdl9i2 authored Jan 15, 2024
1 parent c842def commit 9930c8e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/generator/config/subexport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,16 @@ std::string proxyToSurge(std::vector<Proxy> &nodes, const std::string &base_conf
ini.set(real_section, "keepalive", std::to_string(x.KeepAlive));
ini.set(real_section, "peer", "(" + generatePeer(x) + ")");
break;
case ProxyType::Hysteria2:
proxy = "hysteria2, " + hostname + ", " + port + ", password=" + password;
if (!sni.empty()) {
proxy += ", sni=" + sni;
} else if (!host.empty()) {
proxy += ", sni=" + host;
}
if (!scv.is_undef())
proxy += ", skip-cert-verify=" + scv.get_str();
break;
default:
continue;
}
Expand Down

0 comments on commit 9930c8e

Please sign in to comment.