From 2c116094373e059e5a3b4bae2910b2ac4b1d5bdc Mon Sep 17 00:00:00 2001 From: nullcat Date: Mon, 1 Jun 2026 16:31:27 +0800 Subject: [PATCH] feat(tsnet): embedded web client only runs on diagnose flag is set --- core/tsnet.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/tsnet.go b/core/tsnet.go index 414eb5c..ee755ef 100644 --- a/core/tsnet.go +++ b/core/tsnet.go @@ -20,6 +20,10 @@ func InitTsNet(ctx context.Context, cfg *Core, logger *slog.Logger, withDebugLog } } + if withDebugLog { + logger.Warn("Tsnet will be turn on their embedded web client, use for your own risk") + } + srv := &tsnet.Server{ Hostname: "tslink-" + cfg.Hostname, AuthKey: cfg.AuthKey, @@ -28,7 +32,7 @@ func InitTsNet(ctx context.Context, cfg *Core, logger *slog.Logger, withDebugLog UserLogf: func(fmt string, args ...interface{}) { logger.With(slog.String("from", "tsnet")).Info(fmt2.Sprintf(fmt, args...)) }, - RunWebClient: true, + RunWebClient: withDebugLog, } if cfg.ControlURL != "" {