优化frpc.toml导出逻辑,从前端依赖库改为自建设计

This commit is contained in:
2026-07-23 21:26:08 +08:00
parent 9675420604
commit 892fc98be2
7 changed files with 705 additions and 178 deletions
+3 -3
View File
@@ -18,7 +18,7 @@ import (
var embeddedFrpc embed.FS
//go:embed frpc.tmpl
var frpcTemplateContent string
var FrpcTemplateContent string
var (
cachedFrpcPath string
@@ -127,11 +127,11 @@ func GenerateFrpcConfig() error {
tmplContent = string(content)
} else {
// 读取失败时回退到 embed
tmplContent = frpcTemplateContent
tmplContent = FrpcTemplateContent
}
} else {
// 外部文件不存在,使用 embed 中的模板
tmplContent = frpcTemplateContent
tmplContent = FrpcTemplateContent
}
// ===== 核心改动结束 =====