mirror of
https://github.com/MetaCubeX/subconverter.git
synced 2025-11-04 18:19:42 +08:00
feat: converter support Fingerprint
fix: converter REALITY share standard error
This commit is contained in:
parent
1bb01d90cd
commit
6ceae1c334
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@ -72,7 +72,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Add commit id into version
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||
@ -100,7 +100,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Add commit id into version
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||
@ -128,7 +128,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Add commit id into version
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
run: SHA=$(git rev-parse --short HEAD) && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h
|
||||
|
||||
@ -231,7 +231,9 @@ proxyToClash(std::vector<Proxy> &nodes, YAML::Node &yamlnode, const ProxyGroupCo
|
||||
if (!x.ShortId.empty())
|
||||
singleproxy["reality-opts"]["short-id"] = x.ShortId;
|
||||
}
|
||||
|
||||
singleproxy["client-fingerprint"] = "chrome";
|
||||
if (!x.Fingerprint.empty())
|
||||
singleproxy["client-fingerprint"] = x.Fingerprint;
|
||||
switch (x.Type) {
|
||||
case ProxyType::Shadowsocks:
|
||||
//latest clash core removed support for chacha20 encryption
|
||||
|
||||
@ -103,6 +103,7 @@ struct Proxy
|
||||
String DownMbps;
|
||||
String Insecure;
|
||||
|
||||
String Fingerprint;
|
||||
String PublicKey;
|
||||
String ShortId;
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ void hysteriaConstruct(Proxy &node, const std::string &group, const std::string
|
||||
node.FakeType = type;
|
||||
}
|
||||
|
||||
void vlessConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &add, const std::string &port, const std::string &type, const std::string &id, const std::string &aid, const std::string &net, const std::string &cipher, const std::string &flow, const std::string &mode, const std::string &path, const std::string &host, const std::string &edge, const std::string &tls,const std::string &pkd ,const std::string &sid ,tribool udp, tribool tfo, tribool scv, tribool tls13)
|
||||
void vlessConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &add, const std::string &port, const std::string &type, const std::string &id, const std::string &aid, const std::string &net, const std::string &cipher, const std::string &flow, const std::string &mode, const std::string &path, const std::string &host, const std::string &edge, const std::string &tls,const std::string &pbk, const std::string &sid, const std::string &fp ,tribool udp, tribool tfo, tribool scv, tribool tls13)
|
||||
{
|
||||
commonConstruct(node, ProxyType::VLESS, group, remarks, add, port, udp, tfo, scv, tls13);
|
||||
node.UserId = id.empty() ? "00000000-0000-0000-0000-000000000000" : id;
|
||||
@ -89,9 +89,10 @@ void vlessConstruct(Proxy &node, const std::string &group, const std::string &re
|
||||
node.Edge = edge;
|
||||
node.Flow = flow;
|
||||
node.FakeType = type;
|
||||
node.TLSSecure = tls == "tls" || tls == "xtls";
|
||||
node.PublicKey = pkd;
|
||||
node.TLSSecure = tls == "tls" || tls == "xtls" || tls == "reality";
|
||||
node.PublicKey = pbk;
|
||||
node.ShortId = sid;
|
||||
node.Fingerprint = fp;
|
||||
|
||||
switch(hash_(net))
|
||||
{
|
||||
@ -1320,7 +1321,7 @@ void explodeStdHysteria(std::string hysteria, Proxy &node)
|
||||
|
||||
void explodeStdVless(std::string vless, Proxy &node)
|
||||
{
|
||||
std::string add, port, type, id, aid, net, flow, pbk,sid,mode, path, host, tls, remarks;
|
||||
std::string add, port, type, id, aid, net, flow, pbk, sid, fp, mode, path, host, tls, remarks;
|
||||
std::string addition;
|
||||
vless = vless.substr(8);
|
||||
string_size pos;
|
||||
@ -1340,6 +1341,7 @@ void explodeStdVless(std::string vless, Proxy &node)
|
||||
flow = getUrlArg(addition,"flow");
|
||||
pbk = getUrlArg(addition,"pbk");
|
||||
sid = getUrlArg(addition,"sid");
|
||||
fp = getUrlArg(addition,"fp");
|
||||
|
||||
switch(hash_(net))
|
||||
{
|
||||
@ -1367,7 +1369,7 @@ void explodeStdVless(std::string vless, Proxy &node)
|
||||
if(remarks.empty())
|
||||
remarks = add + ":" + port;
|
||||
|
||||
vlessConstruct(node, XRAY_DEFAULT_GROUP, remarks, add, port, type, id, aid, net, "auto", flow, mode, path, host, "", tls,pbk,sid);
|
||||
vlessConstruct(node, XRAY_DEFAULT_GROUP, remarks, add, port, type, id, aid, net, "auto", flow, mode, path, host, "", tls, pbk, sid, fp);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ enum class ConfType
|
||||
|
||||
void hysteriaConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &add, const std::string &port, const std::string &type, const std::string &auth, const std::string &host, const std::string &up, const std::string &down, const std::string &alpn, const std::string &obfsParam, const std::string &insecure ,tribool udp = tribool(), tribool tfo = tribool(), tribool scv = tribool(), tribool tls13 = tribool());
|
||||
void vmessConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &add, const std::string &port, const std::string &type, const std::string &id, const std::string &aid, const std::string &net, const std::string &cipher, const std::string &path, const std::string &host, const std::string &edge, const std::string &tls, const std::string &sni, const std::string &alpn, tribool udp = tribool(), tribool tfo = tribool(), tribool scv = tribool(), tribool tls13 = tribool());
|
||||
void vlessConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &add, const std::string &port, const std::string &type, const std::string &id, const std::string &aid, const std::string &net, const std::string &cipher, const std::string &flow, const std::string &mode, const std::string &path, const std::string &host, const std::string &edge, const std::string &tls,const std::string &pkd,const std::string &sid, tribool udp = tribool(), tribool tfo = tribool(), tribool scv = tribool(), tribool tls13 = tribool());
|
||||
void vlessConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &add, const std::string &port, const std::string &type, const std::string &id, const std::string &aid, const std::string &net, const std::string &cipher, const std::string &flow, const std::string &mode, const std::string &path, const std::string &host, const std::string &edge, const std::string &tls,const std::string &pkd, const std::string &sid, const std::string &fp, tribool udp = tribool(), tribool tfo = tribool(), tribool scv = tribool(), tribool tls13 = tribool());
|
||||
void ssrConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &server, const std::string &port, const std::string &protocol, const std::string &method, const std::string &obfs, const std::string &password, const std::string &obfsparam, const std::string &protoparam, tribool udp = tribool(), tribool tfo = tribool(), tribool scv = tribool());
|
||||
void ssConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &server, const std::string &port, const std::string &password, const std::string &method, const std::string &plugin, const std::string &pluginopts, tribool udp = tribool(), tribool tfo = tribool(), tribool scv = tribool(), tribool tls13 = tribool());
|
||||
void socksConstruct(Proxy &node, const std::string &group, const std::string &remarks, const std::string &server, const std::string &port, const std::string &username, const std::string &password, tribool udp = tribool(), tribool tfo = tribool(), tribool scv = tribool());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user