1
0
mirror of https://github.com/MetaCubeX/mihomo.git synced 2026-10-10 04:03:11 +08:00

fix: trim trailing newline from Tailscale VersionDotTxt in IPNVersion (#3079)

This commit is contained in:
胡威
2026-08-05 10:02:33 +08:00
committed by GitHub
parent d46944f32b
commit afeb072836
+3 -1
View File
@@ -9,6 +9,7 @@ import (
"net"
"net/netip"
"runtime"
"strings"
"sync"
"time"
@@ -67,7 +68,8 @@ type TailscaleOption struct {
func init() {
hostinfo.RegisterHostinfoNewHook(func(hi *tailcfg.Hostinfo) {
hi.IPNVersion = fmt.Sprintf("%s-%s-%s", ts.VersionDotTxt, C.MihomoName, C.Version)
versionDotTxt := strings.TrimSpace(ts.VersionDotTxt)
hi.IPNVersion = fmt.Sprintf("%s-%s-%s", versionDotTxt, C.MihomoName, C.Version)
})
envknob.SetNoLogsNoSupport()
if runtime.GOOS == "android" { // Android SDK 30 no longer permits Go's net.Interfaces to work (Issue 2293)