From 1d56f44696db920330e828e198f77fbded157418 Mon Sep 17 00:00:00 2001 From: Tindy X <49061470+tindy2013@users.noreply.github.com> Date: Sun, 8 Dec 2024 22:27:01 +0800 Subject: [PATCH] Add TCP Fast Open option to Clash configs --- src/generator/config/subexport.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/generator/config/subexport.cpp b/src/generator/config/subexport.cpp index eacb22a2d..c77e21bf1 100644 --- a/src/generator/config/subexport.cpp +++ b/src/generator/config/subexport.cpp @@ -271,9 +271,9 @@ void proxyToClash(std::vector &nodes, YAML::Node &yamlnode, const ProxyGr processRemark(x.Remark, remarks_list, false); - tribool udp = ext.udp; - tribool scv = ext.skip_cert_verify; + tribool udp = ext.udp, tfo = ext.tfo, scv = ext.skip_cert_verify; udp.define(x.UDP); + tfo.define(x.TCPFastOpen); scv.define(x.AllowInsecure); singleproxy["name"] = x.Remark; @@ -561,6 +561,8 @@ void proxyToClash(std::vector &nodes, YAML::Node &yamlnode, const ProxyGr // sees in https://dreamacro.github.io/clash/configuration/outbound.html#snell if(udp && x.Type != ProxyType::Snell) singleproxy["udp"] = true; + if(!tfo.is_undef()) + singleproxy["tfo"] = tfo.get(); if(proxy_block) singleproxy.SetStyle(YAML::EmitterStyle::Block); else