Skip to content

Commit

Permalink
Fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
tindy2013 authored Nov 28, 2024
1 parent 78c72bb commit f648b58
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion scripts/build.macos.release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sudo install -d /usr/local/include/date/
sudo install -m644 libcron/externals/date/include/date/* /usr/local/include/date/
cd ..

git clone https://github.com/ToruNiina/toml11 --depth=1
git clone https://github.com/ToruNiina/toml11 --branch="v3.7.1" --depth=1
cd toml11
cmake -DCMAKE_CXX_STANDARD=11 .
sudo make install -j6 > /dev/null
Expand Down
13 changes: 7 additions & 6 deletions src/parser/subparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,10 @@ void hysteriaConstruct(
const std::string &hop_interval,
const std::string &alpn,
tribool tfo,
tribool scv
tribool scv,
const std::string &underlying_proxy = ""
) {
commonConstruct(node, ProxyType::Hysteria, group, remarks, server, port, tribool(), tfo, scv, tribool());
commonConstruct(node, ProxyType::Hysteria, group, remarks, server, port, tribool(), tfo, scv, tribool(), underlying_proxy);
node.Ports = ports;
node.Protocol = protocol;
node.OBFSParam = obfs_protocol;
Expand Down Expand Up @@ -207,8 +208,8 @@ void hysteriaConstruct(
}
}

void hysteria2Construct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &server, const std::string &port,const std::string &up, const std::string &down, const std::string &password, const std::string &obfs, const std::string &obfs_password, const std::string &sni, const std::string &fingerprint, const std::string &alpn, const std::string &ca, const std::string &ca_str, const std::string &cwnd, tribool tfo, tribool scv) {
commonConstruct(node, ProxyType::Hysteria2, group, remarks, server, port, tribool(), tfo, scv, tribool());
void hysteria2Construct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &server, const std::string &port,const std::string &up, const std::string &down, const std::string &password, const std::string &obfs, const std::string &obfs_password, const std::string &sni, const std::string &fingerprint, const std::string &alpn, const std::string &ca, const std::string &ca_str, const std::string &cwnd, tribool tfo, tribool scv, const std::string &underlying_proxy) {
commonConstruct(node, ProxyType::Hysteria2, group, remarks, server, port, tribool(), tfo, scv, tribool(), underlying_proxy);
node.UpSpeed = to_int(up);
node.DownSpeed = to_int(down);
node.Password = password;
Expand Down Expand Up @@ -1319,7 +1320,7 @@ void explodeClash(Node yamlnode, std::vector<Proxy> &nodes)
singleproxy["disable_mtu_discovery"] >>= disable_mtu_discovery;
singleproxy["hop-interval"] >>= hop_interval;

hysteriaConstruct(node, group, ps, server, port, ports, protocol, obfs_protocol, up, up_speed, down, down_speed, auth, auth_str, obfs, sni, fingerprint, ca, ca_str, recv_window_conn, recv_window, disable_mtu_discovery, hop_interval, alpn, tfo, scv);
hysteriaConstruct(node, group, ps, server, port, ports, protocol, obfs_protocol, up, up_speed, down, down_speed, auth, auth_str, obfs, sni, fingerprint, ca, ca_str, recv_window_conn, recv_window, disable_mtu_discovery, hop_interval, alpn, tfo, scv, underlying_proxy);
break;
case "hysteria2"_hash:
group = HYSTERIA2_DEFAULT_GROUP;
Expand All @@ -1340,7 +1341,7 @@ void explodeClash(Node yamlnode, std::vector<Proxy> &nodes)
singleproxy["ca-str"] >>= ca_str;
singleproxy["cwnd"] >>= cwnd;

hysteria2Construct(node, group, ps, server, port, up, down, password, obfs, obfs_password, sni, fingerprint, alpn, ca, ca_str, cwnd, tfo, scv );
hysteria2Construct(node, group, ps, server, port, up, down, password, obfs, obfs_password, sni, fingerprint, alpn, ca, ca_str, cwnd, tfo, scv, underlying_proxy);
break;

default:
Expand Down
5 changes: 3 additions & 2 deletions src/parser/subparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ void hysteriaConstruct(
const std::string &hop_interval,
const string_array &alpn,
tribool tfo,
tribool scv
tribool scv,
const std::string &underlying_proxy = ""
);

void hysteria2Construct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &server, const std::string &port,const std::string &up, const std::string &down, const std::string &password, const std::string &obfs, const std::string &obfs_password, const std::string &sni, const std::string &fingerprint, const string_array &alpn, const std::string &ca, const std::string &caStr, const std::string &cwnd, tribool tfo, tribool scv);
void hysteria2Construct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &server, const std::string &port,const std::string &up, const std::string &down, const std::string &password, const std::string &obfs, const std::string &obfs_password, const std::string &sni, const std::string &fingerprint, const string_array &alpn, const std::string &ca, const std::string &caStr, const std::string &cwnd, tribool tfo, tribool scv, const std::string &underlying_proxy = "");

void explodeVmess(std::string vmess, Proxy &node);
void explodeSSR(std::string ssr, Proxy &node);
Expand Down

0 comments on commit f648b58

Please sign in to comment.