Skip to content

Commit

Permalink
Add TCP Fast Open option to Clash configs
Browse files Browse the repository at this point in the history
  • Loading branch information
tindy2013 committed Dec 8, 2024
1 parent c207bfc commit 1d56f44
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/generator/config/subexport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ void proxyToClash(std::vector<Proxy> &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;
Expand Down Expand Up @@ -561,6 +561,8 @@ void proxyToClash(std::vector<Proxy> &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
Expand Down

0 comments on commit 1d56f44

Please sign in to comment.