From d60b336dfc3eeed142eab0399fc01684f9d5f1af Mon Sep 17 00:00:00 2001 From: ayanamist Date: Mon, 18 May 2026 10:44:01 +0800 Subject: [PATCH] chore: use mihomo name & ver to tailscale reported ver to avoid update prompts (#2801) --- adapter/outbound/tailscale.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/adapter/outbound/tailscale.go b/adapter/outbound/tailscale.go index a8ff42050..1c36de99c 100644 --- a/adapter/outbound/tailscale.go +++ b/adapter/outbound/tailscale.go @@ -21,8 +21,10 @@ import ( "github.com/metacubex/mihomo/log" "github.com/metacubex/tailscale/envknob" + "github.com/metacubex/tailscale/hostinfo" "github.com/metacubex/tailscale/ipn" "github.com/metacubex/tailscale/net/netmon" + "github.com/metacubex/tailscale/tailcfg" "github.com/metacubex/tailscale/tsnet" D "github.com/miekg/dns" ) @@ -62,6 +64,9 @@ type TailscaleOption struct { } func init() { + hostinfo.RegisterHostinfoNewHook(func(hi *tailcfg.Hostinfo) { + hi.IPNVersion = C.MihomoName + " " + C.Version + }) envknob.SetNoLogsNoSupport() if runtime.GOOS == "android" { // Android SDK 30 no longer permits Go's net.Interfaces to work (Issue 2293) netmon.RegisterInterfaceGetter(func() (nif []netmon.Interface, err error) {