docs: drop frp self-comparison in core references

- go.mod/main.go/config.go/sample/CHANGELOG: 移除 类 frp/去中心化 frp 本体/像 frp 类比
- 保留 ExternalService 中真实的 frp_server 外部穿透服务(客观功能,非自比)
This commit is contained in:
2026-07-15 16:40:07 +08:00
parent 7cbe063ac1
commit ccae5e2d42
5 changed files with 18 additions and 19 deletions
+4 -4
View File
@@ -10,8 +10,8 @@ import (
"github.com/BurntSushi/toml"
)
// Config 是 meshray-core 独立运行(类 frp 风格)的配置文件结构。
// 支持 TOML(默认,类 frp)与 JSON 两种格式,按文件扩展名自动选择解码器。
// Config 是 meshray-core 独立运行的配置文件结构。
// 支持 TOML(默认)与 JSON 两种格式,按文件扩展名自动选择解码器。
//
// TOML 示例:
//
@@ -70,7 +70,7 @@ type ICEConf struct {
}
// loadConfig 读取并解析配置文件:按扩展名自动选择 TOML 或 JSON 解码器。
// 默认且推荐 TOML(类 frp;旧 .json 配置仍可继续使用。
// 默认且推荐 TOML;旧 .json 配置仍可继续使用。
func loadConfig(path string) (*Config, error) {
data, err := os.ReadFile(path)
if err != nil {
@@ -85,7 +85,7 @@ func loadConfig(path string) (*Config, error) {
ext := filepath.Ext(lower)
switch ext {
case ".toml", ".conf":
// TOML与 frp 风格一致
// TOML默认配置格式
if err := toml.Unmarshal(data, cfg); err != nil {
return nil, fmt.Errorf("解析 TOML 配置 %s 失败: %w", path, err)
}
+3 -3
View File
@@ -1,4 +1,4 @@
// 命令 meshray-coremeshray-core 增强层的独立运行入口(类 frp 风格)
// 命令 meshray-coremeshray-core 增强层的独立运行入口。
//
// 直接以自定义 conn.Bind 接管 WireGuard 收发,使所有隧道密文流量经由本仓 9 层传输
// Direct/TURN/WebRTC/...)而非裸 UDP。无需管理器即可在两台机器间建立加密隧道,
@@ -7,7 +7,7 @@
// 用法:
//
// meshray-core -genkey # 生成私钥
// meshray-core -c meshray-core.toml # 按配置启动(默认 TOML,类 frp;兼容 .json
// meshray-core -c meshray-core.toml # 按配置启动(默认 TOML;兼容 .json)
package main
import (
@@ -32,7 +32,7 @@ import (
)
func main() {
cfgPath := flag.String("c", "meshray-core.toml", "配置文件路径(默认 TOML,类 frp;也兼容 .json")
cfgPath := flag.String("c", "meshray-core.toml", "配置文件路径(默认 TOML;也兼容 .json")
genKey := flag.Bool("genkey", false, "仅生成私钥并打印后退出")
flag.Parse()
+1 -1
View File
@@ -1,4 +1,4 @@
# meshray-core 独立运行配置(类 frp 风格,TOML
# meshray-core 独立运行配置(TOML
# 用法: meshray-core -c meshray-core.toml
# 也兼容旧 JSON 配置(扩展名 .json 自动按 JSON 解析)。