Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 在目标类型为 Clash 时 TFO 设定不生效 #801

Open
2 tasks done
immtelecom opened this issue Dec 1, 2024 · 3 comments
Open
2 tasks done

[BUG] 在目标类型为 Clash 时 TFO 设定不生效 #801

immtelecom opened this issue Dec 1, 2024 · 3 comments

Comments

@immtelecom
Copy link

确认版本最新

  • 我已经确认在最新Action编译的版本中复现

检索issue

  • 我已经确认之前没有issue涉及此BUG

subconverter版本

最新提交

转换过程

任意转换至 Clash 目标

转换设置

tfo=true

复现步骤

使用任意订阅转换至 Clash 订阅

期望结果

订阅输出中带有 TFO 设定

实际结果

没有

错误信息

No response

@immtelecom
Copy link
Author

From 7d3ee189443bdf7b8d7b5d232b66348e46e32a10 Mon Sep 17 00:00:00 2001
From: ImmTelecom <[email protected]>
Date: Mon, 2 Dec 2024 05:56:52 +0800
Subject: [PATCH 1/1] FIX CLASH TFO

---
 src/generator/config/subexport.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/generator/config/subexport.cpp b/src/generator/config/subexport.cpp
index eacb22a..7e18b28 100644
--- a/src/generator/config/subexport.cpp
+++ b/src/generator/config/subexport.cpp
@@ -271,6 +271,7 @@ void proxyToClash(std::vector<Proxy> &nodes, YAML::Node &yamlnode, const ProxyGr
 
         processRemark(x.Remark, remarks_list, false);
 
+        tribool tfo = ext.tfo;
         tribool udp = ext.udp;
         tribool scv = ext.skip_cert_verify;
         udp.define(x.UDP);
@@ -279,6 +280,7 @@ void proxyToClash(std::vector<Proxy> &nodes, YAML::Node &yamlnode, const ProxyGr
         singleproxy["name"] = x.Remark;
         singleproxy["server"] = x.Hostname;
         singleproxy["port"] = x.Port;
+        if (!tfo.is_undef() && tfo.get()) singleproxy["tfo"] = tfo.get();
 
         switch(x.Type)
         {
-- 
2.39.5

@immtelecom
Copy link
Author

修复前
修复后

@tindy2013
Copy link
Owner

Added in 1d56f44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants