Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/parser/subparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,12 @@ void anytlsConstruct(
const std::string &idle_session_check_interval,
const std::string &idle_session_timeout,
const std::string &min_idle_session,
tribool udp,
tribool tfo,
tribool scv,
const std::string &underlying_proxy
) {
commonConstruct(node, ProxyType::AnyTLS, group, remarks, server, port, tribool(), tfo, scv, tribool(), underlying_proxy);
commonConstruct(node, ProxyType::AnyTLS, group, remarks, server, port, udp, tfo, scv, tribool(), underlying_proxy);
node.Password = password;
node.SNI = sni;
if (!alpn.empty()) {
Expand Down Expand Up @@ -1792,7 +1793,7 @@ void explodeClash(Node yamlnode, std::vector<Proxy> &nodes)
else
singleproxy["alpn"] >>= alpn;
singleproxy["fingerprint"] >>= fingerprint;
anytlsConstruct(node, group, ps, server, port, password, sni, alpn, fingerprint, idle_session_check_interval, idle_session_timeout, min_idle_session, tfo, scv, underlying_proxy);
anytlsConstruct(node, group, ps, server, port, password, sni, alpn, fingerprint, idle_session_check_interval, idle_session_timeout, min_idle_session, udp, tfo, scv, underlying_proxy);

// Assign new parameters to node for AnyTLS
node.IpVersion = ip_version;
Expand Down Expand Up @@ -2073,7 +2074,7 @@ void explodeTUIC(std::string tuic, Proxy &node) {

void explodeStdAnyTLS(std::string anytls, Proxy &node) {
std::string add, port, password, sni, alpn, fingerprint, remarks, addition,idle_session_check_interval,idle_session_timeout,min_idle_session;
tribool tfo, scv;
tribool udp, tfo, scv;

anytls = anytls.substr(9); // 去除 anytls://
string_size pos;
Expand Down Expand Up @@ -2106,13 +2107,14 @@ void explodeStdAnyTLS(std::string anytls, Proxy &node) {
sni = getUrlArg(addition, "peer");
alpn = getUrlArg(addition, "alpn");
fingerprint = urlDecode(getUrlArg(addition, "hpkp"));
udp = tribool(getUrlArg(addition, "udp"));
tfo = tribool(getUrlArg(addition, "tfo"));
scv = tribool(getUrlArg(addition, "insecure"));

if (remarks.empty())
remarks = add + ":" + port;

anytlsConstruct(node, "AnyTLS", remarks, add, port, password, sni, alpn, fingerprint, idle_session_check_interval, idle_session_timeout, min_idle_session,tfo, scv, "");
anytlsConstruct(node, "AnyTLS", remarks, add, port, password, sni, alpn, fingerprint, idle_session_check_interval, idle_session_timeout, min_idle_session, udp, tfo, scv, "");
}

void explodeAnyTLS(std::string anytls, Proxy &node) {
Expand Down
1 change: 1 addition & 0 deletions src/parser/subparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ void anytlsConstruct(
const std::string &idle_session_check_interval,
const std::string &idle_session_timeout,
const std::string &min_idle_session,
tribool udp,
tribool tfo,
tribool scv,
const std::string &underlying_proxy = ""
Expand Down