mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-05 03:02:06 +00:00
Fix bugs for tuic in Clash.(#23)
This commit is contained in:
1 parent
ee9b239e21
commit
dbba931701
2 files changed
+8
-4
No files matched your search
@@ -245,7 +245,7 @@ void tuicConstruct(Proxy &node, const std::string &group, const std::string &rem
|
|||||||
const std::string &sni, const std::string &uuid, const std::string &udpRelayMode,
|
const std::string &sni, const std::string &uuid, const std::string &udpRelayMode,
|
||||||
const std::string &token,
|
const std::string &token,
|
||||||
tribool udp, tribool tfo,
|
tribool udp, tribool tfo,
|
||||||
tribool scv, tribool reduceRtt, tribool disableSni) {
|
tribool scv, tribool reduceRtt, tribool disableSni,uint16_t request_timeout) {
|
||||||
commonConstruct(node, ProxyType::TUIC, group, remarks, add, port, udp, tfo, scv, tribool());
|
commonConstruct(node, ProxyType::TUIC, group, remarks, add, port, udp, tfo, scv, tribool());
|
||||||
node.Password = password;
|
node.Password = password;
|
||||||
node.Alpn = alpn;
|
node.Alpn = alpn;
|
||||||
@@ -256,6 +256,7 @@ void tuicConstruct(Proxy &node, const std::string &group, const std::string &rem
|
|||||||
node.UserId = uuid;
|
node.UserId = uuid;
|
||||||
node.UdpRelayMode = udpRelayMode;
|
node.UdpRelayMode = udpRelayMode;
|
||||||
node.token = token;
|
node.token = token;
|
||||||
|
node.RequestTimeout = request_timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1385,9 +1386,11 @@ void explodeClash(Node yamlnode, std::vector<Proxy> &nodes) {
|
|||||||
break;
|
break;
|
||||||
case "tuic"_hash:
|
case "tuic"_hash:
|
||||||
group = TUIC_DEFAULT_GROUP;
|
group = TUIC_DEFAULT_GROUP;
|
||||||
|
uint16_t request_timeout;
|
||||||
singleproxy["password"] >>= password;
|
singleproxy["password"] >>= password;
|
||||||
singleproxy["uuid"] >>= password;
|
singleproxy["uuid"] >>= id;
|
||||||
singleproxy["congestion-controller"] >>= congestion_control;
|
singleproxy["congestion-controller"] >>= congestion_control;
|
||||||
|
singleproxy["udp-relay-mode"] >>= udp_relay_mode;
|
||||||
singleproxy["sni"] >>= sni;
|
singleproxy["sni"] >>= sni;
|
||||||
if (!singleproxy["alpn"].IsNull()) {
|
if (!singleproxy["alpn"].IsNull()) {
|
||||||
singleproxy["alpn"][0] >>= alpn;
|
singleproxy["alpn"][0] >>= alpn;
|
||||||
@@ -1395,10 +1398,11 @@ void explodeClash(Node yamlnode, std::vector<Proxy> &nodes) {
|
|||||||
singleproxy["disable-sni"] >>= disableSni;
|
singleproxy["disable-sni"] >>= disableSni;
|
||||||
singleproxy["reduce-rtt"] >>= reduceRtt;
|
singleproxy["reduce-rtt"] >>= reduceRtt;
|
||||||
singleproxy["token"] >>= token;
|
singleproxy["token"] >>= token;
|
||||||
|
singleproxy["request-timeout"] >>= request_timeout;
|
||||||
tuicConstruct(node, TUIC_DEFAULT_GROUP, ps, server, port, password, congestion_control, alpn, sni, id,
|
tuicConstruct(node, TUIC_DEFAULT_GROUP, ps, server, port, password, congestion_control, alpn, sni, id,
|
||||||
udp_relay_mode, token,
|
udp_relay_mode, token,
|
||||||
tribool(),
|
tribool(),
|
||||||
tribool(), scv, reduceRtt, disableSni);
|
tribool(), scv, reduceRtt, disableSni,request_timeout);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ void tuicConstruct(Proxy &node, const std::string &group, const std::string &rem
|
|||||||
const std::string &alpn,
|
const std::string &alpn,
|
||||||
const std::string &sni,const std::string & uuid,const std::string &udpRelayMode,const std::string &token,
|
const std::string &sni,const std::string & uuid,const std::string &udpRelayMode,const std::string &token,
|
||||||
tribool udp = tribool(), tribool tfo = tribool(),
|
tribool udp = tribool(), tribool tfo = tribool(),
|
||||||
tribool scv = tribool(),tribool reduceRtt = tribool(),tribool disableSni = tribool());
|
tribool scv = tribool(),tribool reduceRtt = tribool(),tribool disableSni = tribool(),uint16_t request_timeout = 15000);
|
||||||
void explodeVmess(std::string vmess, Proxy &node);
|
void explodeVmess(std::string vmess, Proxy &node);
|
||||||
|
|
||||||
void explodeSSR(std::string ssr, Proxy &node);
|
void explodeSSR(std::string ssr, Proxy &node);
|
||||||
|
|||||||
Reference in new issue
Block a user