Skip to content

Commit

Permalink
fix: make sure alpn field compatible to latest clash meta
Browse files Browse the repository at this point in the history
  • Loading branch information
lonelam committed Mar 23, 2024
1 parent 0739ea7 commit 84b1815
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/parser/subparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,10 @@ void explodeClash(Node yamlnode, std::vector<Proxy> &nodes)
singleproxy["obfs"] >>= obfs;
singleproxy["sni"] >>= sni;
singleproxy["fingerprint"] >>= fingerprint;
singleproxy["alpn"] >>= alpn;
if (singleproxy["alpn"].IsSequence())
singleproxy["alpn"][0] >>= alpn;
else
singleproxy["alpn"] >>= alpn;
singleproxy["ca"] >>= ca;
singleproxy["ca-str"] >>= ca_str;
singleproxy["recv-window-conn"] >>= recv_window_conn;
Expand All @@ -1305,7 +1308,10 @@ void explodeClash(Node yamlnode, std::vector<Proxy> &nodes)
singleproxy["obfs-password"] >>= obfs_password;
singleproxy["sni"] >>= sni;
singleproxy["fingerprint"] >>= fingerprint;
singleproxy["alpn"] >>= alpn;
if (singleproxy["alpn"].IsSequence())
singleproxy["alpn"][0] >>= alpn;
else
singleproxy["alpn"] >>= alpn;
singleproxy["ca"] >>= ca;
singleproxy["ca-str"] >>= ca_str;
singleproxy["cwnd"] >>= cwnd;
Expand Down

0 comments on commit 84b1815

Please sign in to comment.